OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adfinternal.view.js.agent.safari
Class AdfSafariMobileAgent

Warning:

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.agent.AdfAgent
               |
               +--oracle.adfinternal.view.js.agent.safari.AdfSafariAgent
                     |
                     +--oracle.adfinternal.view.js.agent.safari.AdfSafariMobileAgent

public class AdfSafariMobileAgent
extends AdfSafariAgent
AdfSafariMobileAgent capabilities.



Field Summary

private static Object
_NATIVE_TO_COMPONENT_MAPPINGS
Maps the native event touch events to component level events
private static Object
_REDISTRIBUTE_BUBBLE_EVENTS
List of native "touch" event types to redistribute to the client components.
private static Object
_TOOLTIP_HIDE_TIMEOUT
Constant number of milliseconds before a tooltip is auto-dismissed.
private static Object
_TOOLTIP_PROPERTY_KEY
Page property key used to hold state info about the tooltip popup.


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
AdfSafariMobileAgent(Object version, Object domWindow)
AdfSafariMobileAgent capabilities.


Method Summary

public AdfTouchContextMenuManager
createContextMenuEventGenerator()
Returns the {@link AdfSafariTouchContextMenuManager} that derives context menu events from native touch events.
public Object
createDraggableNode(Object domNode)
Given a DOM Node in the document, returns a cloned draggable version of that DOM Node.
public Object
createTouchMoveManager(Object element, Object handlerCallback, Object touchCount)
Constructs a manager for handling touch movements.
public Number
getBrowserViewportScrollLeft()
public Number
getBrowserViewportScrollTop()
public AdfComponentEvent
getComponentEvent(AdfUIComponent component, Event nativeEvent, AdfUIComponent prevComponent)
Handles touch event types before delegating to the super class.
public HTMLElement
getEventTarget(Event event)
Override transparently handles touch events.
public Object
getMousePosition(Event evt)
Returns events mouse coordinates relative to the document.
protected Array
GetRedistributeBubbleEvents()
Adds touch events supported by mobile devices that need to be redistributed as component events.
private static String
_getTitle(HTMLElement node)
Walks up the ancestor starting at the target node returning the first assigned title attribute.
private static void
_hideTooltip()
Cancels a pending tooltip timeoout and hides the tooltip popup.
protected Object
Init(Object version, Object domWindow)
Initializes the instance.
public boolean
isDefaultPrevented(Event evt)
Checks to see if {@link AdfAgent#preventDefault} was called on the event or if the a {@link AdfComponentTouchEvent#TOUCH_START_EVENT_TYPE} or {@link AdfComponentTouchEvent#TOUCH_END_EVENT_TYPE} has been canceled within a touch sequence.
public Object
isDragPrepEvent(Object componentEvent)
Checks if a component event is the correct event type on the current agent to prepare a drag operation.
public Boolean
isInlineDialogRepositioningOnScroll()
Disables inline dialog auto repositioning on scroll.
public Object
isLeftButton(Object evt)
public Boolean
isSelectionToggle(Object evt)
Due to the fact there are no ctrl+tap, shift+tab or other keyboard functions on the touch devices, treat taps as selection toggle events always.
public String
mapNativeToComponentEventType(String eventType)
Maps a native event type to a component event type.
public void
preventDefault(Event evt)
Agent call to prevent the default behavior of the native event.
public void
showTooltip(AdfComponentEvent componentEvent)
Mobile Safari on the tablet does not automatically show tooltips for elements that have title attributes on mouseover.
private static void
_showTooltip(AdfComponentEvent componentEvent)
Shows a tooltip popup if there is cached state and schedules a auto-dismissal timeout timer.


Methods inherited from oracle.adfinternal.view.js.agent.safari.AdfSafariAgent

addEventBubbles, cloneEvent, CreateDefaultLogWriter, CreateNativeLogWriter, CreateUIInputEvent, disableUserSelect, enableUserSelect, execScript, getBoxSizing, getDescendantComponentsForNode, getElementLeft, getElementPageBounds, getElementPosition, getElementTop, getModifierDisplayName, GetRedistributeCaptureEvents, getSessionStorageProperty, getWindowScrollHeight, getWindowScrollWidth, InitClass, removeEventBubbles, removeSessionStorageProperty, setSessionStorageProperty


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

addBubbleEventListener, addEventCaptures, addKeyEventListener, addOption, addResizeListener, allElementsRemoved, atLeast, autoCompleteForm, beginDirtyStateTracking, checkMouseOutEvent, clearSubtreeIds, cloneNode, CopyDragSize, copyEvent, copyStyle, createDefaultLogWriter, createStyle, createXmlDocument, createXMLHttpRequest, disableBrowserContextMenu, dispatchEvent, eatEvent, eatEventCallback, elementFromPagePoint, elementsAdded, elementsRemoved, endDirtyStateTracking, endDocumentKeyEventCapture, forceCursorChange, getAgent, getAttribute, getAttributeName, getBooleanAttribute, getCapabilities, getComputedStyle, getCSS2Cursor, getCSSLengthAsInt, GetCssToDomPropertyNameMap, getCursor, getDomDocument, getDomForCSSPropertyName, getDomWindow, getElementById, getElementsByName, getEventFromElement, getEventToElement, getExpandoProperty, getFormElement, getIntAttribute, getKeyCode, getLocalName, getNodeName, getNodeXml, getOS, getOuterHeight, getOuterWidth, getOverrideStyle, getPlatform, getPreferredKeyEventForRepetition, getPrefix, GetResizeEvents, getStyleProperty, getTableRow, getTableRowCells, getTableRows, getTextContent, getVersion, getWindowClientHeight, getWindowClientWidth, getWindowHeight, getWindowWidth, guessOS, guessVersion, installKeyboardBlocker, isAttributeSpecified, isChromeEvent, isClipped, IsComputedWidthAuto, isDirty, isDisabledOptionSupported, isElementHTML, isEqualIcon, isEventInElement, isFunctionKey, isLeftButtonClick, isMouseEvent, isSessionStorageEnabled, modifyIdsInDomSubTree, parseXML, pointInElementBounds, pointInElementChrome, pointInElementOrChildBounds, prepareStretchedChild, preventDefaultCallback, removeBubbleEventListener, removeEventCaptures, removeIdsFromDomSubTree, removeKeyEventListener, removeResizeListener, removeStyleProperty, replaceNode, repositionStretchedElement, resizeStretchedChild, resizeStretchedElement, scrollToPos, setAttribute, setButtonTextContent, setCssFloat, setCursor, setDirty, setExpandoProperty, setImageSource, setImageTooltip, setOpacity, setOuterHeight, setOuterWidth, setTableRowHeight, setTextContent, showBusyCursor, 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


_NATIVE_TO_COMPONENT_MAPPINGS

private static Object _NATIVE_TO_COMPONENT_MAPPINGS

Maps the native event touch events to component level events

Overrides:
AdfAgent._NATIVE_TO_COMPONENT_MAPPINGS

_REDISTRIBUTE_BUBBLE_EVENTS

private static Object _REDISTRIBUTE_BUBBLE_EVENTS

List of native "touch" event types to redistribute to the client components.

Overrides:
AdfSafariAgent._REDISTRIBUTE_BUBBLE_EVENTS

_TOOLTIP_HIDE_TIMEOUT

private static Object _TOOLTIP_HIDE_TIMEOUT

Constant number of milliseconds before a tooltip is auto-dismissed.

_TOOLTIP_PROPERTY_KEY

private static Object _TOOLTIP_PROPERTY_KEY

Page property key used to hold state info about the tooltip popup.
See also:
showTooltip(AdfComponentEvent)

Constructor Detail


AdfSafariMobileAgent

public AdfSafariMobileAgent(Object version,
                            Object domWindow)

AdfSafariMobileAgent capabilities.

Parameters:
version    
domWindow    

Method Detail


createContextMenuEventGenerator

public AdfTouchContextMenuManager createContextMenuEventGenerator()

Returns the AdfSafariTouchContextMenuManager that derives context menu events from native touch events.

Return:
AdfTouchContextMenuManager - returns a manager used by the AdfPage when redistributing native events into component events.
Overrides:
AdfAgent.createContextMenuEventGenerator()

createDraggableNode

public Object createDraggableNode(Object domNode)

Given a DOM Node in the document, returns a cloned draggable version of that DOM Node.

Parameters:
domNode    
Return:
Object
Overrides:
AdfAgent.createDraggableNode(Node)

createTouchMoveManager

public Object createTouchMoveManager(Object element,
                                     Object handlerCallback,
                                     Object touchCount)

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

Parameters:
element    
handlerCallback    
touchCount    
Return:
Object
Overrides:
AdfAgent.createTouchMoveManager(HTMLElement, Function, Number)

getBrowserViewportScrollLeft

public Number getBrowserViewportScrollLeft()

Return:
Number - returns the starting position on the canvas of the viewport
Overrides:
AdfAgent.getBrowserViewportScrollLeft()

getBrowserViewportScrollTop

public Number getBrowserViewportScrollTop()

Return:
Number - returns the top position on the canvas the viewport begins
Overrides:
AdfAgent.getBrowserViewportScrollTop()

getComponentEvent

public AdfComponentEvent getComponentEvent(AdfUIComponent component,
                                           Event nativeEvent,
                                           AdfUIComponent prevComponent)

Handles touch event types before delegating to the super class.

Parameters:
component  -  targeted for the component event
nativeEvent  -  dom event to be decorated by a component event
prevComponent  -  last to have been targeted for a component event
Return:
AdfComponentEvent - component event for a given native event
See also:
AdfComponentTouchEvent
Overrides:
AdfAgent.getComponentEvent(Object, Object, Object)

getEventTarget

public HTMLElement getEventTarget(Event event)

Override transparently handles touch events. It also searches for the nearest HTMLElement returning that as the event target if the actual target is a text node. On the Webkit mobile browsers the target may be a text node but we assume an HTMLElement throughout the framework.

Parameters:
event  -  native DOM event
Return:
HTMLElement - target established for the event
See also:
AdfDomUtils.getElement(Node)
Overrides:
AdfAgent.getEventTarget(Object)

getMousePosition

public Object getMousePosition(Event evt)

Returns events mouse coordinates relative to the document. Adds support for touch events.

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

GetRedistributeBubbleEvents

protected Array GetRedistributeBubbleEvents()

Adds touch events supported by mobile devices that need to be redistributed as component events.

Return:
Array - list of bubble events as literal strings
Overrides:
AdfSafariAgent.GetRedistributeBubbleEvents()

_getTitle

private static String _getTitle(HTMLElement node)

Walks up the ancestor starting at the target node returning the first assigned title attribute.

Parameters:
node  -  touch event target
Return:
String - element title within the target node's heritage; otherwise, returns null;

_hideTooltip

private static void _hideTooltip()

Cancels a pending tooltip timeoout and hides the tooltip popup.

Return:
void - null

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()

isDefaultPrevented

public boolean isDefaultPrevented(Event evt)

Checks to see if AdfAgent.preventDefault(Event) was called on the event or if the a AdfComponentTouchEvent.TOUCH_START_EVENT_TYPE or AdfComponentTouchEvent.TOUCH_END_EVENT_TYPE has been canceled within a touch sequence.

Parameters:
evt  -  native dom event to check if it has been canceled
Return:
boolean - returns true if the event was canceled
Overrides:
AdfAgent.isDefaultPrevented(Event)

isDragPrepEvent

public Object isDragPrepEvent(Object componentEvent)

Checks if a component event is the correct event type on the current agent to prepare a drag operation. This is called from AdfDragRecognizer.prepDrag(Object, Object, Object) to determine if the event is one that must occur before a drag starts. For example, on the desktop, the mouse down event must happen before a mouse move to start the drag.

Parameters:
componentEvent    
Return:
Object
Overrides:
AdfAgent.isDragPrepEvent(AdfComponentEvent)

isInlineDialogRepositioningOnScroll

public Boolean isInlineDialogRepositioningOnScroll()

Disables inline dialog auto repositioning on scroll. The zoom gesture invokes the scroll. The inline dialog position manager will not try to reposition an open dialog so that it is always visible in the viewport for this mobile agent.

Return:
Boolean - does this agent support auto positioning of inline dialogs on scroll.
Overrides:
AdfAgent.isInlineDialogRepositioningOnScroll()

isLeftButton

public Object isLeftButton(Object evt)

Parameters:
evt    
Return:
Object
Overrides:
AdfAgent.isLeftButton(Object)

isSelectionToggle

public Boolean isSelectionToggle(Object evt)

Due to the fact there are no ctrl+tap, shift+tab or other keyboard functions on the touch devices, treat taps as selection toggle events always.

Parameters:
evt    
Return:
Boolean - true always for mobile agent
Overrides:
AdfAgent.isSelectionToggle(Event)

mapNativeToComponentEventType

public String mapNativeToComponentEventType(String eventType)

Maps a native event type to a component event type. Adds support for touch event types.

Parameters:
eventType  -  native DOM event type
Return:
String - component event type for the native event type
Overrides:
AdfAgent.mapNativeToComponentEventType(Object)

preventDefault

public void preventDefault(Event evt)

Agent call to prevent the default behavior of the native event. This override captures if a touchstart or touchend event is prevented. It uses that indicator to filter out rogue simulated native events that follow out of sequence.

Parameters:
evt  -  native event
Return:
void - null
Overrides:
AdfAgent.preventDefault(Event)

showTooltip

public void showTooltip(AdfComponentEvent componentEvent)

Mobile Safari on the tablet does not automatically show tooltips for elements that have title attributes on mouseover. The framework simulates this on the same gesture as the context menu (tap+hold) or (tap+hold+finger-up) conflict resolution with drag-and-drop.

Parameters:
componentEvent  -  that might result in displaying a tooltip
Return:
void - null
Overrides:
AdfAgent.showTooltip(AdfComponentEvent)

_showTooltip

private static void _showTooltip(AdfComponentEvent componentEvent)

Shows a tooltip popup if there is cached state and schedules a auto-dismissal timeout timer.

Parameters:
componentEvent  -  that will result in showing a tooltip popup
Return:
void - null

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.