public class NEWTEvent extends EventObject
100..10x
200..20x
300..30x
600..60x
Modifier and Type | Field and Description |
---|---|
static Object |
consumedTag
See
setConsumed(boolean) for description. |
Modifier and Type | Method and Description |
---|---|
Object |
getAttachment() |
short |
getEventType()
Returns the event type of this event.
|
long |
getWhen()
Returns the timestamp, in milliseconds, of this event.
|
boolean |
isConsumed()
|
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) |
getSource
public static final Object consumedTag
setConsumed(boolean)
for description.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()
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)
Copyright 2010 JogAmp Community.