OracleJavaScript API Reference for Oracle ADF Faces

 

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

oracle.adf.view.js.event
Class AdfComponentTouchEvent

org.ecmascript.object.Object
   |
   +--oracle.adf.view.js.base.AdfObject
         |
         +--oracle.adf.view.js.event.AdfBaseEvent
               |
               +--oracle.adf.view.js.event.AdfPhasedEvent
                     |
                     +--oracle.adf.view.js.event.AdfComponentEvent
                           |
                           +--oracle.adf.view.js.event.AdfUIInputEvent
                                 |
                                 +--oracle.adf.view.js.event.AdfDomUIInputEvent
                                       |
                                       +--oracle.adf.view.js.event.AdfComponentTouchEvent
Direct Known Subclasses:
AdfTouchShowContextMenuEvent

public class AdfComponentTouchEvent
extends AdfDomUIInputEvent
AdfUIComponent event that redistributes native touch events. The touch event is fired as fingers touch and move across a surface. A touch event provides a snapshot of all touches during a multi-touch sequence that are new or have changed for a particular target. Valid "AdfBaseEvent#type" values are as follows: All of the event types listed above will bubble except for TOUCH_MOVE_EVENT_TYPE.



Field Summary

public static Object
TOUCH_CANCEL_EVENT_TYPE
Sent when the system cancels tracking for the touch.
public static Object
TOUCH_END_EVENT_TYPE
Sent when a given event lifts from the surface.
public static Object
TOUCH_MOVE_EVENT_TYPE
Sent when a given event moves on the surface.
public static Object
TOUCH_START_EVENT_TYPE
Sent when a finger for a given event touches the surface.


Fields inherited from oracle.adf.view.js.event.AdfDomUIInputEvent

Event


Fields inherited from oracle.adf.view.js.event.AdfUIInputEvent

BLUR_EVENT_TYPE, CLICK_EVENT_TYPE, CONTEXT_MENU_EVENT_TYPE, DOUBLE_CLICK_EVENT_TYPE, FOCUS_EVENT_TYPE, KEY_DOWN_EVENT_TYPE, KEY_PRESS_EVENT_TYPE, KEY_UP_EVENT_TYPE, LEFT_BUTTON_FLAG, MIDDLE_BUTTON_FLAG, MOUSE_DOWN_EVENT_TYPE, MOUSE_IN_EVENT_TYPE, MOUSE_MOVE_EVENT_TYPE, MOUSE_OUT_EVENT_TYPE, MOUSE_UP_EVENT_TYPE, RIGHT_BUTTON_FLAG


Fields inherited from oracle.adf.view.js.event.AdfBaseEvent

AT_TARGET_PHASE, BUBBLING_PHASE, CAPTURING_PHASE


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

constructor, superclass


Fields inherited from org.ecmascript.object.Object

prototype


Constructor Summary

public
AdfComponentTouchEvent(AdfComponent source, Object type, Object event)
{@link AdfUIComponent} event that redistributes native touch events.


Method Summary

public void
cancel()
Preventing the default native event behavior before delegating on the the standard component cancel behavior.
public static AdfComponentEvent
deriveContextMenuEvent(Object componentEvent)
Utility function that derives a {@link AdfComponentEvent#CONTEXT_MENU_EVENT_TYPE} from a touch even type.
public Number
getButtons()
Returns mask of buttons clicked
public Number
getClientX()
public Number
getClientY()
public AdfUIComponent
getCurrentTarget()
Returns the object whose listeners are currently being called.
public boolean
getDoesBubbles()
Prevents the chatty touch move from bubbling.
static Touch
__getFirstTouch(TouchEvent evt)
Get the first Touch object from a touch event.
private Object
_getFirstTouch()
public Number
getKeyCode()
Returns key code for key events
public Number
getPageX()
public Number
getPageY()
public Number
getScreenX()
public Number
getScreenY()
public Number
getTouchCount()


Methods inherited from oracle.adf.view.js.event.AdfDomUIInputEvent

clone, getKeyModifiers, getNativeEvent, getNativeEventTarget, getOffsetX, getOffsetY, GetSourceDomElement, Init, toDebugString


Methods inherited from oracle.adf.view.js.event.AdfUIInputEvent

getKeyStroke, isLeftButtonPressed, isRightButtonPressed


Methods inherited from oracle.adf.view.js.event.AdfComponentEvent

queue


Methods inherited from oracle.adf.view.js.event.AdfPhasedEvent

getEventPhase, isCancelable, nextEventPhase, setCurrentTarget


Methods inherited from oracle.adf.view.js.event.AdfBaseEvent

AddMarshalledProperties, forceFullSubmit, getClearMessages, getProperties, getRoot, getShowMessages, getSource, getType, isBubblingStopped, isCanceled, IsDeleveryDiscrete, isFullSubmitForced, isImmediate, isPartial, isResponseAnnounced, isResponseExpected, IsUserInputPrevented, isValidationNeeded, noResponseExpected, preventUserInput, propagatesToServer, setPartial, setRoot, stopBubbling


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

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


Field Detail


TOUCH_CANCEL_EVENT_TYPE

public static Object TOUCH_CANCEL_EVENT_TYPE

Sent when the system cancels tracking for the touch.

TOUCH_END_EVENT_TYPE

public static Object TOUCH_END_EVENT_TYPE

Sent when a given event lifts from the surface.

TOUCH_MOVE_EVENT_TYPE

public static Object TOUCH_MOVE_EVENT_TYPE

Sent when a given event moves on the surface.

TOUCH_START_EVENT_TYPE

public static Object TOUCH_START_EVENT_TYPE

Sent when a finger for a given event touches the surface.

Constructor Detail


AdfComponentTouchEvent

public AdfComponentTouchEvent(AdfComponent source,
                              Object type,
                              Object event)

AdfUIComponent event that redistributes native touch events. The touch event is fired as fingers touch and move across a surface. A touch event provides a snapshot of all touches during a multi-touch sequence that are new or have changed for a particular target. Valid "AdfBaseEvent#type" values are as follows: All of the event types listed above will bubble except for TOUCH_MOVE_EVENT_TYPE.

Parameters:
source  -  component of native event target
type    
event    

Method Detail


cancel

public void cancel()

Preventing the default native event behavior before delegating on the the standard component cancel behavior.

Return:
void - null
Overrides:
AdfBaseEvent.cancel()

deriveContextMenuEvent

public static AdfComponentEvent deriveContextMenuEvent(Object componentEvent)

Utility function that derives a AdfComponentEvent.CONTEXT_MENU_EVENT_TYPE from a touch even type. The resultant event will share the same "AdfComponentTouchEvent#getNativeEvent" and "AdfComponentTouchEvent#getSource" properties.

Parameters:
componentEvent    
Return:
AdfComponentEvent - component event of type AdfComponentEvent.CONTEXT_MENU_EVENT_TYPE or null if the componentEvent is not of the correct "AdfComponentTouchEvent#getType()".
See also:
AdfAgent.createContextMenuEventGenerator()
AdfTouchContextMenuManager.deriveContextMenuEvent(AdfComponentEvent)

getButtons

public Number getButtons()

Returns mask of buttons clicked

Return:
Number - Treat all touches as the left mouse button, AdfUIInputEvent.LEFT_BUTTON_FLAG
Overrides:
AdfUIInputEvent.getButtons()

getClientX

public Number getClientX()

Return:
Number - Returns the horizontal coordinate of the first touch event
Overrides:
AdfUIInputEvent.getClientX()

getClientY

public Number getClientY()

Return:
Number - Returns the vertical coordinate of the first touch event
Overrides:
AdfUIInputEvent.getClientY()

getCurrentTarget

public AdfUIComponent getCurrentTarget()

Returns the object whose listeners are currently being called. This will be different than the source of the event during the capture and bubble phases.

Return:
AdfUIComponent - if the "#getType" equals TOUCH_MOVE_EVENT_TYPE, the event doesn't bubble and the "#getSource" is returned; otherwise, delegate on to the super to return the component that this event is currently broadcast on.
Overrides:
AdfBaseEvent.getCurrentTarget()

getDoesBubbles

public boolean getDoesBubbles()

Prevents the chatty touch move from bubbling. All the other touch events will bubble.

Return:
boolean - returns false if the event type is TOUCH_MOVE_EVENT_TYPE
Overrides:
AdfBaseEvent.getDoesBubbles()

__getFirstTouch

static Touch __getFirstTouch(TouchEvent evt)

Get the first Touch object from a touch event.

Called by this class and AdfSafariMobileAgent.


Parameters:
evt  -  the native touch event
Return:
Touch - the first native touch object if present, otherwise null.

_getFirstTouch

private Object _getFirstTouch()

Return:
Object

getKeyCode

public Number getKeyCode()

Returns key code for key events

Return:
Number - returns 0 because events have no keys.
Overrides:
AdfUIInputEvent.getKeyCode()

getPageX

public Number getPageX()

Return:
Number - Retuns the horizontal (x-coordinate) within the webpage of the first touch event
Overrides:
AdfUIInputEvent.getPageX()

getPageY

public Number getPageY()

Return:
Number - Retuns the vertical (y-coordinate) within the webpage of the first touch event
Overrides:
AdfUIInputEvent.getPageY()

getScreenX

public Number getScreenX()

Return:
Number - Returns the horizontal coordinate (according to the users computer screen) of the first touch event.
Overrides:
AdfUIInputEvent.getScreenX()

getScreenY

public Number getScreenY()

Return:
Number - Returns the vertical coordinate (according to the users computer screen) of the first touch event.
Overrides:
AdfUIInputEvent.getScreenY()

getTouchCount

public Number getTouchCount()

Return:
Number - number of point of contact currently touching the surface (for touchend events, this includes the fingers that are being released).

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

 

Generated on 2013.01.09 16:37 UTC
Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.