com.jogamp.newt.event
Class NEWTEvent

java.lang.Object
  extended by java.util.EventObject
      extended by com.jogamp.newt.event.NEWTEvent
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
InputEvent, WindowEvent

public class NEWTEvent
extends EventObject

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:


See Also:
Serialized Form

Field Summary
static Object consumedTag
          Object when attached via setAttachment(Object) marks the event consumed, ie.
 
Method Summary
 Object getAttachment()
           
 short getEventType()
          Returns the event type of this event.
 long getWhen()
          Returns the timestamp, in milliseconds, of this event.
 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.
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

consumedTag

public static final Object consumedTag
Object when attached via setAttachment(Object) marks the event consumed, ie. stops propagating the event any further to the other event listener.

Method Detail

getEventType

public final short getEventType()
Returns the event type of this event.


getWhen

public final long getWhen()
Returns the timestamp, in milliseconds, of this event.


setAttachment

public final 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.

Parameters:
attachment - User application specific object

getAttachment

public final Object getAttachment()
Returns:
The user application specific attachment, or null

toString

public String toString()
Overrides:
toString in class EventObject

toString

public StringBuilder toString(StringBuilder sb)

toHexString

public static String toHexString(short hex)


Copyright 2010 JogAmp Community.