Top Description Fields Constructors Methods
com.jogamp.newt.event

public Class NEWTEvent

extends EventObject
Class Inheritance
Known Direct Subclasses
com.jogamp.newt.event.OutputEvent, com.jogamp.newt.event.WindowEvent, com.jogamp.newt.event.InputEvent
Annotations
@SuppressWarnings:serial

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:

Field Summary

Modifier and TypeField and Description
private Object
public static final Object
consumedTag

See setConsumed(boolean) for description.

pack-priv static final boolean
private final short
private final long
Inherited from java.util.EventObject:
source

Constructor Summary

AccessConstructor and Description
protected
NEWTEvent(final short eventType, final Object source, final long when)

Method Summary

Modifier and TypeMethod and Description
public final Object

Returns:

The user application specific attachment, or null
getAttachment
()

public final short
getEventType()

Returns the event type of this event.

public final long
getWhen()

Returns the timestamp, in milliseconds, of this event.

public final boolean
isConsumed()

Returns true if this events has been consumed, otherwise false.

public final void
setAttachment(final Object
User application specific object
attachment
)

Attach the passed object to this event.

public final void
setConsumed(final boolean consumed)

If consumed is true, this event is marked as consumed, ie.

public static String
toHexString(final short hex)

public String
toString()

Overrides java.util.EventObject.toString.

Returns a String representation of this EventObject.
public StringBuilder
Inherited from java.util.EventObject:
getSource

Field Detail

attachmentback to summary
private Object attachment
consumedTagback to summary
public static final Object consumedTag

See setConsumed(boolean) for description.

DEBUGback to summary
pack-priv static final boolean DEBUG
eventTypeback to summary
private final short eventType
whenback to summary
private final long when

Constructor Detail

NEWTEventback to summary
protected NEWTEvent(final short eventType, final Object source, final long when)

Method Detail

getAttachmentback to summary
public final Object getAttachment()
Returns:Object

The user application specific attachment, or null

getEventTypeback to summary
public final short getEventType()

Returns the event type of this event.

getWhenback to summary
public final long getWhen()

Returns the timestamp, in milliseconds, of this event.

isConsumedback to summary
public final boolean isConsumed()

Returns true if this events has been consumed, otherwise false.

See Also
setConsumed(boolean)
setAttachmentback to summary
public final void setAttachment(final 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:Object

User application specific object

setConsumedback to summary
public final void setConsumed(final boolean consumed)

If 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:

toHexStringback to summary
public static String toHexString(final short hex)
toStringback to summary
public String toString()

Overrides java.util.EventObject.toString.

Doc from java.util.EventObject.toString.

Returns a String representation of this EventObject.

Returns:String

a String representation of this EventObject

Annotations
@Override
toStringback to summary
public StringBuilder toString(StringBuilder sb)