Top Fields Constructors Methods
jogamp.newt.awt

public Class NewtFactoryAWT

extends NewtFactory
Class Inheritance
Imports
com.jogamp.nativewindow.AbstractGraphicsConfiguration, .CapabilitiesImmutable, .NativeWindow, .NativeWindowException, .NativeWindowFactory, jogamp.nativewindow.awt.AWTMisc, jogamp.nativewindow.jawt.JAWTUtil, jogamp.nativewindow.jawt.x11.X11SunJDKReflection, jogamp.nativewindow.x11.X11Lib, jogamp.newt.Debug, com.jogamp.nativewindow.awt.AWTGraphicsConfiguration, .AWTGraphicsScreen, .JAWTWindow, com.jogamp.nativewindow.util.Point, .Rectangle, .RectangleImmutable, com.jogamp.newt.Display, .MonitorDevice, .NewtFactory, .Screen

Field Summary

Modifier and TypeField and Description
public static final boolean
Inherited from com.jogamp.newt.NewtFactory:
DRIVER_DEFAULT_ROOT_PACKAGE

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static GraphicsConfiguration
public static Display

Returns:

Display instance reflecting the awtComp
createDisplay
(final Component
must be displayable and must have a GraphicsConfiguration
awtComp
,
final boolean
attempt to reuse an existing Display with same name if set true, otherwise create a new instance.
reuse
)

public static Screen

Returns:

Screen instance reflecting the awtComp
createScreen
(final Component
must be displayable and must have a GraphicsConfiguration
awtComp
,
final boolean
attempt to reuse an existing Display with same name if set true, otherwise create a new instance.
reuse
)

public static void
destroyNativeWindow(final JAWTWindow jawtWindow)

public static MonitorDevice

Returns:

MonitorDevice instance reflecting the awtComp
getMonitorDevice
(final Screen
the Screen instance matching awtComp, i.e. via createScreen(java.awt.Component, boolean).
screen
,
final Component
must be displayable and must have a GraphicsConfiguration
awtComp
)

Retrieves the MonitorDevice for the given displayable awtComp.

public static JAWTWindow
getNativeWindow(final Object
must be of type java.awt.Component
awtCompObject
,
final CapabilitiesImmutable capsRequested)

public static JAWTWindow
public static JAWTWindow
Inherited from com.jogamp.newt.NewtFactory:
createCompatibleScreencreateCompatibleScreencreateDisplaycreateDisplaycreateDisplaycreateDisplaycreateDisplaycreateScreencreateWindowcreateWindowcreateWindowcreateWindowcreateWindowgetCustomClassgetWindowIconsisScreenCompatiblesetUseEDTsetWindowIconsuseEDT

Field Detail

DEBUG_IMPLEMENTATIONback to summary
public static final boolean DEBUG_IMPLEMENTATION

Hides com.jogamp.newt.NewtFactory.DEBUG_IMPLEMENTATION.

Constructor Detail

NewtFactoryAWTback to summary
public NewtFactoryAWT()

Method Detail

checkComponentValidback to summary
private static GraphicsConfiguration checkComponentValid(final Component awtComp) throws IllegalArgumentException
Exceptions
IllegalArgumentException:
if awtComp is not displayable or has null GraphicsConfiguration.
createDisplayback to summary
public static Display createDisplay(final Component awtComp, final boolean reuse) throws IllegalArgumentException
Parameters
awtComp:Component

must be displayable and must have a GraphicsConfiguration

reuse:boolean

attempt to reuse an existing Display with same name if set true, otherwise create a new instance.

Returns:Display

Display instance reflecting the awtComp

Exceptions
IllegalArgumentException:
if awtComp is not displayable or has null GraphicsConfiguration.
See Also
getAbstractGraphicsScreen(java.awt.Component)
createScreenback to summary
public static Screen createScreen(final Component awtComp, final boolean reuse) throws IllegalArgumentException
Parameters
awtComp:Component

must be displayable and must have a GraphicsConfiguration

reuse:boolean

attempt to reuse an existing Display with same name if set true, otherwise create a new instance.

Returns:Screen

Screen instance reflecting the awtComp

Exceptions
IllegalArgumentException:
if awtComp is not displayable or has null GraphicsConfiguration.
See Also
createDevice(java.awt.Component)
destroyNativeWindowback to summary
public static void destroyNativeWindow(final JAWTWindow jawtWindow)
getMonitorDeviceback to summary
public static MonitorDevice getMonitorDevice(final Screen screen, final Component awtComp) throws IllegalArgumentException

Retrieves the MonitorDevice for the given displayable awtComp.

In case this method shall be called multiple times, it is advised to keep the given Screen instance natively created during operation. This should be done via the initial Screen#addReference(). After operation, user shall destroy the instance accordingly via the final Screen#removeReference().

Parameters
screen:Screen

the Screen instance matching awtComp, i.e. via createScreen(java.awt.Component, boolean).

awtComp:Component

must be displayable and must have a GraphicsConfiguration

Returns:MonitorDevice

MonitorDevice instance reflecting the awtComp

Exceptions
IllegalArgumentException:
if awtComp is not displayable or has null GraphicsConfiguration.
See Also
createScreen(java.awt.Component, boolean)
getNativeWindowback to summary
public static JAWTWindow getNativeWindow(final Object awtCompObject, final CapabilitiesImmutable capsRequested)

Deprecated

Use getNativeWindow(java.awt.Component, AWTGraphicsConfiguration) Wraps an AWT component into a com.jogamp.nativewindow.NativeWindow utilizing the com.jogamp.nativewindow.NativeWindowFactory,
using a configuration agnostic dummy com.jogamp.nativewindow.DefaultGraphicsConfiguration.

The actual wrapping implementation is com.jogamp.nativewindow.awt.JAWTWindow.

Purpose of this wrapping is to access the AWT window handle,
not to actually render into it.
Hence the dummy configuration only.

Parameters
awtCompObject:Object

must be of type java.awt.Component

getNativeWindowback to summary
public static JAWTWindow getNativeWindow(final Component awtComp, final CapabilitiesImmutable capsRequested)
getNativeWindowback to summary
public static JAWTWindow getNativeWindow(final Component awtComp, final AWTGraphicsConfiguration awtConfig)

Wraps an AWT component into a com.jogamp.nativewindow.NativeWindow utilizing the com.jogamp.nativewindow.NativeWindowFactory,
using the given AWTGraphicsConfiguration.

The actual wrapping implementation is com.jogamp.nativewindow.awt.JAWTWindow.

The required AWTGraphicsConfiguration may be constructed via AWTGraphicsConfiguration#create(java.awt.GraphicsConfiguration, CapabilitiesImmutable, CapabilitiesImmutable)

Purpose of this wrapping is to access the AWT window handle,
not to actually render into it.

Parameters
awtComp:Component

java.awt.Component

awtConfig:AWTGraphicsConfiguration

AWTGraphicsConfiguration reflecting the used java.awt.GraphicsConfiguration