|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.EventObject
com.jogamp.newt.event.NEWTEvent
public class NEWTEvent
NEWT events are provided for notification purposes ONLY;
The NEWT will automatically handle the event semantics internally, regardless of whether a program is receiving these events or not.
The actual event semantic is processed before the event is send.
Event type registry:
100..10x
200..20x
300..30x
600..60x
Field Summary | |
---|---|
static Object |
consumedTag
See setConsumed(boolean) for description. |
Method Summary | |
---|---|
Object |
getAttachment()
|
short |
getEventType()
Returns the event type of this event. |
long |
getWhen()
Returns the timestamp, in milliseconds, of this event. |
boolean |
isConsumed()
Returns true if this events has been consumed ,
otherwise false . |
void |
setAttachment(Object attachment)
Attach the passed object to this event. If an object was previously attached, it will be replaced. Attachments to NEWT events allow users to pass on information from one custom listener to another, ie custom listener to listener communication. |
void |
setConsumed(boolean consumed)
If consumed is true , this event is marked as consumed,
ie. |
static String |
toHexString(short hex)
|
String |
toString()
|
StringBuilder |
toString(StringBuilder sb)
|
Methods inherited from class java.util.EventObject |
---|
getSource |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Object consumedTag
setConsumed(boolean)
for description.
Method Detail |
---|
public final short getEventType()
public final long getWhen()
public final void setAttachment(Object attachment)
attachment
- User application specific objectpublic final Object getAttachment()
public final boolean isConsumed()
true
if this events has been consumed
,
otherwise false
.
setConsumed(boolean)
public final void setConsumed(boolean consumed)
consumed
is true
, this event is marked as consumed,
ie. the event will not be propagated any further to potential other event listener.
Otherwise the event will be propagated to other event listener, the default.
The event is marked as being consumed while attaching
the consumedTag
.
Events with platform specific actions will be supressed if marked as consumed. Examples are:
KeyEvent.VK_ESCAPE
on Android's BACK button w/ Activity::finish()KeyEvent.VK_HOME
on Android's HOME button w/ Intend.ACTION_MAIN[Intend.CATEGORY_HOME]
public String toString()
toString
in class EventObject
public StringBuilder toString(StringBuilder sb)
public static String toHexString(short hex)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |