OracleJavaScript API Reference for Oracle ADF Faces

 

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

oracle.adf.view.js.agent
Class AdfAgent

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.agent.AdfAgent
Direct Known Subclasses:
AdfGeckoAgent, AdfIEAgent, AdfOperaAgent, AdfSafariAgent

public abstract class AdfAgent
extends AdfObject
Abstraction for services with user-agent-specific implementations. To get an instance, use AdfAgent.AGENT.



Field Summary

private Object
_busyCursorShown
private static Object
_CSS3_TO_CSS2_MAP
Maps the CSS3 cursor name to the nearest CSS2 cursor name
private static Object
_CSS_TO_DOM_MAP
Maps the CSS property name to DOM property name.
private Object
_document
public static Object
GECKO_PLATFORM
public static Object
IE_PLATFORM
AdfAgent Platform constants
public static Object
KEY_EVENTS
Array of DOM key event names
public static Object
MAC_OS
private static Object
_MODIFIER_DISPLAY_NAMES
private static Object
_MOUSE_EVENTS
Set of DOM event types that are mouse events
private static Object
_NATIVE_TO_COMPONENT_MAPPINGS
private Object
_oldBodyCursor
public static Object
OPERA_PLATFORM
private Object
_os
private Object
_platform
private static Object
_REDISTRIBUTE_EVENTS
private static Object
_RESIZE_EVENTS
private static Object
_SETTABLE_STYLE_PROPS
public static Object
SOLARIS_OS
public static Object
UNKNOWN_OS
public static Object
UNKNOWN_PLATFORM
private Object
_version
public static Object
WEBKIT_PLATFORM
private Object
_window
public static Object
WINDOWS_OS
AdfAgent OS constants


Fields inherited from oracle.adf.view.js.base.AdfObject

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


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 void
beginDirtyStateTracking(AdfUIComponent component, HTMLElement domElement)
Adds required listeners to be able to track DOM value changes to form elements below the given DOM element.
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 id 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 HTMLElement
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 void
endDirtyStateTracking(AdfUIComponent component, HTMLElement domElement)
Removes the listeners for dirty state change tracking.
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
public Boolean
handleCachedPageForNewWindow(String windowName)
Handle Ctrl-N case to check whether a cached page is loaded into the new browser window, if it is, then force the browser to reload the page from server to make sure the new window detection works fine.
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 Boolean
isDirty(AdfUIComponent component, HTMLElement domElement)
Check, for a component and DOM element watched by dirty state tracking, if the element is dirty.
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
isSelectionToggle(Event evt)
Test whether or not the event is a selection 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, Number pageX, Number 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 void
setDirty(AdfUIComponent component, HTMLElement domElement, Boolean dirty)
Manually mark an element's dirty state.
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)
private Object
_valueChangeHandler(Object event)


Methods inherited from oracle.adf.view.js.base.AdfObject

adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString


Field Detail


_busyCursorShown

private Object _busyCursorShown

_CSS3_TO_CSS2_MAP

private static Object _CSS3_TO_CSS2_MAP

Maps the CSS3 cursor name to the nearest CSS2 cursor name

_CSS_TO_DOM_MAP

private static Object _CSS_TO_DOM_MAP

Maps the CSS property name to DOM property name. This map is to store the tricky cases which are specific to the browser. Subclasses can override this map to store the agent specific.

_document

private Object _document

GECKO_PLATFORM

public static Object GECKO_PLATFORM

IE_PLATFORM

public static Object IE_PLATFORM

AdfAgent Platform constants

KEY_EVENTS

public static Object KEY_EVENTS

Array of DOM key event names

MAC_OS

public static Object MAC_OS

_MODIFIER_DISPLAY_NAMES

private static Object _MODIFIER_DISPLAY_NAMES

_MOUSE_EVENTS

private static Object _MOUSE_EVENTS

Set of DOM event types that are mouse events

_NATIVE_TO_COMPONENT_MAPPINGS

private static Object _NATIVE_TO_COMPONENT_MAPPINGS

_oldBodyCursor

private Object _oldBodyCursor

OPERA_PLATFORM

public static Object OPERA_PLATFORM

_os

private Object _os

_platform

private Object _platform

_REDISTRIBUTE_EVENTS

private static Object _REDISTRIBUTE_EVENTS

_RESIZE_EVENTS

private static Object _RESIZE_EVENTS

_SETTABLE_STYLE_PROPS

private static Object _SETTABLE_STYLE_PROPS

SOLARIS_OS

public static Object SOLARIS_OS

UNKNOWN_OS

public static Object UNKNOWN_OS

UNKNOWN_PLATFORM

public static Object UNKNOWN_PLATFORM

_version

private Object _version

WEBKIT_PLATFORM

public static Object WEBKIT_PLATFORM

_window

private Object _window

WINDOWS_OS

public static Object WINDOWS_OS

AdfAgent OS constants

Method Detail


addBubbleEventListener

public Object addBubbleEventListener(Object nodeOrWindow,
                                     Object eventType,
                                     Object listener)

Adds an event listener that fires in the non-Capture phases for the specified eventType. There is no ordering guaranteee, nor is there a guarantee regarding the number of times that an event listener will be called if it is added to the same element multiple times.

Parameters:
nodeOrWindow    
eventType    
listener    
Return:
Object

addEventBubbles

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

Parameters:
node    
listener    
Return:
Object

addEventCaptures

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. Note that addEventCaptures() implementations may choose to suppress certain mouse events for performance reasons. In particular, capturing mousemove, mouseover and mouseout events may be expensive on some platforms (particularly those platforms which do not implement DOM Level 2 Events). In such cases, these events may not be delivered to the provided listener.

Parameters:
node  -  DOM node to listen on
listener  -  DOM event listener to send captured events to
Return:
Object

addKeyEventListener

public Object addKeyEventListener(Object element,
                                  Object listener)

Adds key event listener to the specified element.

Parameters:
element    
listener    
Return:
Object

addOption

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. (e.g., see IEAdfAgent.js)

Parameters:
element    
label    
value    
selected    
disabled    
description    
index    
Return:
Object

addResizeListener

public Object addResizeListener(String id,
                                Function listener)

Registers a listener for resize notification on a DOM element by id. Capture the original offset width and height of the target dom node. The listener will only be invoked when the size of the registered node has changed.

Parameters:
id  -  id of the node subscribing for resize notification
listener  -  callback function with no formal parameters
Return:
Object
See also:
removeResizeListener(String)
GetResizeEvents()

allElementsRemoved

public Object allElementsRemoved()

Resets any id->element cache when all elements are removed This method should be called AFTER the elements are removed

Return:
Object
See also:
getElementById(Object)
elementsAdded(Object)

atLeast

public Object atLeast(Object platform,
                      Object version)

Parameters:
platform    
version    
Return:
Object

autoCompleteForm

public Object autoCompleteForm(Object htmlForm)

Parameters:
htmlForm    
Return:
Object

beginDirtyStateTracking

public void beginDirtyStateTracking(AdfUIComponent component,
                                    HTMLElement domElement)

Adds required listeners to be able to track DOM value changes to form elements below the given DOM element. This does not include support for tracking ADF value changes.

This should typically be called from the component peer BindToComponent method. This should be used in conjunction with listening for AdfValueChangeEvent.VALUE_CHANGE_TYPE in the peer to detect ADF value change events. The setDirty(AdfUIComponent, HTMLElement, Boolean) can be used to update the dirty state from the handler of that event.


Parameters:
component  -  the component to start tracking for.
domElement  -  the element to track changes underneath. If not given it will default to the root DOM element of the component. Element must have an ID attribute set.
Return:
void - null

checkMouseOutEvent

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

Parameters:
element  -  container node
evt  -  event object
Return:
Object - true if mouse was moved outside of the container, false otherwise

clearSubtreeIds

public Object clearSubtreeIds(Object element)

Clear the id of the specified element and its children. This is called on cloned node for dragging so that the new node won't conflict with the original Node. The default behavior is to eliminating ids or names

Parameters:
element    
Return:
Object

cloneEvent

public Event cloneEvent(Event event,
                        HTMLElement newTarget)

Clones an event from an existing event for a new target element. This API designed for code that needs to remember the original event object and does not support creating events for dispatch. For creating events for dispatch, use #copyEvent

Parameters:
event  -  the event to clone the new event from
newTarget  -  the new event target
Return:
Event - the newly cloned event
See also:
copyEvent(Event)

cloneNode

public Node cloneNode(Node domNode)

Clones a DOM node. Default is to do deep clone.

Parameters:
domNode  -  the DOM ndoe to clone the new node from
Return:
Node - the cloned DOM node.

copyEvent

public Event copyEvent(Event event)

Returns a Copy of an event from an existing event. The newly created event can be dispatched to a new target.

Parameters:
event  -  the event to clone the new event from
Return:
Event - the newly copied event

_copyMouseEvent

private Object _copyMouseEvent(Object event,
                               Object eventType,
                               Object newTarget)

Parameters:
event    
eventType    
newTarget    
Return:
Object

copyStyle

public Object copyStyle(HTMLElement sourceElement,
                        HTMLElement targetElement)

Copies the computed style properties from the source element to the target element

Parameters:
sourceElement  -  DOM element to copy styles from
targetElement  -  DOM element to copy styles to
Return:
Object

createDefaultLogWriter

public Object createDefaultLogWriter()

Creates and returns the default AdfLogWriter to use for this AdfPage. Subclassers should override CreateDefaultLogWriter instead

Return:
Object
See also:
"CreateDefaultLogWriter"

CreateDefaultLogWriter

protected Object CreateDefaultLogWriter(Object nativeLogWriter)

Method for subclasses to override to change the default AdfLogWriter for this agent

Parameters:
nativeLogWriter    
Return:
Object

CreateNativeLogWriter

protected Object CreateNativeLogWriter()

Creates and returns the native AdfLogWriter to use for this AdfAgent. Subclasses should override this to return a AdfLogWriter that takes advantage of any User AdfAgent console or debugger logging facilities

Return:
Object

createStyle

public HTMLElement createStyle(String content)

Inserts a new style block into the document using the specified style content.

Parameters:
content  -  the CSS text to be used inside of the newly created style element.
Return:
HTMLElement - the newly-created style element

createTouchMoveManager

public AdfTouchMoveManager createTouchMoveManager(HTMLElement element,
                                                  Function handlerCallback,
                                                  Number touchCount)

Constructs a manager for handling touch movements. This manager does nothing for user agents that do not support touch movements.

Parameters:
element  -  the element for which touches will be listened
handlerCallback  -  a function that will be invoked when a touch movement occurs with a non-zero movement, the first parameter is the average delta x movement, the second parameter is the average delta y movement
touchCount  -  the exact number of touches that must move for the handlerCallback to be invoked
Return:
AdfTouchMoveManager - a touch movement manager to store references to the DOM element and the handler function that will be invoked when the specified number of touches have non-zero movement, also has an unregister function that must be invoked to clean up stored state when your element no longer needs to listen to touch movements

CreateUIInputEvent

protected Object CreateUIInputEvent(Object component,
                                    Object type,
                                    Object nativeEvent)

Parameters:
component    
type    
nativeEvent    
Return:
Object

createXmlDocument

public Object createXmlDocument()

Return:
Object

disableBrowserContextMenu

public Object disableBrowserContextMenu(Object ownerDocument,
                                        Object disable)

Disables browser's context menu

Parameters:
ownerDocument  -  DOM document
disable  -  If true, disable, if false, enable;
Return:
Object

disableUserSelect

public Object disableUserSelect(Object element)

Disable the user's ability to select text in this component

Parameters:
element    
Return:
Object

dispatchEvent

public Object dispatchEvent(Object targetElement,
                            Object event)

Dispatches the specified event to the target, returning whether the dispatch was successful

Parameters:
targetElement    
event    
Return:
Object

eatEvent

public Object eatEvent(Object evt)

Parameters:
evt    
Return:
Object

eatEventCallback

public static Object eatEventCallback(Object event)

Static callback handler for consuming a blocked event

Parameters:
event    
Return:
Object

elementFromPagePoint

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. By default, all elements are included in the search for the topmost element. In some cases, for example, when a "glass pane" is used, the caller may need to exclude certain components (eg. the "glass pane" from the search. To accomplish this, an optional "exclusion filter" function may be specified. This exclusion filter is a function which is called for each element in the search. If the exclusion filter returns true, the element and its descendents are excluded from the search.

Please keep in mind that this method is inefficient when the there is no native implementation by the browser. This is because the method iterates the entire document depth first to find the element at a particular point


Parameters:
pageX  -  the y coordinate to test for
pageY    
hintElement  -  Optional hint element to begin searching from as an optimization. If no element is found inside the hintElement, its ancestors will be considered.
Default value = undefined
exclusionContext    
exclusionCallback    
Return:
HTMLElement - the topmost domElement at the given point

_elementFromPagePointImpl

private Object _elementFromPagePointImpl(Object fromElem,
                                         Object x,
                                         Object y,
                                         Object data,
                                         Object ignoreParentBounds,
                                         Object excludeChild,
                                         Object exclusionContext,
                                         Object exclusionCallback)

Parameters:
fromElem    
x    
y    
data    
ignoreParentBounds    
excludeChild    
exclusionContext    
exclusionCallback    
Return:
Object

elementsAdded

public Object elementsAdded(Object element)

Updates any id->element cache by adding the elements in the specified subtree

Parameters:
element    
Return:
Object
See also:
getElementById(Object)
elementsRemoved(Object)

elementsRemoved

public Object elementsRemoved(Object element)

Updates any id->element cache by removing the elements in the specified subtree

Parameters:
element    
Return:
Object
See also:
getElementById(Object)
elementsAdded(Object)

enableUserSelect

public Object enableUserSelect(Object element)

Enable the user's ability to select text in this component

Parameters:
element    
Return:
Object

endDirtyStateTracking

public void endDirtyStateTracking(AdfUIComponent component,
                                  HTMLElement domElement)

Removes the listeners for dirty state change tracking.

This should typically be called from the component peer ComponentRemoved method.


Parameters:
component  -  the component to end tracking for.
domElement  -  the element to track changes underneath. If not given it will default to the root DOM element of the component.
Default value = undefined
Return:
void - null

endDocumentKeyEventCapture

public Object endDocumentKeyEventCapture(Object listenerMap,
                                         Object focusProxy)

Remove agent-specific techniques for capturing key events for the focusProxy's document

Parameters:
listenerMap  -  JS Object map of event name to event listener
focusProxy  -  Component to stop getting key events for
Return:
Object

execScript

public void execScript(Object ownerWindow,
                       Object scriptText)

Executes a script.

Parameters:
ownerWindow  -  the DOM Window
scriptText  -  the script text
Return:
void - null

forceCursorChange

public Object forceCursorChange(Object ownerDocument)

Force the cursor to change without requiring a mouse move.

Parameters:
ownerDocument    
Return:
Object

getAgent

public static AdfAgent getAgent(Window domWindow)

Parameters:
domWindow  -  DOM Window object to use to determine the Agent to use
Return:
AdfAgent - AdfAgent instance to use for this User Agent
See also:
"#AGENT"

getAttribute

public Object getAttribute(Object node,
                           Object attrName)

Parameters:
node    
attrName    
Return:
Object

getAttributeName

public Object getAttributeName(Object attr)

Parameters:
attr    
Return:
Object

getBooleanAttribute

public Object getBooleanAttribute(Object element,
                                  Object attrName,
                                  Object defaultValue)

Returns the attribute value as a boolean (if possible). This method will return true if the attribute value string is equal to "true" or will return false if the attribute is equal to "false". The method will return the defaultValue (or null, if a default is not specified) if the attribute is not set or if the attribute value is not either the string "true" or the string "false". In the latter case, an warning is logged to indicate that the user is trying to extract a boolean from something that isn't an integer.

Parameters:
element  -  the dom node
attrName  -  the name of the attribute to look up
defaultValue  -  the default value
Return:
Object

getBoxSizing

public String getBoxSizing(HTMLElement element,
                           CSSStyleDeclaration currentStyle)

Returns the box model associated with an element (http://www.w3.org/TR/css3-ui/#box-sizing)

Parameters:
element  -  The element to check
currentStyle  -  the current style that can be optionally passed in
Default value = null
Return:
String - the box sizing, either "content-box" or "border-box"

getBrowserViewportScrollLeft

public Number getBrowserViewportScrollLeft()

Return:
Number - returns the starting position on the canvas of the viewport

getBrowserViewportScrollTop

public Number getBrowserViewportScrollTop()

Return:
Number - returns the top position on the canvas the viewport begins

getComponentEvent

public Object getComponentEvent(Object component,
                                Object nativeEvent,
                                Object prevComponent)

Parameters:
component    
nativeEvent    
prevComponent    
Return:
Object

getComputedStyle

public Object getComputedStyle(Object element)

Tries to return the current style, taking into account the inline styles and style sheets

Parameters:
element    
Return:
Object

getCSS2Cursor

public static Object getCSS2Cursor(Object cursorName)

Returns the CSS2 cursor property value to return for a CSS3 cursor name

Parameters:
cursorName    
Return:
Object

getCSSLengthAsInt

public static Object getCSSLengthAsInt(Object cssLength)

Parameters:
cssLength  -  cssLength as a String
Return:
Object - cssLength as an int

GetCssToDomPropertyNameMap

protected Object GetCssToDomPropertyNameMap()

Returns the map which contains the CSS property name and it's DOM version. Subclasses can override this method to return a map which is specific to the agent.

Return:
Object

getCursor

public Object getCursor(Object cursorName)

Returns the CSS cursor property value to return for a CSS3 cursor name

Parameters:
cursorName    
Return:
Object

getDescendantComponentsForNode

public Array<AdfUIComponent> getDescendantComponentsForNode(Node node,
                                                            Array<AdfUIComponent> children)

Get components descended from a node. Children are returned in an array.

There is no guarantee about the order of the children returned. If visiting the children in a known order is required please use AdfUIComponent.visitChildren.

All descendent children are returned, visible or not. If ignoring hidden children is required please use AdfUIComponent.visitChildren.

This method is faster than AdfUIComponent.visitChildren, if the limitations above are acceptable it is preferable to use this method.


Parameters:
node  -  DOM node where to start searching
children  -  array to store child components in. Descendent components will be added to the end of the array. This param is optional, if not passed in an array will be created.
Return:
Array<AdfUIComponent> - array of descendent components, may be empty

getDomDocument

public Object getDomDocument()

Return:
Object

getDomForCSSPropertyName

public String getDomForCSSPropertyName(String cssPropertyName)

Returns the DOM property name of the CSS property.

Parameters:
cssPropertyName  -  The name of the css property to get
Return:
String - Returns the value of the DOM property name

getDomWindow

public Object getDomWindow()

Return:
Object

getElementById

public Object getElementById(Object id)

Cover function to allow more performant implementations of document.getElementById()

Parameters:
id    
Return:
Object
See also:
elementsRemoved(Object)
elementsAdded(Object)

getElementLeft

public Object getElementLeft(Object element)

Returns the element's left side in Window coordinates

Parameters:
element    
Return:
Object

getElementPageBounds

public Object getElementPageBounds(Object element)

Return a rectangle object containing the page bounds of an element in top/left/bottom/right form

Parameters:
element    
Return:
Object

getElementPosition

public Object getElementPosition(Object element)

Returns HTML element's coordinates relative to the document's body

Parameters:
element  -  HTML element
Return:
Object - an object with two properties (x for the left coordinate and y for the top coordinate)

getElementsByName

public Object getElementsByName(Object name)

Parameters:
name    
Return:
Object

getElementTop

public Object getElementTop(Object element)

Returns the element's top side in Window coordinates

Parameters:
element    
Return:
Object

getEventFromElement

public HTMLElement getEventFromElement(Object nativeEvent)

Some events, like the mouseover event, can tell you the dom node being moved from.

Parameters:
nativeEvent    
Return:
HTMLElement - the domElement being moved from, or null for events that don't have this information

_getEventRelatedTarget

private Object _getEventRelatedTarget(Object nativeEvent)

Parameters:
nativeEvent    
Return:
Object

getEventTarget

public Object getEventTarget(Object event)

Parameters:
event    
Return:
Object

getEventToElement

public HTMLElement getEventToElement(Object nativeEvent)

Some events, like the mouseout event, can tell you the dom node being moved to.

Parameters:
nativeEvent    
Return:
HTMLElement - the domElement being moved to, or null for events that don't have this information

getExpandoProperty

public Object getExpandoProperty(Object element,
                                 Object propertyName,
                                 Object defaultValue)

Returns an expando property from the specified element. If the current value of the property is undefined, the defaultValue will be returned.

Parameters:
element  -  The DOM element that this expando property is associated with
propertyName  -  The name of the property to retrieve
defaultValue    
Return:
Object - The value of the property identified by propertyName

getFormElement

public Object getFormElement(Object form,
                             Object elementName)

Finds the form element by name.

Parameters:
form  -  the form
elementName  -  the name of the form element
Return:
Object

getIntAttribute

public Object getIntAttribute(Object element,
                              Object attrName,
                              Object defaultValue)

Returns the attribute value as an integer (if possible). Method will return the defaultValue (or null if a default is not specified) if the attribute is not set or its value cannot be converted into an integer. In the latter case, a warning is logged to indicate that the user is trying to extract an integer from something that isn't an integer.

Parameters:
element  -  the dom node
attrName  -  the name of the attribute to look up
defaultValue  -  the default value
Return:
Object

getKeyCode

public Object getKeyCode(Object keyEvent)

Returns the unicode key code for the given key event.

Parameters:
keyEvent    
Return:
Object

getLocalName

public Object getLocalName(Object element)

Parameters:
element    
Return:
Object

getModifierDisplayName

public Object getModifierDisplayName(Object modifier)

Returns the appropriate platform-specific translated display name for a AdfKeyStroke modifier.

Parameters:
modifier    
Return:
Object

getMousePosition

public Object getMousePosition(Object evt)

Returns event's mouse coordinates relative to the document

Parameters:
evt  -  event object
Return:
Object - an object with two properties (x for the left coordinate and y for the top coordinate)

getNodeName

public Object getNodeName(HTMLElement element)

This method returns the name of the node in all upper case letters.

Parameters:
element  -  the node to get the node name from
Return:
Object - the name of the given node

getNodeXml

public Object getNodeXml(Object node)

Parameters:
node    
Return:
Object

getOS

public Object getOS()

Return:
Object

getOuterHeight

public Object getOuterHeight(Object element,
                             Object innerHeight,
                             Object currentStyle)

Parameters:
element    
innerHeight    
currentStyle    
Return:
Object

getOuterWidth

public Object getOuterWidth(Object element,
                            Object innerWidth,
                            Object currentStyle)

Parameters:
element    
innerWidth    
currentStyle    
Return:
Object

getOverrideStyle

public Object getOverrideStyle(Object element)

Returns the override style for this element

Parameters:
element    
Return:
Object

getPlatform

public Object getPlatform()

Return:
Object

getPreferredKeyEventForRepetition

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.

Return:
Object - the preferred AdfUIInputEvent key event type

getPrefix

public Object getPrefix(Object element)

Parameters:
element    
Return:
Object

GetResizeEvents

protected Array GetResizeEvents()

An array of event types used by the addResizeListener and removeResizeListener functions. The default is targeted for the FF browser supporting mutation events. The IE agent will override using the resize event as the trigger.

Return:
Array - array of event types needed for the resize listener registration
See also:
addResizeListener(String, Function)
removeResizeListener(String)

getSessionStorageProperty

public Object getSessionStorageProperty(String propKey)

This function returns the value for a given key stored in session storage provide by DOM:storage methods.

Parameters:
propKey  -  this key will be used to get the value in storage
Return:
Object
Throws:
Error if access to sessionStorage fails or if there is insufficient memory when writing to the sessionStorage.

getStyleProperty

public Object getStyleProperty(Object style,
                               Object propertyName)

Returns the value of a property for the AdfAgent's style object

Parameters:
style    
propertyName    
Return:
Object

getTableRow

public Object getTableRow(Object tableElement,
                          Object rowIndex)

Cover to workaround IE8 table.rows bug

Parameters:
tableElement    
rowIndex    
Return:
Object

getTableRowCells

public Object getTableRowCells(Object tableRow)

Cover to workaround IE8 row.cells bug

Parameters:
tableRow    
Return:
Object

getTableRows

public Object getTableRows(Object tableElement)

Cover to workaround IE8 table.rows bug

Parameters:
tableElement    
Return:
Object

getTextContent

public Object getTextContent(Object node)

Returns the text content of a Node, as per DOM-level 3 spec

Parameters:
node    
Return:
Object

getVersion

public Object getVersion()

Return:
Object

getWindowClientHeight

public Number getWindowClientHeight(Window domWindow)

Returns the client (or inner) height of the DOM window Object

Parameters:
domWindow    
Return:
Number - null

getWindowClientWidth

public Number getWindowClientWidth(Window domWindow)

Returns the client (or inner) width of the DOM window Object

Parameters:
domWindow    
Return:
Number - null

getWindowHeight

public Object getWindowHeight()

Returns the content height of the browser window

Return:
Object

getWindowScrollHeight

public Number getWindowScrollHeight(Window domWindow)

Returns the scroll (or canvas) height of the DOM window Object

Parameters:
domWindow    
Return:
Number - null

getWindowScrollWidth

public Number getWindowScrollWidth(Window domWindow)

Returns the scroll (or canvas) width of the DOM window Object

Parameters:
domWindow    
Return:
Number - null

getWindowWidth

public Object getWindowWidth()

Returns the content width of the browser window

Return:
Object

guessOS

public static String guessOS()

Guess the OS of the agent

Return:
String - One of
  • AdfAgent.WINDOWS_OS
  • AdfAgent.SOLARIS_OS
  • AdfAgent.MAC_OS
  • AdfAgent.UNKNOWN_OS

guessVersion

public static Number guessVersion()

Guess the version of the AdfAgent

Return:
Number - Floating point version of the user agent's version

handleCachedPageForNewWindow

public Boolean handleCachedPageForNewWindow(String windowName)

Handle Ctrl-N case to check whether a cached page is loaded into the new browser window, if it is, then force the browser to reload the page from server to make sure the new window detection works fine.

Parameters:
windowName  -  , window's name to be set to the new brwoser window
Return:
Boolean - true if this is an IE Ctrl-N case and loading a cached page, otherwise return false

Init

protected Object Init(Object platform,
                      Object os,
                      Object version,
                      Object domWindow)

Create an instance of an AdfAgent

Parameters:
platform    
os    
version    
domWindow    
Return:
Object
Overrides:
AdfObject.Init()

InitClass

protected static Object InitClass()

Return:
Object

installKeyboardBlocker

public Object installKeyboardBlocker(Object ownerDocument,
                                     Object install)

Installs the keyboard blocking handlers for the agent.

Parameters:
ownerDocument    
install    
Return:
Object

isAttributeSpecified

public Object isAttributeSpecified(Object attr)

Parameters:
attr    
Return:
Object

isChromeEvent

public Boolean isChromeEvent(Event domEvent)

Returns true if the event was on the element chrome

Parameters:
domEvent  -  The DOM event to check the original target of
Return:
Boolean - null true if the event was on the element chrome

isClipped

public Boolean isClipped(HTMLElement element)

Returns true if the element is clipped

Parameters:
element  -  The element to be tested for clipping
Return:
Boolean - true if the element is clipped else false

isDirty

public Boolean isDirty(AdfUIComponent component,
                       HTMLElement domElement)

Check, for a component and DOM element watched by dirty state tracking, if the element is dirty.

This will always return false if the beginDirtyStateTracking(AdfUIComponent, HTMLElement) has not been called.


Parameters:
component  -  the component to check if dirty
domElement  -  the element to see if dirty. If not given it will default to the root DOM element of the component
Default value = undefined
Return:
Boolean - true if the element is dirty

isDisabledOptionSupported

public Object isDisabledOptionSupported()

Returns whether or not disabled is supported on an option tag

Return:
Object

isElementHTML

public Object isElementHTML(Object element)

Parameters:
element    
Return:
Object

isEqualIcon

public Object isEqualIcon(Object firstIcon,
                          Object secondIcon)

IE's img icons innerHTML can be different. One can have the src be the complete url another can be a relative url. This will return whether or not the icons contents are essentially equal for icon swapping purposes.

Parameters:
firstIcon    
secondIcon    
Return:
Object

isEventInElement

public Object isEventInElement(Object event,
                               Object element)

Returns true if the event occurs inside the specified element

Parameters:
event  -  Event to check for containment
element    
Return:
Object

isFunctionKey

public Object isFunctionKey(Object keyEvent)

Returns whether the event's keycode should be considered as a function key.

Parameters:
keyEvent    
Return:
Object

_isGeckoAgentSupported

private static Object _isGeckoAgentSupported(Object agentName,
                                             Object geckoVersion)

Parameters:
agentName    
geckoVersion    
Return:
Object

isInlineDialogRepositioningOnScroll

public Boolean isInlineDialogRepositioningOnScroll()

Determines if a particular agent should support auto repositioning of inline dialogs on document scroll. By default, this feature is enabled but a mobile platform or portlet might need to disable.

Return:
Boolean - does this agent support auto positioning of inline dialogs on scroll.

isLeftButton

public Object isLeftButton(Object evt)

Parameters:
evt    
Return:
Object

isLeftButtonClick

public Object isLeftButtonClick(Object evt)

Tests whether event is a left button click event. Browsers may differ in whether they fire click events for right button clicks. This method provides a simple way to test whether a click event corresponds to a left button click.

Parameters:
evt    
Return:
Object

isMouseEvent

public Object isMouseEvent(Object event)

Returns true iof the event is a mouse event

Parameters:
event    
Return:
Object

isSelectionToggle

public Boolean isSelectionToggle(Event evt)

Test whether or not the event is a selection event. For an example of usage of this code, see the _doRowSelection method in AdfDhtmlTablePeer. When a user clicks the ctrl button on an Apple the behavior is different than on a non-Apple OS. Component developers can distinguish between a ctrl-click (option-click in Apple) and right-click (ctrl-click in Apple).

Parameters:
evt  -  A native DOM MouseDown event
Return:
Boolean - true if this event is a selection event

isSessionStorageEnabled

public Boolean isSessionStorageEnabled(Object propKey)

This function returns a boolean indicating whether the sessionStorage feature is enabled. By default this method returns true. Agent subclasses may override this method to handle agent specific checks if needed.

Parameters:
propKey    
Return:
Boolean - does this agent support auto positioning of inline dialogs on scroll.

mapNativeToComponentEventType

public Object mapNativeToComponentEventType(Object eventType)

Maps a native event type to a component event type

Parameters:
eventType    
Return:
Object

modifyIdsInDomSubTree

public Object modifyIdsInDomSubTree(HTMLElement subTreeRoot,
                                    Object prepend,
                                    Object idString)

Modify the ID values for every element in the given DOM sub tree. Prepend the "idString" to the original id if "prepend" is true, otherwise append.

Parameters:
subTreeRoot  -  the root of the sub tree to modify IDs from
prepend    
idString    
Return:
Object

_onResizeHandler

private Object _onResizeHandler(Event event)

Callback handler invoked by a resize event. The event types are defined by the GetResizeEvents function. The handler will look for a registered id by walking up the dom tree starting from the event's target. If a match is found, a check is made to verify that we are not waiting on delayed event processing. Compare the current offset width and height of the node with the original. If the size has changed, schedule the callback listener and then save the new dimensions. Resize events are blocked in intervals of 100ms. If the subscriber is waiting, the event is ignored; Otherwise, a callback is scheduled to handle the event.

Parameters:
event  -  corresponding to one of the registered resize events.
Return:
Object
See also:
_onResizeHandlerTimeout(Object)
GetResizeEvents()

_onResizeHandlerTimeout

private static Object _onResizeHandlerTimeout(Object state)

The delayed on resize handler uses the dom id to locate the associated node and agent state. If the dom node can not be found, an auto unregistration is performed. Invoke the callback listener and then save the new dimensions.

Parameters:
state  -  of the scheduled callback; has a reference to the agent instance and the registered client id.
Return:
Object

_parseFloatVersion

private static Object _parseFloatVersion(Object agentName,
                                         Object versionNumberPattern)

Parameters:
agentName    
versionNumberPattern    
Return:
Object

parseXML

public Object parseXML(Object xmlString)

Parses XML string into a DOM document

Parameters:
xmlString  -  string XML representation
Return:
Object - XML document if parsed successfully, null otherwise

pointInElementBounds

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

Parameters:
element    
pageX    
pageY    
Return:
Object

pointInElementChrome

public Boolean pointInElementChrome(HTMLElement element,
                                    Number pageX,
                                    Number pageY)

Returns true if the point in page coordinates is over element chrome on the specified component

Parameters:
element  -  The DOM event to check the original target of
pageX  -  X coordinate to check in page coordinates
pageY  -  Y coordinate to check in page coordinates
Return:
Boolean - null true if the event was on the element chrome

pointInElementOrChildBounds

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. This has a subtle implementation difference than pointInElementBounds for use cases when, in certain browsers, an element's bounds may not be stretched to reflect the bounds of its children.

Parameters:
element  -  The element to check
pageX  -  The X coordinate of the location of the point on the page
pageY  -  The Y coordinate of the location of the point on the page
Return:
Object
See also:
pointInElementBounds(Object, Object, Object)

prepareStretchedChild

public Object prepareStretchedChild(Object childElement,
                                    Object parentPadding)

Prepares a child for stretching. This performs initialization work which prepares a child to be stretched, such as setting "position:absolute". This work is typically performed on the server via RichRenderer.encodeStretchedChild() during initial page render. However, in the case of partial page updates, there is no guarantee that a parent component will have the ability to apply styles (on the server) to a child component which is a partial target. As such, we need to perform this work on the client after the child is partially replaced. This method can be called by parent peers to prepare a child for stretching after a partial update which replaces the child occurs.

Parameters:
childElement    
parentPadding    
Return:
Object

preventDefault

public Object preventDefault(Object evt)

Parameters:
evt    
Return:
Object

preventDefaultCallback

public static Object preventDefaultCallback(Object event)

Static callback handler for preventing the default action

Parameters:
event    
Return:
Object

removeBubbleEventListener

public Object removeBubbleEventListener(Object nodeOrWindow,
                                        Object eventType,
                                        Object listener)

Removes an event listener that fired in the non-Capture phases for the specified eventType

Parameters:
nodeOrWindow    
eventType    
listener    
Return:
Object

removeEventBubbles

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

Parameters:
node    
listener    
Return:
Object

removeEventCaptures

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

Parameters:
node  -  DOM node to remove event captures from
listener    
Return:
Object

removeIdsFromDomSubTree

public Object removeIdsFromDomSubTree(HTMLElement subTreeRoot)

Removes all of the ID values from every element in the given DOM sub tree.

Parameters:
subTreeRoot  -  the root of the sub tree to remove IDs from
Return:
Object

removeKeyEventListener

public Object removeKeyEventListener(Object element,
                                     Object listener)

Removes the key event listener from the specified element.

Parameters:
element    
listener    
Return:
Object

removeResizeListener

public Object removeResizeListener(String id)

Unregisters a resize listener by node id.

Parameters:
id  -  of a dom element that subscribed for resize notification
Return:
Object
See also:
addResizeListener(String, Function)
GetResizeEvents()

removeSessionStorageProperty

public Object removeSessionStorageProperty(String propKey)

This function removes key/value pair stored in session storage provide by DOM:storage methods.

Parameters:
propKey  -  this key will be used to remove the key/value from storage
Return:
Object
Throws:
Error if access to sessionStorage fails or if there is insufficient memory when writing to the sessionStorage.

removeStyleProperty

public Object removeStyleProperty(Object element,
                                  Object styleProperty)

remove a styleProperty set on this element

Parameters:
element    
styleProperty    
Return:
Object

replaceNode

public Object replaceNode(Object sourceNode,
                          Object targetNode)

Parameters:
sourceNode    
targetNode    
Return:
Object

repositionStretchedElement

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. For CSS-based geometry managing components positions are typically set once on the server and are not re-applied again on the client during browser resize. However, in cases where a child is shown or hidden, either locally on the client or via PPR, it may be necessary for the peer to re-apply the CSS-based stretching properties (ie. positions) on the client. Since we do not want to set both top and bottom (or set both left and right) on platforms where CSS stretching is not supported, we use an agent method to perform this work. This will set the the specified positions on platforms where CSS stretching is supported. On other platforms, top/left will be set, but bottom/right will not. The assumption is that on non-CSS stretching platforms the stretching will be performed programmatically by calling AdfAgent.resizeStretchedElement() during a subsequent resize notification. All positions are CSS lengths, typically "px" units.

Parameters:
element    
topPixels    
bottomPixels    
leftPixels    
rightPixels    
Return:
Object

resizeStretchedChild

public Object resizeStretchedChild(Object childElement,
                                   Object parentPadding)

Resizes the specified child element to fill its parent's content space. This method assumes that the child element has already been prepared to be stretched - either via a call to AdfAgent.prepareStretchedChild() or the equivalent (eg. child was rendered via server-side RichRenderer.encodeStretchedChild()). Note that for the moment this utility requires the caller to explicitly specify the parent padding size. The reason for this is that in order to support server-side stretching, the padding must be known on the server. In order to retrieve the padding on the server, the padding must be exposed as a skin property. As such the caller may have a more efficient way of telling us the padding value than requiring us to get this via the computed style. The parentPadding is specified as a css length string (eg. "4px"). Also note that we assume that the padding is the same on all sides.

Parameters:
childElement    
parentPadding    
Return:
Object

resizeStretchedElement

public Object resizeStretchedElement(Object element,
                                     Object width,
                                     Object height)

Resizes the element to fill the specified width and height. If width is undefined, no horizontal stretching occurs. If height is undefined, no vertical stretching occurs. This method assumes that at a minimum the element has already been positioned, ie. position, top, left have already been set, presumably on the server. Furthermore, for browsers which support CSS-based stretching, we assume that right/bottom have already been set as well (in which case this operation becomes a no-op). At the moment there is no server-side counterpart for this method, though there probably should be. For now Renderer authors need to make sure they set the appropriate properties on their own. This may change once the API requirements are flushed out.

Parameters:
element    
width    
height    
Return:
Object

scrollToPos

public Object scrollToPos(Object element,
                          Object posX,
                          Object posY)

Scrolls the element to the specified position (in pixels).

Parameters:
element  -  The element to be scrolled
posX  -  The integer representing the X position to scroll to.
posY  -  The integer representing the Y position to scroll to.
Return:
Object

setAttribute

public Object setAttribute(Object element,
                           Object attrName,
                           Object attrValue)

Parameters:
element    
attrName    
attrValue    
Return:
Object

setButtonTextContent

public Object setButtonTextContent(Object node,
                                   Object newText)

By default use the setTextContent implementation as the setButtonTextContent implementation. We override this implementation for Gecko

Parameters:
node    
newText    
Return:
Object

setCssFloat

public Object setCssFloat(Object element,
                          Object value)

Parameters:
element    
value    
Return:
Object

setCursor

public Object setCursor(HTMLElement domElement,
                        Object cursor)

Sets the cursor on the specified DOM ELement. This is necessary in order to get the cursor to change correctly during mouse capture on IE.

Parameters:
domElement    
cursor    
Return:
Object

setDirty

public void setDirty(AdfUIComponent component,
                     HTMLElement domElement,
                     Boolean dirty)

Manually mark an element's dirty state.

Parameters:
component  -  the component to clear the dirty state
domElement  -  the element to clear the dirty state. If not given it will default to the root DOM element of the component.
Default value = undefined
dirty  -  the state to set.
Return:
void - null

setExpandoProperty

public Object setExpandoProperty(Object element,
                                 Object propertyName,
                                 Object propertyValue)

Sets an expando property on the specified element. Because setting an expando property may result in an Object being associated with the element, any code that sets an expando property needs to ensure that code calls AdfAgent.setExpandoProperty() with an undefined property value to clear the expando state.

Parameters:
element  -  The DOM element that this expando property is associated with
propertyName  -  The name of the property to set
propertyValue  -  The value of the property
Return:
Object

setImageSource

public Object setImageSource(Object img,
                             Object src)

Sets the image source.

Parameters:
img  -  the img element
src  -  the image source url
Return:
Object

setImageTooltip

public Object setImageTooltip(Object img,
                              Object tooltip)

Sets the image tooltip

Parameters:
img  -  the img element
tooltip  -  the image tooltip
Return:
Object

setOpacity

public Object setOpacity(Object element,
                         Object opacityPercent)

sets opacity of a DOM element

Parameters:
element  -  The element to set opacity for
opacityPercent  -  opacity percentage
Return:
Object

setOuterHeight

public Object setOuterHeight(Object element,
                             Object outerHeight)

Parameters:
element    
outerHeight    
Return:
Object

setOuterWidth

public Object setOuterWidth(Object element,
                            Object outerWidth)

Parameters:
element    
outerWidth    
Return:
Object

setSessionStorageProperty

public Object setSessionStorageProperty(String propKey,
                                        String propValue)

This function stores the key/value pair in session storage provide by DOM:storage methods.

Parameters:
propKey  -  this key will be used to store the key/value in storage
propValue  -  value to be stored.
Return:
Object
Throws:
Error if access to sessionStorage fails or if there is insufficient memory when writing to the sessionStorage.

setTableRowHeight

public Object setTableRowHeight(Object row,
                                Object height)

Parameters:
row    
height    
Return:
Object

setTextContent

public Object setTextContent(Object node,
                             Object newText)

Sets the text content of a Node, as per DOM-level 3 spec

Parameters:
node    
newText    
Return:
Object

showBusyCursor

public Object showBusyCursor(Object ownerDocument,
                             Object show)

Displays busy/default cursor. This function is for framework use only; it is not intended for application use.

Parameters:
ownerDocument  -  The document to display/hide the busy cursor on
show  -  boolean for displaying busy cursor or not
Return:
Object

startDocumentKeyEventCapture

public Object startDocumentKeyEventCapture(Object listenerMap,
                                           Object focusProxy)

Use agent-specific techniques for capturing key events for the focusProxy's document

Parameters:
listenerMap    
focusProxy    
Return:
Object

startMouseEventCapture

public Object startMouseEventCapture(Object listenerMap)

Starts capturing mouse events and installs event listeners. Listeners are provided in a map, as in {mouseup:func1, mousemove:func2}

Parameters:
listenerMap  -  map of listener types to callback functions
Return:
Object

stopMouseEventCapture

public Object stopMouseEventCapture(Object listenerMap)

Stops mouse events capture and removes event listeners. Listeners are provided in a map, as in {mouseup:func1, mousemove:func2}

Parameters:
listenerMap  -  map of listener types to callback functions
Return:
Object

stopPropagation

public Object stopPropagation(Object evt)

Parameters:
evt    
Return:
Object

_valueChangeHandler

private Object _valueChangeHandler(Object event)

Parameters:
event    
Return:
Object

SUMMARY: FIELD | CONSTR | METHOD    DETAIL: FIELD | CONSTR | METHOD

 

Generated on 2011.08.31 02:41 UTC
Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.