|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.events.KeyedEvent
A basic event class which can be used with the KeyedEventDispatcher.
Although event dispatching works with class java.lang.Object and does
not need wt.events.KeyedEvent, class wt.events.KeyedEvent provides basic
functionality commonly used to process events.
Supported API: true
Extendable: true
Field Summary | |
private String |
className
|
private static String |
CLASSNAME
|
private String |
eventKey
|
private Object |
eventTarget
|
private String |
eventType
|
private static String |
RESOURCE
|
Constructor Summary | |
KeyedEvent(String eventType)
Construct a Keyed Event Supported API: false |
|
KeyedEvent(String eventType,
Object eventTarget)
Construct a Keyed Event. |
Method Summary | |
static String |
generateEventKey(Class eventClass,
String eventType)
Generate a prototype key based on the class of the concrete event class and a user defined type. |
protected static String |
generateEventKey(String eventClass,
String eventType)
Generate a prototype key based on the class of the concrete event class and a user defined type. |
String |
getConceptualClassname()
Return the conceptual class name of the concrete event class. |
String |
getEventKey()
Return the event key. |
Object |
getEventTarget()
Gets the value of the attribute: eventTarget; The primary target of this event. |
String |
getEventType()
Gets the value of the attribute: eventType; The type of the event. |
KeyedEvent |
toMultiObjectEvent()
Converts a single-object event to a multi-object event. |
KeyedEvent[] |
toSingleObjectEvents()
Converts a multi-object event to an array of single-object events. |
String |
toString()
Return a String representation of this event Supported API: false |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
private static final String RESOURCE
private static final String CLASSNAME
private String eventType
private Object eventTarget
private String className
private String eventKey
Constructor Detail |
public KeyedEvent(String eventType, Object eventTarget)
eventType
- The type of the event, may be nulleventTarget
- The Primary target of the event, may be nullpublic KeyedEvent(String eventType)
eventType
- The type of the event, may be nullMethod Detail |
public String getEventType()
public Object getEventTarget()
public String getConceptualClassname()
public String getEventKey()
"
Supported API: false
public KeyedEvent[] toSingleObjectEvents() throws WTException
KeyedEventDispatcher.dispatchVetoableMultiObjectEvent(java.lang.Object, java.lang.String)
and KeyedEventDispatcher.dispatchMultiObjectEvent(java.lang.Object, java.lang.String)
), but single-object
listeners (listeners implementing KeyedEventListener.notifyVetoableEvent(java.lang.Object)
and KeyedEventListener.notifyEvent(java.lang.Object)
) are registered. It is
necessary to convert the multi-object event to an array of single-object
events to properly notify the single-object listeners.
Note: This API is called internally and only when needed by the event
dispatch mechanism.
Supported API: false
WTException
public KeyedEvent toMultiObjectEvent()
KeyedEventDispatcher#dispatchVetoabletEvent
and KeyedEventDispatcher.dispatchEvent(java.lang.Object, java.lang.String)
), but multi-object
listeners (listeners implementing KeyedEventListener.notifyVetoableMultiObjectEvent(java.lang.Object)
and KeyedEventListener.notifyMultiObjectEvent(java.lang.Object)
) are registered.
It is necessary to convert the single-object event to a multi-object
event to properly notify the multi-object listeners.
Note: This API is called internally and only when needed by the event
dispatch mechanism.
Supported API: false
public String toString()
public static String generateEventKey(Class eventClass, String eventType)
eventClass
- the class of the event to which the listeners subscribes.eventType
- the type of the event, may be null.
protected static String generateEventKey(String eventClass, String eventType)
eventClass
- The Name of the class of the event to which the listener subscribeseventType
- the type of the event, may be null
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |