|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.newt.NewtFactory
public abstract class NewtFactory
Constructor Summary | |
---|---|
NewtFactory()
|
Method Summary | |
---|---|
static Display |
createDisplay(String name)
Create a Display entity, incl native creation |
static Display |
createDisplay(String type,
String name)
Create a Display entity using the given implementation type, incl native creation |
static Screen |
createScreen(Display display,
int index)
Create a Screen entity, incl native creation |
static Screen |
createScreen(String type,
Display display,
int index)
Create a Screen entity using the given implementation type, incl native creation |
static Window |
createWindow(long parentWindowHandle,
Screen screen,
Capabilities caps)
|
static Window |
createWindow(long parentWindowHandle,
Screen screen,
Capabilities caps,
boolean undecorated)
Create a child Window entity attached to the given parent, incl native creation |
static Window |
createWindow(Object[] cstrArguments,
Screen screen,
Capabilities caps,
boolean undecorated)
Ability to try a Window type with a construnctor argument, if supported .. |
static Window |
createWindow(Object parentWindowObject,
Screen screen,
Capabilities caps)
|
static Window |
createWindow(Object parentWindowObject,
Screen screen,
Capabilities caps,
boolean undecorated)
Create a child Window entity attached to the given parent, incl native creation |
static Window |
createWindow(Screen screen,
Capabilities caps)
Create a top level Window entity, incl native creation |
static Window |
createWindow(Screen screen,
Capabilities caps,
boolean undecorated)
Create a top level Window entity, incl native creation |
static Window |
createWindow(String type,
Object[] cstrArguments,
Screen screen,
Capabilities caps,
boolean undecorated)
|
static Window |
createWindow(String type,
Screen screen,
Capabilities caps,
boolean undecorated)
Create a Window entity using the given implementation type, incl native creation |
static void |
setUseEDT(boolean onoff)
Toggles the usage of an EventDispatchThread while creating a Display. The default is enabled. The EventDispatchThread is thread local to the Display instance. |
static boolean |
useEDT()
|
static Display |
wrapDisplay(String name,
AbstractGraphicsDevice device)
Instantiate a Display entity using the native handle. |
static Screen |
wrapScreen(Display display,
AbstractGraphicsScreen screen)
Instantiate a Screen entity using the native handle. |
static Window |
wrapWindow(Screen screen,
AbstractGraphicsConfiguration config,
long windowHandle,
boolean fullscreen,
boolean visible,
int x,
int y,
int width,
int height)
Instantiate a Window entity using the native handle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NewtFactory()
Method Detail |
---|
public static void setUseEDT(boolean onoff)
public static boolean useEDT()
setUseEDT(boolean)
public static Display createDisplay(String name)
public static Display createDisplay(String type, String name)
public static Screen createScreen(Display display, int index)
public static Screen createScreen(String type, Display display, int index)
public static Window createWindow(Screen screen, Capabilities caps)
public static Window createWindow(Screen screen, Capabilities caps, boolean undecorated)
public static Window createWindow(Object parentWindowObject, Screen screen, Capabilities caps, boolean undecorated)
In case parentWindowObject
is a NativeWindow
,
we create a child Window
,
utilizing createWindow(long, com.jogamp.newt.Screen, javax.media.nativewindow.Capabilities, boolean)
passing the parent's native window handle retrieved via NativeWindow.getWindowHandle()
.
In case parentWindowObject
is even a Window
, the following applies:
WindowEvent.EVENT_WINDOW_RESIZED
is not propagated to the child window for e.g. layout
,
you have to add an appropriate WindowListener
for this use case.
However, WindowEvent.EVENT_WINDOW_DESTROY_NOTIFY
is propagated to the child window, so it will be closed properly.
In case parentWindowObject
is a different implementation,
you have to handle all events appropriatly.
In case parentWindowObject
is a Component
,
we utilize the com.jogamp.newt.impl.awt.AWTNewtFactory#createNativeChildWindow(Object, com.jogamp.newt.Screen, com.jogamp.newt.Capabilities, boolean)
factory method.
The factory adds a WindowListener
to propagate WindowEvent
's so
your NEWT Window integrates into the AWT layout.
parentWindowObject
- either a NativeWindow or java.awt.Componentundecorated
- only impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated alwayscreateWindow(long, com.jogamp.newt.Screen, javax.media.nativewindow.Capabilities, boolean)
,
com.jogamp.newt.impl.awt.AWTNewtFactory#createNativeChildWindow(java.lang.Object, com.jogamp.newt.Screen, javax.media.nativewindow.Capabilities, boolean)
public static Window createWindow(Object parentWindowObject, Screen screen, Capabilities caps)
public static Window createWindow(long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated)
parentWindowObject
- the native parent window handleundecorated
- only impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated alwayspublic static Window createWindow(long parentWindowHandle, Screen screen, Capabilities caps)
public static Window createWindow(Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated)
Currently only valid is AWTWindow(Frame frame)
,
to support an external created AWT Frame, ie the browsers embedded frame.
undecorated
- only impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated alwayspublic static Window createWindow(String type, Screen screen, Capabilities caps, boolean undecorated)
undecorated
- only impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated alwayspublic static Window createWindow(String type, Object[] cstrArguments, Screen screen, Capabilities caps, boolean undecorated)
public static Display wrapDisplay(String name, AbstractGraphicsDevice device)
public static Screen wrapScreen(Display display, AbstractGraphicsScreen screen)
public static Window wrapWindow(Screen screen, AbstractGraphicsConfiguration config, long windowHandle, boolean fullscreen, boolean visible, int x, int y, int width, int height)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |