com.jogamp.newt
Class NewtFactory

java.lang.Object
  extended by com.jogamp.newt.NewtFactory

public class NewtFactory
extends Object


Field Summary
static boolean DEBUG_IMPLEMENTATION
           
 
Constructor Summary
NewtFactory()
           
 
Method Summary
static Screen createCompatibleScreen(NativeWindow parent)
           
static Screen createCompatibleScreen(NativeWindow parent, Screen childScreen)
           
static Display createDisplay(String name)
          Create a Display entity, incl native creation
static Display createDisplay(String name, boolean reuse)
           
static Display createDisplay(String type, long handle, boolean reuse)
          Instantiate a Display entity using the native handle.
static Display createDisplay(String type, String name)
          Create a Display entity using the given implementation type, incl native creation
static Display createDisplay(String type, String name, boolean reuse)
           
static Screen createScreen(Display display, int index)
          Create a Screen entity, incl native creation
static Window createWindow(CapabilitiesImmutable caps)
          Create a top level Window entity, incl native creation.
The Display/Screen is created and owned, ie destructed atomatically.
A new Display is only created if no preexisting one could be found via Display.getLastDisplayOf(java.lang.String, java.lang.String, int).
static Window createWindow(long parentWindowHandle, Screen screen, CapabilitiesImmutable caps)
          Create a child Window entity attached to the given parent, incl native creation
static Window createWindow(NativeWindow nParentWindow, CapabilitiesImmutable caps)
          Create a child Window entity attached to the given parent, incl native creation.
The Screen and Display information is regenerated utilizing the parents information.
static Window createWindow(Object[] cstrArguments, Screen screen, CapabilitiesImmutable caps)
          Ability to try a Window type with a constructor argument, if supported ..
static Window createWindow(Screen screen, CapabilitiesImmutable caps)
          Create a top level Window entity, incl native creation
static Class<?> getCustomClass(String packageName, String classBaseName)
           
static boolean isScreenCompatible(NativeWindow parent, Screen childScreen)
           
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()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEBUG_IMPLEMENTATION

public static final boolean DEBUG_IMPLEMENTATION
Constructor Detail

NewtFactory

public NewtFactory()
Method Detail

getCustomClass

public static Class<?> getCustomClass(String packageName,
                                      String classBaseName)

setUseEDT

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


useEDT

public static boolean useEDT()
See Also:
setUseEDT(boolean)

createDisplay

public static Display createDisplay(String name)
Create a Display entity, incl native creation


createDisplay

public static Display createDisplay(String name,
                                    boolean reuse)

createDisplay

public static Display createDisplay(String type,
                                    String name)
Create a Display entity using the given implementation type, incl native creation


createDisplay

public static Display createDisplay(String type,
                                    String name,
                                    boolean reuse)

createScreen

public static Screen createScreen(Display display,
                                  int index)
Create a Screen entity, incl native creation


createWindow

public static Window createWindow(CapabilitiesImmutable caps)
Create a top level Window entity, incl native creation.
The Display/Screen is created and owned, ie destructed atomatically.
A new Display is only created if no preexisting one could be found via Display.getLastDisplayOf(java.lang.String, java.lang.String, int).


createWindow

public static Window createWindow(Screen screen,
                                  CapabilitiesImmutable caps)
Create a top level Window entity, incl native creation


createWindow

public static Window createWindow(NativeWindow nParentWindow,
                                  CapabilitiesImmutable caps)
Create a child Window entity attached to the given parent, incl native creation.
The Screen and Display information is regenerated utilizing the parents information.

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

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

Parameters:
parentWindowObject - either a NativeWindow instance

createWindow

public static Window createWindow(long parentWindowHandle,
                                  Screen screen,
                                  CapabilitiesImmutable caps)
Create a child Window entity attached to the given parent, incl native creation

Parameters:
parentWindowObject - the native parent window handle
undecorated - only impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated always

createWindow

public static Window createWindow(Object[] cstrArguments,
                                  Screen screen,
                                  CapabilitiesImmutable caps)
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:
undecorated - only impacts if the window is in top-level state, while attached to a parent window it's rendered undecorated always

createDisplay

public static Display createDisplay(String type,
                                    long handle,
                                    boolean reuse)
Instantiate a Display entity using the native handle.


isScreenCompatible

public static boolean isScreenCompatible(NativeWindow parent,
                                         Screen childScreen)

createCompatibleScreen

public static Screen createCompatibleScreen(NativeWindow parent)

createCompatibleScreen

public static Screen createCompatibleScreen(NativeWindow parent,
                                            Screen childScreen)


Copyright 2010 JogAmp Community.