JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.newt.event.NEWTEvent Class Reference

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. More...

Inheritance diagram for com.jogamp.newt.event.NEWTEvent:
Collaboration diagram for com.jogamp.newt.event.NEWTEvent:

Public Member Functions

final short getEventType ()
 Returns the event type of this event. More...
 
final long getWhen ()
 Returns the timestamp, in milliseconds, of this event. More...
 
final void setAttachment (final Object attachment)
 Attach the passed object to this event. More...
 
final Object getAttachment ()
 
final boolean isConsumed ()
 Returns true if this events has been consumed, otherwise false. More...
 
final void setConsumed (final boolean consumed)
 If consumed is true, this event is marked as consumed, ie. More...
 
String toString ()
 
StringBuilder toString (StringBuilder sb)
 

Static Public Member Functions

static String toHexString (final short hex)
 

Static Public Attributes

static final Object consumedTag = new Object()
 See setConsumed(boolean) for description. More...
 

Protected Member Functions

 NEWTEvent (final short eventType, final Object source, final long when)
 

Detailed Description

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:


Definition at line 52 of file NEWTEvent.java.

Constructor & Destructor Documentation

◆ NEWTEvent()

com.jogamp.newt.event.NEWTEvent.NEWTEvent ( final short  eventType,
final Object  source,
final long  when 
)
protected

Definition at line 64 of file NEWTEvent.java.

Member Function Documentation

◆ getAttachment()

final Object com.jogamp.newt.event.NEWTEvent.getAttachment ( )
Returns
The user application specific attachment, or null

Definition at line 96 of file NEWTEvent.java.

Here is the caller graph for this function:

◆ getEventType()

final short com.jogamp.newt.event.NEWTEvent.getEventType ( )

Returns the event type of this event.

Definition at line 72 of file NEWTEvent.java.

Here is the caller graph for this function:

◆ getWhen()

final long com.jogamp.newt.event.NEWTEvent.getWhen ( )

Returns the timestamp, in milliseconds, of this event.

Definition at line 77 of file NEWTEvent.java.

Here is the caller graph for this function:

◆ isConsumed()

final boolean com.jogamp.newt.event.NEWTEvent.isConsumed ( )

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

See also
setConsumed(boolean)

Definition at line 105 of file NEWTEvent.java.

Here is the caller graph for this function:

◆ setAttachment()

final void com.jogamp.newt.event.NEWTEvent.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
attachmentUser application specific object

Definition at line 89 of file NEWTEvent.java.

◆ setConsumed()

final void com.jogamp.newt.event.NEWTEvent.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:

Definition at line 126 of file NEWTEvent.java.

Here is the caller graph for this function:

◆ toHexString()

static String com.jogamp.newt.event.NEWTEvent.toHexString ( final short  hex)
static

Definition at line 146 of file NEWTEvent.java.

◆ toString() [1/2]

◆ toString() [2/2]

Member Data Documentation

◆ consumedTag

final Object com.jogamp.newt.event.NEWTEvent.consumedTag = new Object()
static

See setConsumed(boolean) for description.

Definition at line 56 of file NEWTEvent.java.


The documentation for this class was generated from the following file: