JOGL v2.6.0-rc-20250712
JOGL, High-Performance Graphics Binding for Java™ (public API).
com.jogamp.newt.NewtFactory Class Reference
Collaboration diagram for com.jogamp.newt.NewtFactory:

Static Public Member Functions

static IOUtil.ClassResources getWindowIcons ()
 Returns the application window icon resources to be used. More...
 
static void setWindowIcons (final IOUtil.ClassResources cres)
 Allow user to set custom window icons, only applicable at application start before creating any NEWT instance. More...
 
static Class<?> getCustomClass (final String packageName, final String classBaseName)
 
static synchronized void setUseEDT (final boolean onoff)
 Toggles the usage of an EventDispatchThread while creating a Display. More...
 
static boolean useEDT ()
 
static Display createDisplay (final String name)
 Create a Display entity. More...
 
static Display createDisplay (final String name, final boolean reuse)
 Create a Display entity. More...
 
static Display createDisplay (final String type, final String name)
 Create a Display entity. More...
 
static Display createDisplay (final String type, final String name, final boolean reuse)
 Create a Display entity. More...
 
static Screen createScreen (final Display display, final int index)
 Create a Screen entity. More...
 
static Window createWindow (final CapabilitiesImmutable caps)
 Create a top level Window entity on the default Display and default Screen. More...
 
static Window createWindow (final Screen screen, final CapabilitiesImmutable caps)
 Create a top level Window entity. More...
 
static Window createWindow (final NativeWindow parentWindow, final CapabilitiesImmutable caps)
 Create a child Window entity attached to the given parent. More...
 
static Window createWindow (final String displayConnection, final int screenIdx, final long parentWindowHandle, final CapabilitiesImmutable caps)
 Create a child Window entity attached to the given parent, incl native creation
More...
 
static Window createWindow (final Object[] cstrArguments, final Screen screen, final CapabilitiesImmutable caps)
 Ability to try a Window type with a constructor argument, if supported .. More...
 
static Display createDisplay (final String type, final long handle, final boolean reuse)
 Instantiate a Display entity using the native handle. More...
 
static boolean isScreenCompatible (final NativeWindow parent, final Screen childScreen)
 
static Screen createCompatibleScreen (final NativeWindow parent)
 
static Screen createCompatibleScreen (final NativeWindow parent, final Screen childScreen)
 

Static Public Attributes

static final boolean DEBUG_IMPLEMENTATION = Debug.debug("Window")
 
static final String DRIVER_DEFAULT_ROOT_PACKAGE = "jogamp.newt.driver"
 

Detailed Description

Definition at line 57 of file NewtFactory.java.

Member Function Documentation

◆ createCompatibleScreen() [1/2]

static Screen com.jogamp.newt.NewtFactory.createCompatibleScreen ( final NativeWindow  parent)
static

Definition at line 370 of file NewtFactory.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createCompatibleScreen() [2/2]

static Screen com.jogamp.newt.NewtFactory.createCompatibleScreen ( final NativeWindow  parent,
final Screen  childScreen 
)
static

Definition at line 374 of file NewtFactory.java.

Here is the call graph for this function:

◆ createDisplay() [1/5]

static Display com.jogamp.newt.NewtFactory.createDisplay ( final String  name)
static

Create a Display entity.

Native creation is lazily done at usage, ie. Display#addReference().

An already existing display connection of the same name will be reused.

Parameters
namethe display connection name which is a technical platform specific detail, see AbstractGraphicsDevice#getConnection(). Use null for default.
Returns
the new or reused Display instance

Definition at line 151 of file NewtFactory.java.

Here is the call graph for this function:

◆ createDisplay() [2/5]

static Display com.jogamp.newt.NewtFactory.createDisplay ( final String  name,
final boolean  reuse 
)
static

Create a Display entity.

Native creation is lazily done at usage, ie. Display#addReference().

An already existing display connection of the same name will be reused if reuse is true, otherwise a new instance is being created.

Parameters
namethe display connection name which is a technical platform specific detail, see AbstractGraphicsDevice#getConnection(). Use null for default.
reuseattempt to reuse an existing Display with same name if set true, otherwise create a new instance.
Returns
the new or reused Display instance

Definition at line 169 of file NewtFactory.java.

Here is the call graph for this function:

◆ createDisplay() [3/5]

static Display com.jogamp.newt.NewtFactory.createDisplay ( final String  type,
final long  handle,
final boolean  reuse 
)
static

Instantiate a Display entity using the native handle.

Definition at line 347 of file NewtFactory.java.

◆ createDisplay() [4/5]

static Display com.jogamp.newt.NewtFactory.createDisplay ( final String  type,
final String  name 
)
static

Create a Display entity.

Native creation is lazily done at usage, ie. Display#addReference().

An already existing display connection of the same name will be reused.

Parameters
typeexplicit NativeWindow type eg. NativeWindowFactory#TYPE_AWT
namethe display connection name which is a technical platform specific detail, see AbstractGraphicsDevice#getConnection(). Use null for default.
Returns
the new or reused Display instance

Definition at line 186 of file NewtFactory.java.

Here is the call graph for this function:

◆ createDisplay() [5/5]

static Display com.jogamp.newt.NewtFactory.createDisplay ( final String  type,
final String  name,
final boolean  reuse 
)
static

Create a Display entity.

Native creation is lazily done at usage, ie. Display#addReference().

An already existing display connection of the same name will be reused if reuse is true, otherwise a new instance is being created.

Parameters
typeexplicit NativeWindow type eg. NativeWindowFactory#TYPE_AWT
namethe display connection name which is a technical platform specific detail, see AbstractGraphicsDevice#getConnection(). Use null for default.
reuseattempt to reuse an existing Display with same name if set true, otherwise create a new instance.
Returns
the new or reused Display instance

Definition at line 205 of file NewtFactory.java.

◆ createScreen()

static Screen com.jogamp.newt.NewtFactory.createScreen ( final Display  display,
final int  index 
)
static

Create a Screen entity.

Native creation is lazily done at usage, ie. Screen#addReference().

The lifecycle of this Screen's Display is handled via Display#addReference() and Display#removeReference().

Definition at line 219 of file NewtFactory.java.

◆ createWindow() [1/5]

static Window com.jogamp.newt.NewtFactory.createWindow ( final CapabilitiesImmutable  caps)
static

Create a top level Window entity on the default Display and default Screen.

Native creation is lazily done at usage, ie. Window#setVisible(boolean).

An already existing default Display will be reused.

The lifecycle of this Window's Screen and Display is handled via Screen#addReference() and Screen#removeReference().

Definition at line 236 of file NewtFactory.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ createWindow() [2/5]

static Window com.jogamp.newt.NewtFactory.createWindow ( final NativeWindow  parentWindow,
final CapabilitiesImmutable  caps 
)
static

Create a child Window entity attached to the given parent.


The Screen and Display information is regenerated utilizing the parents information, while reusing an existing Display.

In case parentWindowObject is a com.jogamp.newt.Window instance,
the new window is added to it's list of children.
This assures proper handling of visibility, creation and destruction.
com.jogamp.newt.event.WindowEvent#EVENT_WINDOW_RESIZED is not propagated to the child window for layout
, you have to add an appropriate com.jogamp.newt.event.WindowListener for this use case.
The parents visibility is passed to the new Window

In case parentWindowObject is a different com.jogamp.nativewindow.NativeWindow implementation,
you have to handle all events appropriate.

The lifecycle of this Window's Screen and Display is handled via Screen#addReference() and Screen#removeReference().

Parameters
parentWindowObjecteither a NativeWindow instance

Definition at line 276 of file NewtFactory.java.

Here is the call graph for this function:

◆ createWindow() [3/5]

static Window com.jogamp.newt.NewtFactory.createWindow ( final Object[]  cstrArguments,
final Screen  screen,
final CapabilitiesImmutable  caps 
)
static

Ability to try a Window type with a constructor argument, if supported ..

Currently only valid is AWTWindow(Frame frame) , to support an external created AWT Frame, ie the browsers embedded frame.

Parameters
undecoratedonly impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated always

Definition at line 340 of file NewtFactory.java.

◆ createWindow() [4/5]

static Window com.jogamp.newt.NewtFactory.createWindow ( final Screen  screen,
final CapabilitiesImmutable  caps 
)
static

Create a top level Window entity.

Native creation is lazily done at usage, ie. Window#setVisible(boolean).

The lifecycle of this Window's Screen and Display is handled via Screen#addReference() and Screen#removeReference().

Definition at line 250 of file NewtFactory.java.

◆ createWindow() [5/5]

static Window com.jogamp.newt.NewtFactory.createWindow ( final String  displayConnection,
final int  screenIdx,
final long  parentWindowHandle,
final CapabilitiesImmutable  caps 
)
static

Create a child Window entity attached to the given parent, incl native creation

Parameters
displayConnectionthe parent window's display connection
screenIdxthe desired screen index
parentWindowHandlethe native parent window handle
capsthe desired capabilities
Returns

Definition at line 326 of file NewtFactory.java.

Here is the call graph for this function:

◆ getCustomClass()

static Class<?> com.jogamp.newt.NewtFactory.getCustomClass ( final String  packageName,
final String  classBaseName 
)
static

Definition at line 102 of file NewtFactory.java.

◆ getWindowIcons()

static IOUtil.ClassResources com.jogamp.newt.NewtFactory.getWindowIcons ( )
static

Returns the application window icon resources to be used.

Property newt.window.icons may define a list of PNG icons separated by one whitespace or one comma character. Shall reference at least two PNG icons, from lower (16x16) to higher (>= 32x32) resolution.

Users may also specify application window icons using setWindowIcons(com.jogamp.common.util.IOUtil.ClassResources).

Definition at line 92 of file NewtFactory.java.

◆ isScreenCompatible()

static boolean com.jogamp.newt.NewtFactory.isScreenCompatible ( final NativeWindow  parent,
final Screen  childScreen 
)
static

Definition at line 351 of file NewtFactory.java.

Here is the call graph for this function:

◆ setUseEDT()

static synchronized void com.jogamp.newt.NewtFactory.setUseEDT ( final boolean  onoff)
static

Toggles the usage of an EventDispatchThread while creating a Display.


The default is enabled.
The EventDispatchThread is thread local to the Display instance.

Definition at line 132 of file NewtFactory.java.

◆ setWindowIcons()

static void com.jogamp.newt.NewtFactory.setWindowIcons ( final IOUtil.ClassResources  cres)
static

Allow user to set custom window icons, only applicable at application start before creating any NEWT instance.

Shall reference at least two PNG icons, from lower (16x16) to higher (>= 32x32) resolution.

Definition at line 100 of file NewtFactory.java.

◆ useEDT()

static boolean com.jogamp.newt.NewtFactory.useEDT ( )
static
See also
setUseEDT(boolean)

Definition at line 137 of file NewtFactory.java.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ DEBUG_IMPLEMENTATION

final boolean com.jogamp.newt.NewtFactory.DEBUG_IMPLEMENTATION = Debug.debug("Window")
static

Definition at line 58 of file NewtFactory.java.

◆ DRIVER_DEFAULT_ROOT_PACKAGE

final String com.jogamp.newt.NewtFactory.DRIVER_DEFAULT_ROOT_PACKAGE = "jogamp.newt.driver"
static

Definition at line 60 of file NewtFactory.java.


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