OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.agent.gecko
Class AdfGeckoAgent

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.agent.AdfAgent
               |
               +--oracle.adfinternal.view.js.agent.gecko.AdfGeckoAgent
Direct Known Subclasses:
AdfGecko5Agent

public class AdfGeckoAgent
extends AdfAgent
Gecko AdfAgent AdfAgent capabilities.



Field Summary

private static Object
_CSS_TO_DOM_MAP
Maps the CSS property name to DOM property name.
private static Object
_FAKE_MOUSEMOVE_EVENT
private Object
_ID_TO_DOM_MAP
private static Object
_MOZ_USER_DEFINED
private static Object
_REDISTRIBUTE_BUBBLE_EVENTS
private static Object
_REDISTRIBUTE_CAPTURE_EVENTS


Fields inherited from oracle.adf.view.js.agent.AdfAgent

ANDROID_OS, CAP_TOUCH_SCREEN, CAP_TOUCH_SCREEN_MULTIPLE, CAP_TOUCH_SCREEN_NONE, CAP_TOUCH_SCREEN_SINGLE, DRAG_GHOST_STYLECLASS, GECKO_PLATFORM, IE_PLATFORM, KEY_EVENTS, MAC_OS, OPERA_PLATFORM, SOLARIS_OS, UNKNOWN_OS, UNKNOWN_PLATFORM, WEBKIT_PLATFORM, WINDOWS_OS


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfGeckoAgent(Object version, Object domWindow)
Gecko AdfAgent AdfAgent capabilities.


Method Summary

public Object
addEventBubbles(Object node, Object listener)
Override to reset throbber via iframe and add focus and blur as capture events
private Object
_addEventListeners(Node node, Array<String> eventTypes, Function listener, Boolean capture)
Add the listener to the Element or Document for all of the specified eventTypes using the specified capture strategy
public Object
addKeyEventListener(Object node, Object listener)
Adds key event listener to the specified element.
public Object
allElementsRemoved()
Resets any id->element cache when all elements are removed This method should be called AFTER the elements are removed
public boolean
atLeast(Object platform, Object version)
Overridden from the base agent to handle the fully qualifed Gecko version.
protected Object
CreateDefaultLogWriter(Object nativeLogWriter)
Creates and returns the default AdfLogWriter to use for this AdfPage.
protected Object
CreateNativeLogWriter()
Override to return an AdfLogWriter that writes to the Gecko console
protected Object
CreateUIInputEvent(Object component, Object type, Object nativeEvent)
public Object
disableUserSelect(Object element)
Disable the user's ability to select text in this component
public Object
elementsAdded(Object node)
Updates any id->element cache by adding the elements in the specified subtree
public Object
elementsRemoved(Object node)
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
private static Object
_getBoxObjectFor(Object elem)
public String
getBoxSizing(HTMLElement element, CSSStyleDeclaration currentStyle)
Returns the box model associated with an element (http://www.w3.org/TR/css3-ui/#box-sizing)
protected Object
GetCssToDomPropertyNameMap()
Returns the map which contains the CSS property name and it's DOM version.
public Array<AdfUIComponent>
getDescendantComponentsForNode(Node node, Array<AdfUIComponent> children)
Get components descended from a node.
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(HTMLElement domElement)
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
getElementTop(Object element)
Returns the element's top side in Window coordinates.
public Object
getKeyCode(Object keyEvent)
Returns the unicode key code for the given key event.
public String
getSessionStorageProperty(String propKey)
This function returns the value for a given key stored in sessionStorage.
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 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
protected Object
Init(Object version, Object domWindow)
Initializes the instance.
protected static Object
InitClass()
public Boolean
isChromeEvent(Event domEvent)
Returns true if the event was on the element chrome
public Object
isElementHTML(Object element)
public Object
isFunctionKey(Object keyEvent)
Returns whether the event's keycode should be considered as a function key.
public Object
isLeftButtonClick(Object evt)
Tests whether event is a left button click event.
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 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
removeEventBubbles(Object node, Object listener)
Removes event bubbles for all of the events that the Rich client framework is interested in from the relevant element using the specified listener
private Object
_removeEventListeners(Node node, Array<String> eventTypes, Function listener, Boolean capture)
Remove the listener from the Element or Document for all of the specified eventTypes using the specified capture strategy
public Object
removeIdsFromDomSubTree(HTMLElement subTreeRoot)
Removes all of the ID values from every element in the given DOM sub tree.
public Object
removeKeyEventListener(Object node, Object listener)
Remove key event listener fro the specified element.
public Object
removeSessionStorageProperty(String propKey)
This function removes the key/value pair stored in sessionStorage.
private static Object
_resetThrobber(Object event)
public Object
setButtonTextContent(Object node, Object newText)
Override to avoid Gecko bug.
public Object
setImageSource(Object img, Object src)
Sets the image source.
public Object
setImageTooltip(Object img, Object tooltip)
Gecko needs the tooltip on the "title" attribute.
public Object
setSessionStorageProperty(String propKey, String propValue)
This function stores the key/value pair in sessionStorage.
public Object
showBusyCursor(Object ownerDocument, Object show)
Displays busy/default cursor.


Methods inherited from oracle.adf.view.js.agent.AdfAgent

addBubbleEventListener, addEventCaptures, addOption, addResizeListener, autoCompleteForm, beginDirtyStateTracking, checkMouseOutEvent, clearSubtreeIds, cloneEvent, cloneNode, CopyDragSize, copyEvent, copyStyle, createContextMenuEventGenerator, createDefaultLogWriter, createDraggableNode, createStyle, createTouchMoveManager, createXmlDocument, createXMLHttpRequest, disableBrowserContextMenu, dispatchEvent, eatEvent, eatEventCallback, elementFromPagePoint, endDirtyStateTracking, endDocumentKeyEventCapture, execScript, forceCursorChange, getAgent, getAttribute, getAttributeName, getBooleanAttribute, getBrowserViewportScrollLeft, getBrowserViewportScrollTop, getCapabilities, getComponentEvent, getComputedStyle, getCSS2Cursor, getCSSLengthAsInt, getCursor, getDomDocument, getDomForCSSPropertyName, getDomWindow, getElementsByName, getEventFromElement, getEventTarget, getEventToElement, getExpandoProperty, getFormElement, getIntAttribute, getLocalName, getModifierDisplayName, getMousePosition, getNodeName, getNodeXml, getOS, getOuterHeight, getOuterWidth, getOverrideStyle, getPlatform, getPreferredKeyEventForRepetition, getPrefix, GetResizeEvents, getStyleProperty, getTableRow, getTableRowCells, getTableRows, getTextContent, getVersion, getWindowHeight, getWindowWidth, guessOS, guessVersion, installKeyboardBlocker, isAttributeSpecified, isClipped, IsComputedWidthAuto, isDefaultPrevented, isDirty, isDisabledOptionSupported, isDragPrepEvent, isEqualIcon, isEventInElement, isInlineDialogRepositioningOnScroll, isLeftButton, isMouseEvent, isSelectionToggle, isSessionStorageEnabled, mapNativeToComponentEventType, modifyIdsInDomSubTree, parseXML, pointInElementChrome, prepareStretchedChild, preventDefault, preventDefaultCallback, removeBubbleEventListener, removeEventCaptures, removeResizeListener, removeStyleProperty, replaceNode, repositionStretchedElement, resizeStretchedChild, resizeStretchedElement, scrollToPos, setAttribute, setCssFloat, setCursor, setDirty, setExpandoProperty, setOpacity, setOuterHeight, setOuterWidth, setTableRowHeight, setTextContent, showTooltip, startDocumentKeyEventCapture, startMouseEventCapture, stopMouseEventCapture, stopPropagation, supportsTransientStyleClasses


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

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


Field Detail


_CSS_TO_DOM_MAP

private static Object _CSS_TO_DOM_MAP

Maps the CSS property name to DOM property name.

Overrides:
AdfAgent._CSS_TO_DOM_MAP

_FAKE_MOUSEMOVE_EVENT

private static Object _FAKE_MOUSEMOVE_EVENT

_ID_TO_DOM_MAP

private Object _ID_TO_DOM_MAP

_MOZ_USER_DEFINED

private static Object _MOZ_USER_DEFINED

_REDISTRIBUTE_BUBBLE_EVENTS

private static Object _REDISTRIBUTE_BUBBLE_EVENTS

_REDISTRIBUTE_CAPTURE_EVENTS

private static Object _REDISTRIBUTE_CAPTURE_EVENTS

Constructor Detail


AdfGeckoAgent

public AdfGeckoAgent(Object version,
                     Object domWindow)

Gecko AdfAgent AdfAgent capabilities.

Parameters:
version    
domWindow    

Method Detail


addEventBubbles

public Object addEventBubbles(Object node,
                              Object listener)

Override to reset throbber via iframe and add focus and blur as capture events

Parameters:
node    
listener    
Return:
Object
Overrides:
AdfAgent.addEventBubbles(Object, Object)

_addEventListeners

private Object _addEventListeners(Node node,
                                  Array<String> eventTypes,
                                  Function listener,
                                  Boolean capture)

Add the listener to the Element or Document for all of the specified eventTypes using the specified capture strategy

Parameters:
node  -  Element or Document to add listener to
eventTypes  -  Array of DOM event types to register listener for
listener  -  Event listener to register on node
capture  -  true to add the listener using event capture
Return:
Object

addKeyEventListener

public Object addKeyEventListener(Object node,
                                  Object listener)

Adds key event listener to the specified element. Gecko gives the correct keycode/charcode only in the keypress event...not the keydown event, so we need override and listen to the keypress event instead.

Parameters:
node    
listener    
Return:
Object
Overrides:
AdfAgent.addKeyEventListener(Object, Object)

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)
Overrides:
AdfAgent.allElementsRemoved()

atLeast

public boolean atLeast(Object platform,
                       Object version)

Overridden from the base agent to handle the fully qualifed Gecko version. The base agent only handles the first two digits of the Gecko Agent but the third differentiates FF 3.5 from prior versions ("Gecko 1.9.1" == FF 3.5). Passing a dot delimited string will compare against the full version versus just the first two digits.

Parameters:
platform    
version    
Return:
boolean - null true if the platform
Overrides:
AdfAgent.atLeast(Object, Object)

CreateDefaultLogWriter

protected Object CreateDefaultLogWriter(Object nativeLogWriter)

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

Parameters:
nativeLogWriter    
Return:
Object
Overrides:
AdfAgent.createDefaultLogWriter()

CreateNativeLogWriter

protected Object CreateNativeLogWriter()

Override to return an AdfLogWriter that writes to the Gecko console

Return:
Object
Overrides:
AdfAgent.CreateNativeLogWriter()

CreateUIInputEvent

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

Parameters:
component    
type    
nativeEvent    
Return:
Object
Overrides:
AdfAgent.CreateUIInputEvent(Object, Object, Object)

disableUserSelect

public Object disableUserSelect(Object element)

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

Parameters:
element    
Return:
Object
Overrides:
AdfAgent.disableUserSelect(Object)

elementsAdded

public Object elementsAdded(Object node)

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

Parameters:
node  -  Either element or document node that is being added
Return:
Object
See also:
getElementById(Object)
elementsRemoved(Object)
Overrides:
AdfAgent.elementsAdded(Object)

elementsRemoved

public Object elementsRemoved(Object node)

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

Parameters:
node  -  Either element or document node that is being removed
Return:
Object
See also:
getElementById(Object)
elementsAdded(Object)
Overrides:
AdfAgent.elementsRemoved(Object)

enableUserSelect

public Object enableUserSelect(Object element)

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

Parameters:
element    
Return:
Object
Overrides:
AdfAgent.enableUserSelect(Object)

_getBoxObjectFor

private static Object _getBoxObjectFor(Object elem)

Parameters:
elem    
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"
Overrides:
AdfAgent.getBoxSizing(HTMLElement, CSSStyleDeclaration)

GetCssToDomPropertyNameMap

protected Object GetCssToDomPropertyNameMap()

Returns the map which contains the CSS property name and it's DOM version.

Return:
Object
Overrides:
AdfAgent.GetCssToDomPropertyNameMap()

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
Overrides:
AdfAgent.getDescendantComponentsForNode(Node, Array<AdfUIComponent>)

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)
Overrides:
AdfAgent.getElementById(Object)

getElementLeft

public Object getElementLeft(Object element)

Returns the element's left side in Window coordinates. This reproduce the code from the getElementPosition method.

Parameters:
element    
Return:
Object
Overrides:
AdfAgent.getElementLeft(Object)

getElementPageBounds

public Object getElementPageBounds(HTMLElement domElement)

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

Parameters:
domElement    
Return:
Object - object with members "top", "left", "bottom", and "right"
Overrides:
AdfAgent.getElementPageBounds(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)
Overrides:
AdfAgent.getElementPosition(Object)

getElementTop

public Object getElementTop(Object element)

Returns the element's top side in Window coordinates. This reproduce the code from the getElementPosition method.

Parameters:
element    
Return:
Object
Overrides:
AdfAgent.getElementTop(Object)

getKeyCode

public Object getKeyCode(Object keyEvent)

Returns the unicode key code for the given key event.

Parameters:
keyEvent    
Return:
Object
Overrides:
AdfAgent.getKeyCode(Object)

getSessionStorageProperty

public String getSessionStorageProperty(String propKey)

This function returns the value for a given key stored in sessionStorage. sessionStorage is an instance to save information in client session. This is based on DOM Storage mechanism, a means through which string key/value pairs can be securely stored and later retrieved for use.

Parameters:
propKey  -  key used to retrieve the value in storage
Return:
String - value of the property stored with key propKey
Overrides:
AdfAgent.getSessionStorageProperty(String)

getWindowClientHeight

public Number getWindowClientHeight(Window domWindow)

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

Parameters:
domWindow    
Return:
Number - null
Overrides:
AdfAgent.getWindowClientHeight(Window)

getWindowClientWidth

public Number getWindowClientWidth(Window domWindow)

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

Parameters:
domWindow    
Return:
Number - null
Overrides:
AdfAgent.getWindowClientWidth(Window)

getWindowScrollHeight

public Number getWindowScrollHeight(Window domWindow)

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

Parameters:
domWindow    
Return:
Number - null
Overrides:
AdfAgent.getWindowScrollHeight(Window)

getWindowScrollWidth

public Number getWindowScrollWidth(Window domWindow)

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

Parameters:
domWindow    
Return:
Number - null
Overrides:
AdfAgent.getWindowScrollWidth(Window)

Init

protected Object Init(Object version,
                      Object domWindow)

Initializes the instance. Subclasses of AdfObject must call their superclass' Init

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

InitClass

protected static Object InitClass()

Return:
Object
Overrides:
AdfAgent.InitClass()

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
Overrides:
AdfAgent.isChromeEvent(Event)

isElementHTML

public Object isElementHTML(Object element)

Parameters:
element    
Return:
Object
Overrides:
AdfAgent.isElementHTML(Object)

isFunctionKey

public Object isFunctionKey(Object keyEvent)

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

Parameters:
keyEvent    
Return:
Object
Overrides:
AdfAgent.isFunctionKey(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
Overrides:
AdfAgent.isLeftButtonClick(Object)

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
Overrides:
AdfAgent.pointInElementBounds(Object, Object, Object)

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)
Overrides:
AdfAgent.pointInElementOrChildBounds(HTMLElement, Number, Number)

removeEventBubbles

public Object removeEventBubbles(Object node,
                                 Object listener)

Removes event bubbles 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
Overrides:
AdfAgent.removeEventBubbles(Object, Object)

_removeEventListeners

private Object _removeEventListeners(Node node,
                                     Array<String> eventTypes,
                                     Function listener,
                                     Boolean capture)

Remove the listener from the Element or Document for all of the specified eventTypes using the specified capture strategy

Parameters:
node  -  Element or Document to add listener to
eventTypes  -  Array of DOM event types to register listener for
listener  -  Event listener to deregister on element
capture  -  true to remove a the listener added using event capture
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
Overrides:
AdfAgent.removeIdsFromDomSubTree(HTMLElement)

removeKeyEventListener

public Object removeKeyEventListener(Object node,
                                     Object listener)

Remove key event listener fro the specified element.

Parameters:
node    
listener    
Return:
Object
Overrides:
AdfAgent.removeKeyEventListener(Object, Object)

removeSessionStorageProperty

public Object removeSessionStorageProperty(String propKey)

This function removes the key/value pair stored in sessionStorage. sessionStorage is an instance to save information in client session. This is based on DOM Storage mechanism, a means through which string key/value pairs can be securely stored and later retrieved for use..

Parameters:
propKey  -  key used to remove the value from storage
Return:
Object
Overrides:
AdfAgent.removeSessionStorageProperty(String)

_resetThrobber

private static Object _resetThrobber(Object event)

Parameters:
event    
Return:
Object

setButtonTextContent

public Object setButtonTextContent(Object node,
                                   Object newText)

Override to avoid Gecko bug.

Parameters:
node    
newText    
Return:
Object
Overrides:
AdfAgent.setButtonTextContent(Object, Object)

setImageSource

public Object setImageSource(Object img,
                             Object src)

Sets the image source.

Parameters:
img    
src    
Return:
Object
Overrides:
AdfAgent.setImageSource(Object, Object)

setImageTooltip

public Object setImageTooltip(Object img,
                              Object tooltip)

Gecko needs the tooltip on the "title" attribute.

Parameters:
img  -  the img element
tooltip  -  the image tooltip
Return:
Object
Overrides:
AdfAgent.setImageTooltip(Object, Object)

setSessionStorageProperty

public Object setSessionStorageProperty(String propKey,
                                        String propValue)

This function stores the key/value pair in sessionStorage. sessionStorage is an instance to save information in client session. This is based on DOM Storage mechanism, a means through which string key/value pairs can be securely stored and later retrieved for use.

Parameters:
propKey  -  this key will be used to store the key/value in storage
propValue  -  value to be stored.
Return:
Object
Overrides:
AdfAgent.setSessionStorageProperty(String, String)

showBusyCursor

public Object showBusyCursor(Object ownerDocument,
                             Object show)

Displays busy/default cursor.

Parameters:
ownerDocument  -  The document to display/hide the busy cursor on
show  -  boolean for displaying busy cursor or not
Return:
Object
Overrides:
AdfAgent.showBusyCursor(Object, Object)

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

 

Generated on 2012.08.25 02:16 UTC
Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.