Abstraction for services with user-agent-specific implementations. To get an instance, use AdfAgent.AGENT
.
Method Summary
|
public Object |
addBubbleEventListener(Object nodeOrWindow, Object eventType, Object listener)
-
Adds an event listener that fires in the non-Capture phases for the specified eventType.
|
public Object |
addEventBubbles(Object node, Object listener)
-
Adds event listeners for all of the events that the Rich client framework is interested in to the relevant element using the specified listener
|
public Object |
addEventCaptures(Node node, Function listener)
-
Adds event captures for all of the events that the Rich client framework is interested in to the relevant element using the specified listener.
|
public Object |
addKeyEventListener(Object element, Object listener)
-
Adds key event listener to the specified element.
|
public Object |
addOption(Object element, Object label, Object value, Object selected, Object disabled, Object description, Object index)
-
some agents don't support disabled options, so override this function if that is the case.
|
public Object |
addResizeListener(String id, Function listener)
-
Registers a listener for resize notification on a DOM element by id.
|
public Object |
allElementsRemoved()
-
Resets any id->element cache when all elements are removed This method should be called AFTER the elements are removed
|
public Object |
atLeast(Object platform, Object version)
|
public Object |
autoCompleteForm(Object htmlForm)
|
public Object |
checkMouseOutEvent(Object element, Object evt)
-
Checks wthether a mouseout event was received by the container when mouse was moved form one of its child elements to another
|
public Object |
clearSubtreeIds(Object element)
-
clear the ids of the specified element and its children.
|
public Event |
cloneEvent(Event event, HTMLElement newTarget)
-
Clones an event from an existing event for a new target element.
|
public Node |
cloneNode(Node domNode)
-
Clones a DOM node.
|
public Event |
copyEvent(Event event)
-
Returns a Copy of an event from an existing event.
|
private Object |
_copyMouseEvent(Object event, Object eventType, Object newTarget)
|
public Object |
copyStyle(HTMLElement sourceElement, HTMLElement targetElement)
-
Copies the computed style properties from the source element to the target element
|
public Object |
createDefaultLogWriter()
-
Creates and returns the default AdfLogWriter to use for this AdfPage.
|
protected Object |
CreateDefaultLogWriter(Object nativeLogWriter)
-
Method for subclasses to override to change the default AdfLogWriter for this agent
|
protected Object |
CreateNativeLogWriter()
-
Creates and returns the native AdfLogWriter to use for this AdfAgent.
|
public DOMElement |
createStyle(String content)
-
Inserts a new style block into the document using the specified style content.
|
public AdfTouchMoveManager |
createTouchMoveManager(HTMLElement element, Function handlerCallback, Number touchCount)
-
Constructs a manager for handling touch movements.
|
protected Object |
CreateUIInputEvent(Object component, Object type, Object nativeEvent)
|
public Object |
createXmlDocument()
|
public Object |
disableBrowserContextMenu(Object ownerDocument, Object disable)
-
Disables browser's context menu
|
public Object |
disableUserSelect(Object element)
-
Disable the user's ability to select text in this component
|
public Object |
dispatchEvent(Object targetElement, Object event)
-
Dispatches the specified event to the target, returning whether the dispatch was successful
|
public Object |
eatEvent(Object evt)
|
public static Object |
eatEventCallback(Object event)
-
Static callback handler for consuming a blocked event
|
public HTMLElement |
elementFromPagePoint(Number pageX, Object pageY, HTMLElement hintElement, Object exclusionContext, Object exclusionCallback)
-
Returns the topmost element at the give mouse point in Window coordinates.
|
private Object |
_elementFromPagePointImpl(Object fromElem, Object x, Object y, Object data, Object ignoreParentBounds, Object excludeChild, Object exclusionContext, Object exclusionCallback)
|
public Object |
elementsAdded(Object element)
-
Updates any id->element cache by adding the elements in the specified subtree
|
public Object |
elementsRemoved(Object element)
-
Updates any id->element cache by removing the elements in the specified subtree
|
public Object |
enableUserSelect(Object element)
-
Enable the user's ability to select text in this component
|
public Object |
endDocumentKeyEventCapture(Object listenerMap, Object focusProxy)
-
Remove agent-specific techniques for capturing key events for the focusProxy's document
|
public void |
execScript(Object ownerWindow, Object scriptText)
-
Executes a script.
|
public Object |
forceCursorChange(Object ownerDocument)
-
Force the cursor to change without requiring a mouse move.
|
public static AdfAgent |
getAgent(Window domWindow)
|
public Object |
getAttribute(Object node, Object attrName)
|
public Object |
getAttributeName(Object attr)
|
public Object |
getBooleanAttribute(Object element, Object attrName, Object defaultValue)
-
Returns the attribute value as a boolean (if possible).
|
public String |
getBoxSizing(HTMLElement element, CSSStyleDeclaration currentStyle)
-
Returns the box model associated with an element (http://www.w3.org/TR/css3-ui/#box-sizing)
|
public Number |
getBrowserViewportScrollLeft()
|
public Number |
getBrowserViewportScrollTop()
|
public Object |
getComponentEvent(Object component, Object nativeEvent, Object prevComponent)
|
public Object |
getComputedStyle(Object element)
-
Tries to return the current style, taking into account the inline styles and style sheets
|
public static Object |
getCSS2Cursor(Object cursorName)
-
Returns the CSS2 cursor property value to return for a CSS3 cursor name
|
public static Object |
getCSSLengthAsInt(Object cssLength)
|
protected Object |
GetCssToDomPropertyNameMap()
-
Returns the map which contains the CSS property name and it's DOM version.
|
public Object |
getCursor(Object cursorName)
-
Returns the CSS cursor property value to return for a CSS3 cursor name
|
public Array<AdfUIComponent> |
getDescendantComponentsForNode(Node node, Array<AdfUIComponent> children)
-
Get components descended from a node.
|
public Object |
getDomDocument()
|
public String |
getDomForCSSPropertyName(String cssPropertyName)
-
Returns the DOM property name of the CSS property.
|
public Object |
getDomWindow()
|
public Object |
getElementById(Object id)
-
Cover function to allow more performant implementations of document.getElementById()
|
public Object |
getElementLeft(Object element)
-
Returns the element's left side in Window coordinates
|
public Object |
getElementPageBounds(Object element)
-
Return a rectangle object containing the page bounds of an element in top/left/bottom/right form
|
public Object |
getElementPosition(Object element)
-
Returns HTML element's coordinates relative to the document's body
|
public Object |
getElementsByName(Object name)
|
public Object |
getElementTop(Object element)
-
Returns the element's top side in Window coordinates
|
public HTMLElement |
getEventFromElement(Object nativeEvent)
-
Some events, like the mouseover event, can tell you the dom node being moved from.
|
private Object |
_getEventRelatedTarget(Object nativeEvent)
|
public Object |
getEventTarget(Object event)
|
public HTMLElement |
getEventToElement(Object nativeEvent)
-
Some events, like the mouseout event, can tell you the dom node being moved to.
|
public Object |
getExpandoProperty(Object element, Object propertyName, Object defaultValue)
-
Returns an expando property from the specified element.
|
public Object |
getFormElement(Object form, Object elementName)
-
Finds the form element by name.
|
public Object |
getIntAttribute(Object element, Object attrName, Object defaultValue)
-
Returns the attribute value as an integer (if possible).
|
public Object |
getKeyCode(Object keyEvent)
-
Returns the unicode key code for the given key event.
|
public Object |
getLocalName(Object element)
|
public Object |
getModifierDisplayName(Object modifier)
-
Returns the appropriate platform-specific translated display name for a AdfKeyStroke modifier.
|
public Object |
getMousePosition(Object evt)
-
Returns event's mouse coordinates relative to the document
|
public Object |
getNodeName(HTMLElement element)
-
This method returns the name of the node in all upper case letters.
|
public Object |
getNodeXml(Object node)
|
public Object |
getOS()
|
public Object |
getOuterHeight(Object element, Object innerHeight, Object currentStyle)
|
public Object |
getOuterWidth(Object element, Object innerWidth, Object currentStyle)
|
public Object |
getOverrideStyle(Object element)
-
Returns the override style for this element
|
public Object |
getPlatform()
|
public Object |
getPreferredKeyEventForRepetition()
-
Returns the event type that is preferred to be used with the current agent for the purpose of handling repeating key events when the user holds down a key.
|
public Object |
getPrefix(Object element)
|
protected Array |
GetResizeEvents()
-
An array of event types used by the addResizeListener and removeResizeListener functions.
|
public Object |
getSessionStorageProperty(String propKey)
-
This function returns the value for a given key stored in session storage provide by DOM:storage methods.
|
public Object |
getStyleProperty(Object style, Object propertyName)
-
Returns the value of a property for the AdfAgent's style object
|
public Object |
getTableRow(Object tableElement, Object rowIndex)
-
Cover to workaround IE8 table.rows bug
|
public Object |
getTableRowCells(Object tableRow)
-
Cover to workaround IE8 row.cells bug
|
public Object |
getTableRows(Object tableElement)
-
Cover to workaround IE8 table.rows bug
|
public Object |
getTextContent(Object node)
-
Returns the text content of a Node, as per DOM-level 3 spec
|
public Object |
getVersion()
|
public Number |
getWindowClientHeight(Window domWindow)
-
Returns the client (or inner) height of the DOM window Object
|
public Number |
getWindowClientWidth(Window domWindow)
-
Returns the client (or inner) width of the DOM window Object
|
public Object |
getWindowHeight()
-
Returns the content height of the browser window
|
public Number |
getWindowScrollHeight(Window domWindow)
-
Returns the scroll (or canvas) height of the DOM window Object
|
public Number |
getWindowScrollWidth(Window domWindow)
-
Returns the scroll (or canvas) width of the DOM window Object
|
public Object |
getWindowWidth()
-
Returns the content width of the browser window
|
public static String |
guessOS()
-
Guess the OS of the agent
|
public static Number |
guessVersion()
-
Guess the version of the AdfAgent
|
protected Object |
Init(Object platform, Object os, Object version, Object domWindow)
-
Create an instance of an AdfAgent
|
protected static Object |
InitClass()
|
public Object |
installKeyboardBlocker(Object ownerDocument, Object install)
-
Installs the keyboard blocking handlers for the agent.
|
public Object |
isAttributeSpecified(Object attr)
|
public boolean |
isChromeEvent(Event domEvent)
-
Returns true if the event was on the element chrome
|
public Boolean |
isClipped(HTMLElement element)
-
Returns true if the element is clipped
|
public Object |
isDisabledOptionSupported()
-
Returns whether or not disabled is supported on an option tag
|
public Object |
isElementHTML(Object element)
|
public Object |
isEqualIcon(Object firstIcon, Object secondIcon)
-
IE's img icons innerHTML can be different.
|
public Object |
isEventInElement(Object event, Object element)
-
Returns true if the event occurs inside the specified element
|
public Object |
isFunctionKey(Object keyEvent)
-
Returns whether the event's keycode should be considered as a function key.
|
private static Object |
_isGeckoAgentSupported(Object agentName, Object geckoVersion)
|
public Boolean |
isInlineDialogRepositioningOnScroll()
-
Determines if a particular agent should support auto repositioning of inline dialogs on document scroll.
|
public Object |
isLeftButton(Object evt)
|
public Object |
isLeftButtonClick(Object evt)
-
Tests whether event is a left button click event.
|
public Object |
isMouseEvent(Object event)
-
Returns true iof the event is a mouse event
|
public Boolean |
isSessionStorageEnabled(Object propKey)
-
This function returns a boolean indicating whether the sessionStorage feature is enabled.
|
public Object |
mapNativeToComponentEventType(Object eventType)
-
Maps a native event type to a component event type
|
public Object |
modifyIdsInDomSubTree(HTMLElement subTreeRoot, Object prepend, Object idString)
-
Modify the ID values for every element in the given DOM sub tree.
|
private Object |
_onResizeHandler(Event event)
-
Callback handler invoked by a resize event.
|
private static Object |
_onResizeHandlerTimeout(Object state)
-
The delayed on resize handler uses the dom id to locate the associated node and agent state.
|
private static Object |
_parseFloatVersion(Object agentName, Object versionNumberPattern)
|
public Object |
parseXML(Object xmlString)
-
Parses XML string into a DOM document
|
public Object |
pointInElementBounds(Object element, Object pageX, Object pageY)
-
Returns true if the specified point in page space is in the bounds of this element
|
public boolean |
pointInElementChrome(HTMLElement element, int pageX, int pageY)
-
Returns true if the point in page coordinates is over element chrome on the specified component
|
public Object |
pointInElementOrChildBounds(HTMLElement element, Number pageX, Number pageY)
-
Returns true if the specified point in page space is in the bounds of this element or one of its non-absolute children elements.
|
public Object |
prepareStretchedChild(Object childElement, Object parentPadding)
-
Prepares a child for stretching.
|
public Object |
preventDefault(Object evt)
|
public static Object |
preventDefaultCallback(Object event)
-
Static callback handler for preventing the default action
|
public Object |
removeBubbleEventListener(Object nodeOrWindow, Object eventType, Object listener)
-
Removes an event listener that fired in the non-Capture phases for the specified eventType
|
public Object |
removeEventBubbles(Object node, Object listener)
-
Removes event listeners for all of the events that the Rich client framework is interested in from the relevant element using the specified listener
|
public Object |
removeEventCaptures(Node node, Object listener)
-
Removes event captures for all of the events that the Rich client framework is interested in to the relevant element using the specified listener
|
public Object |
removeIdsFromDomSubTree(HTMLElement subTreeRoot)
-
Removes all of the ID values from every element in the given DOM sub tree.
|
public Object |
removeKeyEventListener(Object element, Object listener)
-
Removes the key event listener from the specified element.
|
public Object |
removeResizeListener(String id)
-
Unregisters a resize listener by node id.
|
public Object |
removeSessionStorageProperty(String propKey)
-
This function removes key/value pair stored in session storage provide by DOM:storage methods.
|
public Object |
removeStyleProperty(Object element, Object styleProperty)
-
remove a styleProperty set on this element
|
public Object |
replaceNode(Object sourceNode, Object targetNode)
|
public Object |
repositionStretchedElement(Object element, Object topPixels, Object bottomPixels, Object leftPixels, Object rightPixels)
-
In certain cases a geometry managing peer may need to explicitly re-position a stretched element which was originally stretched on the server.
|
public Object |
resizeStretchedChild(Object childElement, Object parentPadding)
-
Resizes the specified child element to fill its parent's content space.
|
public Object |
resizeStretchedElement(Object element, Object width, Object height)
-
Resizes the element to fill the specified width and height.
|
public Object |
scrollToPos(Object element, Object posX, Object posY)
-
Scrolls the element to the specified position (in pixels).
|
public Object |
setAttribute(Object element, Object attrName, Object attrValue)
|
public Object |
setButtonTextContent(Object node, Object newText)
-
By default use the setTextContent implementation as the setButtonTextContent implementation.
|
public Object |
setCssFloat(Object element, Object value)
|
public Object |
setCursor(HTMLElement domElement, Object cursor)
-
Sets the cursor on the specified DOM ELement.
|
public Object |
setExpandoProperty(Object element, Object propertyName, Object propertyValue)
-
Sets an expando property on the specified element.
|
public Object |
setImageSource(Object img, Object src)
-
Sets the image source.
|
public Object |
setImageTooltip(Object img, Object tooltip)
-
Sets the image tooltip
|
public Object |
setOpacity(Object element, Object opacityPercent)
-
sets opacity of a DOM element
|
public Object |
setOuterHeight(Object element, Object outerHeight)
|
public Object |
setOuterWidth(Object element, Object outerWidth)
|
public Object |
setSessionStorageProperty(String propKey, String propValue)
-
This function stores the key/value pair in session storage provide by DOM:storage methods.
|
public Object |
setTableRowHeight(Object row, Object height)
|
public Object |
setTextContent(Object node, Object newText)
-
Sets the text content of a Node, as per DOM-level 3 spec
|
public Object |
showBusyCursor(Object ownerDocument, Object show)
-
Displays busy/default cursor.
|
public Object |
startDocumentKeyEventCapture(Object listenerMap, Object focusProxy)
-
Use agent-specific techniques for capturing key events for the focusProxy's document
|
public Object |
startMouseEventCapture(Object listenerMap)
-
Starts capturing mouse events and installs event listeners.
|
public Object |
stopMouseEventCapture(Object listenerMap)
-
Stops mouse events capture and removes event listeners.
|
public Object |
stopPropagation(Object evt)
|