# JavaScript API Reference for Oracle ADF Faces

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

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

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

## Warning:

- This is an unsupported, internal implementation class.
- Use an API class that might provide equivalent functionality instead.
- This class will change without notice.
- It is not recommended that you use anything in this class.

    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 Object` | `_isWithinTouchEventsSequence`
`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, EDGE_PLATFORM, GECKO_PLATFORM, IE_PLATFORM, KEY_EVENTS, MAC_OS, OPERA_PLATFORM, REDISTRIBUTE_EVENTS, 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 Object` | `addBubbleEventListener(Object nodeOrWindow, Object eventType, Object listener)` Override to keep track of touch events added to document
`public Object` | `addEventBubbles(Object node, Object listener)` Override to keep track of touch events added to document
`public Object` | `addEventCaptures(Object node, Object listener)` Override to keep track of touch events added to document
`public Event` | `cloneEvent(Event event, HTMLElement newTarget)` Clones an event from an existing event for a new target element.
`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 Boolean` | `disableSelectionToggleOnEditableCell()` Override the default behavior on Safari Model where if clicking on editable cell of a row, selection toggling is disabled.
`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.
`private static String` | `_getTitle(HTMLElement node)` Walks up the ancestor starting at the target node returning the first assigned title attribute.
`protected Object` | `GetTouchCapability()` Returns the touch capability of the browser.
`private Object` | `_getTouchEventListeners()`
`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)` Tests whether the button pressed is a left button.
`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 Object` | `isTouchFirstDevice()` Returns true for devices that are primarily touch based, false for devices that are not touch capable or whereever mouse is primary input and touch is an additional capability (ex:
`public void` | `preventDefault(Event evt)` Agent call to prevent the default behavior of the native event.
`private Object` | `_saveEventListener(Object eventType, Object listener, Object capture)`
`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
`CreateDefaultLogWriter, CreateNativeLogWriter, CreateUIInputEvent, disableUserSelect, enableUserSelect, execScript, __getAgentVersion, getBoxSizing, getMaxConnectionsPerDomain, getModifierDisplayName, __getSpecificAgentClassName, __getSupported, getWindowScrollHeight, getWindowScrollWidth, InitClass, isSessionStorageEnabled, slice`

### Methods inherited from oracle.adf.view.js.agent.AdfAgent
`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, getAgentClassNameFromAgentString, getAttribute, getAttributeName, getBooleanAttribute, getCapabilities, getComputedStyle, getCSS2Cursor, getCSSLengthAsInt, GetCssToDomPropertyNameMap, getCursor, getDescendantComponentsForNode, getDomDocument, getDomForCSSPropertyName, getDomWindow, getElementById, getElementLeft, getElementPageBounds, getElementPosition, getElementsByName, getElementTop, getEventFromElement, getEventToElement, getExpandoProperty, getFormElement, getIntAttribute, getKeyCode, getLocalName, getNodeName, getNodeType, getNodeXml, getOrigin, getOS, getOuterHeight, getOuterWidth, getOverrideStyle, getPlatform, getPreferredKeyEventForRepetition, getPrefix, getScrollLeft, getSessionStorageProperty, getStyleProperty, getTableRow, getTableRowCells, getTableRows, getTextContent, getVersion, getWindowClientHeight, getWindowClientWidth, getWindowHeight, getWindowWidth, guessOS, guessVersion, hasAttribute, installKeyboardBlocker, isAttributeSpecified, isChromeEvent, isClipped, IsComputedWidthAuto, isDirty, isDisabledOptionSupported, isElementHTML, isEqualIcon, isEventInElement, isFunctionKey, isKeyboardEvent, isLeftButtonClick, isMouseEvent, mapNativeToComponentEventType, modifyIdsInDomSubTree, parseXML, pointInElementBounds, pointInElementChrome, pointInElementOrChildBounds, prepareStretchedChild, preventDefaultCallback, removeBubbleEventListener, removeEventBubbles, removeEventCaptures, removeIdsFromDomSubTree, removeKeyEventListener, removeResizeListener, removeSessionStorageProperty, removeStyleProperty, replaceNode, repositionStretchedElement, resizeStretchedChild, resizeStretchedElement, scrollToPos, setAttribute, setButtonTextContent, setCssFloat, setCursor, setDirty, setExpandoProperty, setImageSource, setImageTooltip, setInstance, setOpacity, setOuterHeight, setOuterMaxHeight, setOuterMaxWidth, setOuterWidth, setScrollLeft, setSessionStorageProperty, setTableRowHeight, setTextContent, showBusyCursor, startDocumentKeyEventCapture, startMouseEventCapture, stopMouseEventCapture, stopPropagation, supportsTransientStyleClasses, toISOString`

### Methods inherited from oracle.adf.view.js.base.AdfObject
`adopt, clone, createCallback, createInitializedObject, createSubclass, ensureClassInitialization, equals, exportPrototypeSymbol, getClass, GetLazyArrayProperty, GetLazyMapProperty, getTypeName, toDebugString, toString`

## Field Detail

### _isWithinTouchEventsSequence

`private Object _isWithinTouchEventsSequence`

### _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

### addBubbleEventListener

`public Object addBubbleEventListener(Object nodeOrWindow,
Object eventType,
Object listener)`
  Override to keep track of touch events added to document
  Parameters:

    `nodeOrWindow` |  |
    `eventType` |  |
    `listener` |  |

  Return:
    `Object`
  Overrides:
    `AdfAgent.addBubbleEventListener(Object, Object, Object)`

### addEventBubbles

`public Object addEventBubbles(Object node,
Object listener)`
  Override to keep track of touch events added to document
  Parameters:

    `node` |  |
    `listener` |  |

  Return:
    `Object`
  Overrides:
    `AdfAgent.addEventBubbles(Object, Object)`

### addEventCaptures

`public Object addEventCaptures(Object node,
Object listener)`
  Override to keep track of touch events added to document
  Parameters:

    `node` |  |
    `listener` |  |

  Return:
    `Object`
  Overrides:
    `AdfAgent.addEventCaptures(Node, Function)`

### 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.
  Parameters:

    `event` | - | the event to clone the new event from
    `newTarget` | - | the new event target

  Return:
    `Event` - the newly cloned event
  Overrides:
    `AdfAgent.cloneEvent(Event, HTMLElement)`

### 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)`

### disableSelectionToggleOnEditableCell

`public Boolean disableSelectionToggleOnEditableCell()`
  Override the default behavior on Safari Model where if clicking on editable cell of a row, selection toggling is disabled.
  Return:
    `Boolean` - true if we should disable table selection toggling on clicking editable cell.
  Overrides:
    `AdfAgent.disableSelectionToggleOnEditableCell()`

### 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)`

### _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;

### GetTouchCapability

`protected Object GetTouchCapability()`
  Returns the touch capability of the browser. Returns none/single/multiple based on what device supports. Chrome browser on Android supports navigator.MaxTouchPoints and hence the base implementation is suffice. Whereas Safari does not support navigator.MaxTouchPoints and hence the overrride. iOS supports multiple finger touch, for iOS devices, we just return multiple.
  Return:
    `Object`
  Overrides:
    `AdfAgent.GetTouchCapability()`

### _getTouchEventListeners

`private Object _getTouchEventListeners()`
  Return:
    `Object`

### _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)`
  Tests whether the button pressed is a left button.
  Parameters:

    `evt` |  |

  Return:
    `Object`
  Overrides:
    `AdfAgent.isLeftButton(Event)`

### 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)`

### isTouchFirstDevice

`public Object isTouchFirstDevice()`
  Returns true for devices that are primarily touch based, false for devices that are not touch capable or whereever mouse is primary input and touch is an additional capability (ex: desktops and laptops) Note: If a device reporting as touch first, it is safe to assume that the device has downloaded the touch version of the active skin file.
  Return:
    `Object`
  Overrides:
    `AdfAgent.isTouchFirstDevice()`

### 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)`

### _saveEventListener

`private Object _saveEventListener(Object eventType,
Object listener,
Object capture)`
  Parameters:

    `eventType` |  |
    `listener` |  |
    `capture` |  |

  Return:
    `Object`

### 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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle® Fusion Middleware Javascript API Reference for Oracle ADF Faces 12c (12.2.1.4.0) E81451-01
PREV NEXT | FRAMES NO FRAMES Warning: private items are visible |

Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.