ice.pilots.html4
Class DOMEvent

java.lang.Object
  extended byice.storm.DynamicObject
      extended byice.pilots.html4.DOMEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
DMutationEvent, DOMUIEvent

public class DOMEvent
extends DynamicObject
implements Event


Field Summary
static int ABORT
           
static int BLUR
           
static int CHANGE
           
static int CLICK
           
static int CONTEXTMENU
           
static int CSSModified
           
static int DBLCLICK
           
protected  DNode defaultActionTarget
           
protected  DDocument doc
           
static int DOMAttrModified
           
static int DOMNodeInserted
           
static int DOMNodeRemoved
           
static int DOMSubtreeModified
           
static int ERROR
           
static int FOCUS
           
static int GOTO
           
static int HELP
           
static int KEYDOWN
           
static int KEYPRESS
           
static int KEYUP
           
static int LOAD
           
static int MOUSEDOWN
           
static int MOUSEMOVE
           
static int MOUSEOUT
           
static int MOUSEOVER
           
static int MOUSEUP
           
static int NUM_EVENTS
           
static int RESET
           
static int RESIZE
           
static int SCROLL
           
static int SELECT
           
static int SUBMIT
           
static int UNLOAD
           
 
Fields inherited from class ice.storm.DynamicObject
NOT_FOUND, SETD_IGNORE, SETD_NOT_FOUND, SETD_OK
 
Fields inherited from interface org.w3c.dom.events.Event
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE
 
Constructor Summary
protected DOMEvent(DDocument doc, int id)
           
 
Method Summary
protected  void copyUIDataFrom(DOMEvent source)
           
 Object execDynamicMethod(String name, Object[] args, DynEnv env)
          Perform function-like actions for `name' with the given args.
 boolean getBubbles()
          Used to indicate whether or not an event is a bubbling event.
 boolean getCancelable()
          Used to indicate whether or not an event can have its default action prevented.
 Node getCurrentNode()
           
 EventTarget getCurrentTarget()
          Used to indicate the EventTarget whose EventListeners are currently being processed.
 DDocument getDDocument()
           
 Object getDynamicValue(String name, DynEnv env)
          Returns the `key' field or Defs.NOT_FOUND if `name' does not exist.
 short getEventPhase()
          Used to indicate which phase of event flow is currently being evaluated.
 Object getSystemEvent()
           
 EventTarget getTarget()
          Used to indicate the EventTarget to which the event was originally dispatched.
 long getTimeStamp()
          Used to specify the time (in milliseconds relative to the epoch) at which the event was created.
 String getType()
          The name of the event (case-insensitive).
 int getTypeId()
           
 Viewport getViewport()
           
 void initEvent(String eventTypeArg, boolean canBubbleArg, boolean cancelableArg)
          The initEvent method is used to initialize the value of an Event created through the DocumentEvent interface.
 boolean isDefaultCancelled()
           
 boolean isDefaultDone()
           
 void preventDefault()
          If an event is cancelable, the preventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur.
 void setDefaultDone()
           
 int setDynamicValue(String name, Object value, DynEnv env)
          Set field `name' to `value'.
 void setSystemEvent(Object event)
          Set system event that this event wraps.
 void stopPropagation()
          The stopPropagation method is used prevent further propagation of an event during event flow.
 String toString()
           
 
Methods inherited from class ice.storm.DynamicObject
deleteSlot, deleteSlot, getDynamicScopeParent, getEnumeratableIds, getMethodPropertySource, getScriptDataLock, getScriptWrapper, getSlot, getSlot, hasSlot, hasSlot, javaReflectionTarget, readOnlySlots, script_toSource, script_toString, setScriptWrapperIfAbsent, setSlot, setSlot, unlinkAllSlots
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CLICK

public static final int CLICK
See Also:
Constant Field Values

DBLCLICK

public static final int DBLCLICK
See Also:
Constant Field Values

MOUSEDOWN

public static final int MOUSEDOWN
See Also:
Constant Field Values

MOUSEUP

public static final int MOUSEUP
See Also:
Constant Field Values

MOUSEOVER

public static final int MOUSEOVER
See Also:
Constant Field Values

MOUSEMOVE

public static final int MOUSEMOVE
See Also:
Constant Field Values

MOUSEOUT

public static final int MOUSEOUT
See Also:
Constant Field Values

KEYPRESS

public static final int KEYPRESS
See Also:
Constant Field Values

KEYDOWN

public static final int KEYDOWN
See Also:
Constant Field Values

KEYUP

public static final int KEYUP
See Also:
Constant Field Values

RESIZE

public static final int RESIZE
See Also:
Constant Field Values

SCROLL

public static final int SCROLL
See Also:
Constant Field Values

LOAD

public static final int LOAD
See Also:
Constant Field Values

UNLOAD

public static final int UNLOAD
See Also:
Constant Field Values

ABORT

public static final int ABORT
See Also:
Constant Field Values

ERROR

public static final int ERROR
See Also:
Constant Field Values

SELECT

public static final int SELECT
See Also:
Constant Field Values

CHANGE

public static final int CHANGE
See Also:
Constant Field Values

SUBMIT

public static final int SUBMIT
See Also:
Constant Field Values

RESET

public static final int RESET
See Also:
Constant Field Values

FOCUS

public static final int FOCUS
See Also:
Constant Field Values

BLUR

public static final int BLUR
See Also:
Constant Field Values

HELP

public static final int HELP
See Also:
Constant Field Values

CONTEXTMENU

public static final int CONTEXTMENU
See Also:
Constant Field Values

DOMSubtreeModified

public static final int DOMSubtreeModified
See Also:
Constant Field Values

DOMNodeInserted

public static final int DOMNodeInserted
See Also:
Constant Field Values

DOMNodeRemoved

public static final int DOMNodeRemoved
See Also:
Constant Field Values

DOMAttrModified

public static final int DOMAttrModified
See Also:
Constant Field Values

CSSModified

public static final int CSSModified
See Also:
Constant Field Values

GOTO

public static final int GOTO
See Also:
Constant Field Values

NUM_EVENTS

public static final int NUM_EVENTS
See Also:
Constant Field Values

doc

protected DDocument doc

defaultActionTarget

protected DNode defaultActionTarget
Constructor Detail

DOMEvent

protected DOMEvent(DDocument doc,
                   int id)
Method Detail

getDDocument

public final DDocument getDDocument()

getViewport

public final Viewport getViewport()

copyUIDataFrom

protected void copyUIDataFrom(DOMEvent source)

getTypeId

public int getTypeId()

getType

public String getType()
Description copied from interface: Event
The name of the event (case-insensitive). The name must be an XML name.

Specified by:
getType in interface Event

getTarget

public EventTarget getTarget()
Description copied from interface: Event
Used to indicate the EventTarget to which the event was originally dispatched.

Specified by:
getTarget in interface Event

getCurrentNode

public Node getCurrentNode()

getCurrentTarget

public EventTarget getCurrentTarget()
Description copied from interface: Event
Used to indicate the EventTarget whose EventListeners are currently being processed. This is particularly useful during capturing and bubbling.

Specified by:
getCurrentTarget in interface Event

getEventPhase

public short getEventPhase()
Description copied from interface: Event
Used to indicate which phase of event flow is currently being evaluated.

Specified by:
getEventPhase in interface Event

getBubbles

public boolean getBubbles()
Description copied from interface: Event
Used to indicate whether or not an event is a bubbling event. If the event can bubble the value is true, else the value is false.

Specified by:
getBubbles in interface Event

getCancelable

public boolean getCancelable()
Description copied from interface: Event
Used to indicate whether or not an event can have its default action prevented. If the default action can be prevented the value is true, else the value is false.

Specified by:
getCancelable in interface Event

stopPropagation

public void stopPropagation()
Description copied from interface: Event
The stopPropagation method is used prevent further propagation of an event during event flow. If this method is called by any EventListener the event will cease propagating through the tree. The event will complete dispatch to all listeners on the current EventTarget before event flow stops. This method may be used during any stage of event flow.

Specified by:
stopPropagation in interface Event

preventDefault

public void preventDefault()
Description copied from interface: Event
If an event is cancelable, the preventDefault method is used to signify that the event is to be canceled, meaning any default action normally taken by the implementation as a result of the event will not occur. If, during any stage of event flow, the preventDefault method is called the event is canceled. Any default action associated with the event will not occur. Calling this method for a non-cancelable event has no effect. Once preventDefault has been called it will remain in effect throughout the remainder of the event's propagation. This method may be used during any stage of event flow.

Specified by:
preventDefault in interface Event

initEvent

public void initEvent(String eventTypeArg,
                      boolean canBubbleArg,
                      boolean cancelableArg)
Description copied from interface: Event
The initEvent method is used to initialize the value of an Event created through the DocumentEvent interface. This method may only be called before the Event has been dispatched via the dispatchEvent method, though it may be called multiple times during that phase if necessary. If called multiple times the final invocation takes precedence. If called from a subclass of Event interface only the values specified in the initEvent method are modified, all other attributes are left unchanged.

Specified by:
initEvent in interface Event

isDefaultCancelled

public boolean isDefaultCancelled()

getTimeStamp

public long getTimeStamp()
Description copied from interface: Event
Used to specify the time (in milliseconds relative to the epoch) at which the event was created. Due to the fact that some systems may not provide this information the value of timeStamp may be not available for all events. When not available, a value of 0 will be returned. Examples of epoch time are the time of the system start or 0:0:0 UTC 1st January 1970.

Specified by:
getTimeStamp in interface Event

toString

public String toString()

isDefaultDone

public boolean isDefaultDone()

setDefaultDone

public void setDefaultDone()

getSystemEvent

public Object getSystemEvent()

setSystemEvent

public void setSystemEvent(Object event)
Set system event that this event wraps. The method can only be called once.


getDynamicValue

public Object getDynamicValue(String name,
                              DynEnv env)
Description copied from class: DynamicObject
Returns the `key' field or Defs.NOT_FOUND if `name' does not exist. Returns `FUNCTION_MARK' if `name' represent a function that can be invoke via execDynamicMethod. Note that returned `null' indicates that value is present but set to null.

Overrides:
getDynamicValue in class DynamicObject

setDynamicValue

public int setDynamicValue(String name,
                           Object value,
                           DynEnv env)
Description copied from class: DynamicObject
Set field `name' to `value'. Use `env' to unwrap `value' to a particular type or store it as is

Overrides:
setDynamicValue in class DynamicObject
Returns:
SETD_NOT_FOUND if fied `name' is absent, SETD_IGNORE if field exist but set is ignored SETD_OK if set opeartion was ok

execDynamicMethod

public Object execDynamicMethod(String name,
                                Object[] args,
                                DynEnv env)
Description copied from class: DynamicObject
Perform function-like actions for `name' with the given args. Returns the result or Defs.NOT_FOUND if name is not associated with function action. Should return result of env.wrapVoid() to indicate method without return value. Use `env' to unwrap `args' elements to a particular type.

Overrides:
execDynamicMethod in class DynamicObject
See Also:
DynEnv