textbender.o.rhinohide.events
Class RhiEvent

java.lang.Object
  extended by Rhinohide
      extended by RhiEvent
All Implemented Interfaces:
Event
Direct Known Subclasses:
RhiUIEvent

@ThreadSafe
abstract class RhiEvent
extends Rhinohide
implements Event

An event implemented as an overlay of a JavaScript event.


Field Summary
 
Fields inherited from class Rhinohide
window
 
Fields inherited from interface org.w3c.dom.events.Event
AT_TARGET, BUBBLING_PHASE, CAPTURING_PHASE
 
Constructor Summary
RhiEvent(RhiWindow window, netscape.javascript.JSObject jsObject, boolean isAsync)
           
 
Method Summary
 boolean getBubbles()
          Not yet coded.
 boolean getCancelable()
          Not yet coded.
 EventTarget getCurrentTarget()
          Not yet coded.
 short getEventPhase()
          Not yet coded.
 EventTarget getTarget()
           
 long getTimeStamp()
          Not yet coded.
 String getType()
           
static String getType(Rhinohide rhinohide)
          Returns the type of an event.
 void initEvent(String eventTypeArg, boolean canBubbleArg, boolean cancelableArg)
          Not yet coded.
 boolean isAsync()
          Returns true iff this event is to be asynchronously dispatched.
 void preventDefault()
           
 void stopPropagation()
           
static RhiEvent wrapEvent(RhiWindow window, netscape.javascript.JSObject jsObject, boolean isAsync)
          Creates a RhiEvent.
static RhiEvent wrapEvent(RhiWindow window, netscape.javascript.JSObject jsObject, boolean isAsync, String type)
          Creates a RhiEvent of a specified event type.
 
Methods inherited from class Rhinohide
call, callV, checkV, equals, eval, evalV, getMember, getMemberV, hashCode, jsObject, setMember, toJSObject, toString, window
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RhiEvent

RhiEvent(RhiWindow window,
         netscape.javascript.JSObject jsObject,
         boolean isAsync)
Method Detail

wrapEvent

public static RhiEvent wrapEvent(RhiWindow window,
                                 netscape.javascript.JSObject jsObject,
                                 boolean isAsync)
Creates a RhiEvent.

Parameters:
window - global object
jsObject - bridge to underlying JavaScript event, per jsObject()
isAsync - per isAsync()
Returns:
event, or null if jsObject is null
Throws:
StunnedRhinoException - if jsObject is non-null, and has no event 'type' property

wrapEvent

public static RhiEvent wrapEvent(RhiWindow window,
                                 netscape.javascript.JSObject jsObject,
                                 boolean isAsync,
                                 String type)
Creates a RhiEvent of a specified event type.

Parameters:
window - global object
jsObject - bridge to underlying JavaScript event, per jsObject()
isAsync - per isAsync()
type - jsObject's event type

isAsync

public final boolean isAsync()
Returns true iff this event is to be asynchronously dispatched. But there is no longer an async dispatcher. This method may soon be removed.


getBubbles

public final boolean getBubbles()
Not yet coded.

Specified by:
getBubbles in interface Event
Throws:
UnsupportedOperationException

getCancelable

public final boolean getCancelable()
Not yet coded.

Specified by:
getCancelable in interface Event
Throws:
UnsupportedOperationException

getCurrentTarget

public final EventTarget getCurrentTarget()
Not yet coded.

Specified by:
getCurrentTarget in interface Event
Throws:
UnsupportedOperationException

getEventPhase

public final short getEventPhase()
Not yet coded.

Specified by:
getEventPhase in interface Event
Throws:
UnsupportedOperationException

getTarget

public final EventTarget getTarget()
Specified by:
getTarget in interface Event

getTimeStamp

public final long getTimeStamp()
Not yet coded.

Specified by:
getTimeStamp in interface Event
Throws:
UnsupportedOperationException

getType

public final String getType()
Specified by:
getType in interface Event

getType

public static String getType(Rhinohide rhinohide)
Returns the type of an event.

Parameters:
rhinohide - of JavaScript event
Throws:
StunnedRhinoException - if jsObject is non-null, and has no event 'type' property

initEvent

public final void initEvent(String eventTypeArg,
                            boolean canBubbleArg,
                            boolean cancelableArg)
Not yet coded.

Specified by:
initEvent in interface Event
Throws:
UnsupportedOperationException

preventDefault

public final void preventDefault()
Specified by:
preventDefault in interface Event
Throws:
UnsupportedOperationException - if this event is asynchronously dispatched

stopPropagation

public final void stopPropagation()
Specified by:
stopPropagation in interface Event
Throws:
UnsupportedOperationException - if this event is asynchronously dispatched