| Function |
Defined By |
|
ElementKeyboardEvent(type, key, keyCode, ctrl, alt, shift, meta)
|
[Constructor] ElementKeyboardEvent
|
Creates new ElementKeyboardEvent instance.
| |
type : String
String representing the event type ("keydown" or "keyup")
|
| |
key : String
Printable representation of the key. If the key is not printable such as Shift or Return this should be an emtpy string "".
|
| |
keyCode : int
The keycode of the key that caused the event.
|
| |
ctrl : boolean
True if the ctrl key is pressed, false otherwise.
|
| |
alt : boolean
True if the alt key is pressed, false otherwise.
|
| |
shift : boolean
True if the shift key is pressed, false otherwise.
|
| |
meta : boolean
True if the meta key (such as windows key) is pressed, false otherwise.
|
|
|
|
getAlt()
|
ElementKeyboardEvent
|
Gets the state of the alt key.
| |
returns : boolean
True if the alt key is pressed, otherwise false.
|
|
|
|
getCtrl()
|
ElementKeyboardEvent
|
Gets the state of the ctrl key.
| |
returns : boolean
True if the ctrl key is pressed, otherwise false.
|
|
|
|
getKey()
|
ElementKeyboardEvent
|
Gets the printable version of the key which caused the event.
| |
returns : String
The printable version of the key which caused the event. Empty string "" if the key is not printable.
|
|
|
|
getKeyCode()
|
ElementKeyboardEvent
|
Gets the key code of the key which caused the event.
| |
returns : int
The keycode of the key which caused the event.
|
|
|
|
getMeta()
|
ElementKeyboardEvent
|
Gets the state of the meta key (such as the windows key).
| |
returns : boolean
True if the meta key is pressed, otherwise false.
|
|
|
|
getShift()
|
ElementKeyboardEvent
|
Gets the state of the shift key.
| |
returns : boolean
True if the shift key is pressed, otherwise false.
|
|
|
| Function |
Defined By |
|
ElementKeyboardEvent(type, key, keyCode, ctrl, alt, shift, meta)
|
[Constructor] ElementKeyboardEvent
|
Creates new ElementKeyboardEvent instance.
| |
type : String
String representing the event type ("keydown" or "keyup")
|
| |
key : String
Printable representation of the key. If the key is not printable such as Shift or Return this should be an emtpy string "".
|
| |
keyCode : int
The keycode of the key that caused the event.
|
| |
ctrl : boolean
True if the ctrl key is pressed, false otherwise.
|
| |
alt : boolean
True if the alt key is pressed, false otherwise.
|
| |
shift : boolean
True if the shift key is pressed, false otherwise.
|
| |
meta : boolean
True if the meta key (such as windows key) is pressed, false otherwise.
|
|
|
|
cancelEvent()
|
DispatcherEvent
|
Prevents processing of any subsequent event handlers
|
|
|
clone()
|
DispatcherEvent
|
Duplicates an instance of an Event or Event subclass.
The event dispatcher calls this when dispatching or re-dispatching events to multiple targets.
When creating a custom event class, you should override this and call the base class's clone()
then copy the new event properties to the cloned instance.
| |
returns : DispatcherEvent
A new event object instance identical to the cloned instance.
|
|
|
|
getAlt()
|
ElementKeyboardEvent
|
Gets the state of the alt key.
| |
returns : boolean
True if the alt key is pressed, otherwise false.
|
|
|
|
getCtrl()
|
ElementKeyboardEvent
|
Gets the state of the ctrl key.
| |
returns : boolean
True if the ctrl key is pressed, otherwise false.
|
|
|
|
getCurrentTarget()
|
ElementEvent
|
Gets the element that is currently dispatching the event. Note that is
is not always the same as getTarget() which returns the element that
originally dispatched the event.
For Example, when a click listener is registered to an element, and a child of that
element dispatches a click (like a Button), the target will be the child (Button) and the
current target will be the element that registered the click listener.
| |
returns : CanvasElement
The element that is currently dispatching the event.
|
|
|
|
getDefaultPrevented()
|
ElementEvent
|
Gets the default prevented state of the event.
| |
returns : boolean
Returns true if preventDefault() has been called, false otherwise.
|
|
|
|
getIsCanceled()
|
DispatcherEvent
|
Checks if the event has been canceled
| |
returns : boolean
Returns true if the event has been canceled, otherwise false
|
|
|
|
getKey()
|
ElementKeyboardEvent
|
Gets the printable version of the key which caused the event.
| |
returns : String
The printable version of the key which caused the event. Empty string "" if the key is not printable.
|
|
|
|
getKeyCode()
|
ElementKeyboardEvent
|
Gets the key code of the key which caused the event.
| |
returns : int
The keycode of the key which caused the event.
|
|
|
|
getMeta()
|
ElementKeyboardEvent
|
Gets the state of the meta key (such as the windows key).
| |
returns : boolean
True if the meta key is pressed, otherwise false.
|
|
|
|
getPhase()
|
ElementEvent
|
Gets the current phase of the event. ("bubbling" or "capture")
| |
returns : String
String representing the event's current phase when dispatched ("bubbling" or "capture")
|
|
|
|
getShift()
|
ElementKeyboardEvent
|
Gets the state of the shift key.
| |
returns : boolean
True if the shift key is pressed, otherwise false.
|
|
|
|
getTarget()
|
DispatcherEvent
|
Gets event target
| |
returns : Object
Object that originally dispatched the event
|
|
|
|
getType()
|
DispatcherEvent
|
Gets the event type
| |
returns : String
String representing the event type
|
|
|
|
preventDefault()
|
ElementEvent
|
Prevents the event's typical action from being taken. This is also sometimes used to "consume"
the event so it is only processed once. Such as preventing a mousewheel event from scrolling multiple
parent/child views at once. A scroll-able child will call preventDefault() to "consume" the event
and prevent any parents from also scrolling.
|
|