JOGL v2.6.0-rc-20250706
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.nativewindow.awt.AWTWindowClosingProtocol Class Reference
Inheritance diagram for com.jogamp.nativewindow.awt.AWTWindowClosingProtocol:
Collaboration diagram for com.jogamp.nativewindow.awt.AWTWindowClosingProtocol:

Classes

class  WindowClosingAdapter
 

Public Member Functions

 AWTWindowClosingProtocol (final Component comp, final Runnable closingOperationClose, final Runnable closingOperationNOP)
 
final boolean addClosingListener () throws IllegalStateException
 Adds this closing listener to the components Window if exist and only one time. More...
 
final boolean removeClosingListener ()
 
final WindowClosingMode getDefaultCloseOperation ()
 
final WindowClosingMode setDefaultCloseOperation (final WindowClosingMode op)
 
WindowClosingMode getDefaultCloseOperation ()
 
WindowClosingMode setDefaultCloseOperation (WindowClosingMode op)
 

Detailed Description

Definition at line 41 of file AWTWindowClosingProtocol.java.

Constructor & Destructor Documentation

◆ AWTWindowClosingProtocol()

com.jogamp.nativewindow.awt.AWTWindowClosingProtocol.AWTWindowClosingProtocol ( final Component  comp,
final Runnable  closingOperationClose,
final Runnable  closingOperationNOP 
)
Parameters
compmandatory AWT component which AWT Window is being queried by parent traversal
closingOperationClosemandatory closing operation, triggered if windowClosing and WindowClosingMode#DISPOSE_ON_CLOSE
closingOperationNOPoptional closing operation, triggered if windowClosing and WindowClosingMode#DO_NOTHING_ON_CLOSE

Definition at line 56 of file AWTWindowClosingProtocol.java.

Member Function Documentation

◆ addClosingListener()

final boolean com.jogamp.nativewindow.awt.AWTWindowClosingProtocol.addClosingListener ( ) throws IllegalStateException

Adds this closing listener to the components Window if exist and only one time.

If the closing listener is already added, and IllegalStateException is thrown.

Returns
true if added, otherwise false.
Exceptions
IllegalStateException

Definition at line 88 of file AWTWindowClosingProtocol.java.

Here is the caller graph for this function:

◆ getDefaultCloseOperation()

final WindowClosingMode com.jogamp.nativewindow.awt.AWTWindowClosingProtocol.getDefaultCloseOperation ( )
Returns
the user set close operation if set by setDefaultCloseOperation(int), otherwise return the AWT/Swing close operation value translated to a WindowClosingProtocol value .

Implements com.jogamp.nativewindow.WindowClosingProtocol.

Definition at line 120 of file AWTWindowClosingProtocol.java.

Here is the caller graph for this function:

◆ removeClosingListener()

final boolean com.jogamp.nativewindow.awt.AWTWindowClosingProtocol.removeClosingListener ( )

Definition at line 102 of file AWTWindowClosingProtocol.java.

Here is the caller graph for this function:

◆ setDefaultCloseOperation()

final WindowClosingMode com.jogamp.nativewindow.awt.AWTWindowClosingProtocol.setDefaultCloseOperation ( final WindowClosingMode  op)
Parameters
opthe new close operation value
Returns
the previous close operation value
See also
WindowClosingMode::DISPOSE_ON_CLOSE
WindowClosingMode::DO_NOTHING_ON_CLOSE

Implements com.jogamp.nativewindow.WindowClosingProtocol.

Definition at line 131 of file AWTWindowClosingProtocol.java.

Here is the caller graph for this function:

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