OverviewSingleDeprecated

jsx3

class EVT

Object
->jsx3.lang.Object
  ->jsx3.EVT

All Implemented Interfaces:

jsx3.util.EventDispatcher

class EVT
extends jsx3.lang.Object
Deprecated. Use class jsx3.gui.Event instead.
This class is the static event controller for the GI framework. It abstracts the browser-specific implementations of the event object while providing extensions of its own (i.e., drag/drop, event binding, etc).

See Also:

jsx3.gui.Event

Constructor Summary
void
init(e : ?)
Use this instance initializer for wrapped access to the current event object event at a later point in time.
Method Summary
boolean
Returns true if the alt key was pressed
boolean
Returns true if the backspace key was pressed
int
Returns integer designating the mouse button clicked/moused-down/moused-up; 1 (left), 2 (right), and as supported
void
cancels event bubbling for the event
void
cancels the key from firing by setting the keyCode to 0 (zero) for the event
void
cancels the returnValue for the event
int
Returns the clientX property for the event (where it occurred on-screen)
int
Returns the clientY property for the event (where it occurred on-screen)
boolean
Returns true if the ctrl key was pressed
boolean
Returns true if the delete key was pressed
boolean
Returns true if the down-arrow key was pressed
boolean
Returns true if the end key was pressed
boolean
Returns true if the enter key was pressed
boolean
Returns true if the escape key was pressed
Object
Returns handle to the native browser event object (window.event)
boolean
Returns true if the native event object is present (if an event of any type actualy occurred)
HTMLElement
Returns handle to the HTML element that was moused away from (onmouseout)
int
Returns the actual position in the browser from the left edge for where the event occurred;
int
Returns the actual position in the browser from the top edge for where the event occurred;
Object
handleEvent(strType : String, bReturn : boolean)
Deprecated. use jsx3.gui.Event.publish() instead
boolean
Returns true if the home key was pressed
boolean
Returns true if the insert key was pressed
int
Returns integer representing the key code of the key just pressed/keyed-down
boolean
Returns true if the left-arrow key was pressed
boolean
Returns true if the left-mouse-button was clicked
boolean
Returns true if the page-down key was pressed
boolean
Returns true if the page-up key was pressed
void
registerEvent(EVENTTYPE : String, strCode : String)
Deprecated. use jsx3.gui.Event.subscribe instead
boolean
Returns true if the right-arrow key was pressed
boolean
Returns true if the right-mouse-button was clicked
void
setKeyCode(intKeyCode : int)
sets/updates the keycode for the event
void
setReturn(RETURN : String)
sets string message to set on the returnValue for the event
boolean
Returns true if the shift key was pressed
boolean
Returns true if the space bar was pressed
HTMLElement
Returns handle to the HTML element acted upon (click, mousedown, etc)
boolean
Returns true if the tab key was pressed
HTMLElement
Returns handle to the HTML element that was moused over (onmouseover)
boolean
Returns true if the up-arrow key was pressed
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf, toString
Constructor Detail

init

void init(e : ?)
Use this instance initializer for wrapped access to the current event object event at a later point in time.

Parameters:

e
Method Detail

altKey

boolean altKey()
Returns true if the alt key was pressed

Returns:

 

backspaceKey

boolean backspaceKey()
Returns true if the backspace key was pressed

Returns:

 

button

int button()
Returns integer designating the mouse button clicked/moused-down/moused-up; 1 (left), 2 (right), and as supported

Returns:

 

cancelBubble

void cancelBubble()
cancels event bubbling for the event

cancelKey

void cancelKey()
cancels the key from firing by setting the keyCode to 0 (zero) for the event

cancelReturn

void cancelReturn()
cancels the returnValue for the event

clientX

int clientX()
Returns the clientX property for the event (where it occurred on-screen)

Returns:

pixel position  

clientY

int clientY()
Returns the clientY property for the event (where it occurred on-screen)

Returns:

pixel position  

ctrlKey

boolean ctrlKey()
Returns true if the ctrl key was pressed

Returns:

 

deleteKey

boolean deleteKey()
Returns true if the delete key was pressed

Returns:

 

downArrow

boolean downArrow()
Returns true if the down-arrow key was pressed

Returns:

 

endKey

boolean endKey()
Returns true if the end key was pressed

Returns:

 

enterKey

boolean enterKey()
Returns true if the enter key was pressed

Returns:

 

escapeKey

boolean escapeKey()
Returns true if the escape key was pressed

Returns:

 

event

Object event()
Returns handle to the native browser event object (window.event)

Returns:

event  

exists

boolean exists()
Returns true if the native event object is present (if an event of any type actualy occurred)

Returns:

 

fromElement

HTMLElement fromElement()
Returns handle to the HTML element that was moused away from (onmouseout)

Returns:

HTML object  

getTrueX

int getTrueX()
Returns the actual position in the browser from the left edge for where the event occurred;

Returns:

pixel position  

getTrueY

int getTrueY()
Returns the actual position in the browser from the top edge for where the event occurred;

Returns:

pixel position  

handleEvent

Object handleEvent(strType : String, bReturn : boolean)
Deprecated. use jsx3.gui.Event.publish() instead
the JSXEVENT class maintains an object array indexed via the EVENTTYPE constant for the given event. When the event bubbles up the IE DOM, or when this function is called directly, the JScript code bound to the given event is exectued via the JScript 'eval()' function

Parameters:

strTypethe event type to handle
bReturn

Returns:

the result of the event eval, but only if parameter bReturn is true, otherwise no return statement 

homeKey

boolean homeKey()
Returns true if the home key was pressed

Returns:

 

insertKey

boolean insertKey()
Returns true if the insert key was pressed

Returns:

 

keyCode

int keyCode()
Returns integer representing the key code of the key just pressed/keyed-down

Returns:

keycode  

leftArrow

boolean leftArrow()
Returns true if the left-arrow key was pressed

Returns:

 

leftButton

boolean leftButton()
Returns true if the left-mouse-button was clicked

Returns:

 

pageDownKey

boolean pageDownKey()
Returns true if the page-down key was pressed

Returns:

 

pageUpKey

boolean pageUpKey()
Returns true if the page-up key was pressed

Returns:

 

registerEvent

void registerEvent(EVENTTYPE : String, strCode : String)
Deprecated. use jsx3.gui.Event.subscribe instead
typically called by a JSX GUI foundation class (such as the JSXMenu class). Allows the given class to be notified when a given event occurs. For example in the case of the JSXMenu class, it must be notified to hide any visible menu when the user mouses down in the document.

Parameters:

EVENTTYPEthe type of event to handle such as mousedown, mouseup, etc
strCodeJScript code (passed as string) that will be evaluated via the JScript eval() function when the given event fires. Note: it is important that the code contain a trailing semicolon ';', in case a subsequent function binds its own callback code

See Also:

jsx3.gui.Event.subscribe()

rightArrow

boolean rightArrow()
Returns true if the right-arrow key was pressed

Returns:

 

rightButton

boolean rightButton()
Returns true if the right-mouse-button was clicked

Returns:

 

setKeyCode

void setKeyCode(intKeyCode : int)
sets/updates the keycode for the event

Parameters:

intKeyCodekeycode

setReturn

void setReturn(RETURN : String)
sets string message to set on the returnValue for the event

Parameters:

RETURNstring message to set on the returnValue for the event

shiftKey

boolean shiftKey()
Returns true if the shift key was pressed

Returns:

 

spaceKey

boolean spaceKey()
Returns true if the space bar was pressed

Returns:

 

srcElement

HTMLElement srcElement()
Returns handle to the HTML element acted upon (click, mousedown, etc)

Returns:

HTML object  

tabKey

boolean tabKey()
Returns true if the tab key was pressed

Returns:

 

toElement

HTMLElement toElement()
Returns handle to the HTML element that was moused over (onmouseover)

Returns:

HTML object  

upArrow

boolean upArrow()
Returns true if the up-arrow key was pressed

Returns: