com.jogamp.newt
Class NewtFactory

java.lang.Object
  extended by com.jogamp.newt.NewtFactory
Direct Known Subclasses:
NewtFactoryAWT

public abstract class NewtFactory
extends Object


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, boolean undecorated)
          Create a child Window entity attached to the given parent, incl native creation
static Window createWindow(NativeWindow nParentWindow, Capabilities caps, boolean undecorated)
          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, Capabilities caps, boolean undecorated)
          Ability to try a Window type with a construnctor argument, if supported ..
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
protected static Window createWindowImpl(String type, Capabilities caps, boolean undecorated)
           
protected static Window createWindowImpl(String type, long parentWindowHandle, Screen screen, Capabilities caps, boolean undecorated)
           
protected static Window createWindowImpl(String type, NativeWindow parentNativeWindow, Screen screen, Capabilities caps, boolean undecorated)
           
protected static Window createWindowImpl(String type, Screen screen, Capabilities caps, boolean undecorated)
           
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 type, long handle)
          Instantiate a Display 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

NewtFactory

public NewtFactory()
Method Detail

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 type,
                                    String name)
Create a Display entity using the given implementation type, incl native creation


createScreen

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


createScreen

public static Screen createScreen(String type,
                                  Display display,
                                  int index)
Create a Screen entity using the given implementation type, incl native creation


createWindow

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


createWindow

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


createWindow

public static Window createWindow(NativeWindow nParentWindow,
                                  Capabilities caps,
                                  boolean undecorated)
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 appropriatly.

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

createWindowImpl

protected static Window createWindowImpl(String type,
                                         NativeWindow parentNativeWindow,
                                         Screen screen,
                                         Capabilities caps,
                                         boolean undecorated)

createWindowImpl

protected static Window createWindowImpl(String type,
                                         long parentWindowHandle,
                                         Screen screen,
                                         Capabilities caps,
                                         boolean undecorated)

createWindowImpl

protected static Window createWindowImpl(String type,
                                         Screen screen,
                                         Capabilities caps,
                                         boolean undecorated)

createWindowImpl

protected static Window createWindowImpl(String type,
                                         Capabilities caps,
                                         boolean undecorated)

createWindow

public static Window createWindow(long parentWindowHandle,
                                  Screen screen,
                                  Capabilities caps,
                                  boolean undecorated)
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,
                                  Capabilities caps,
                                  boolean undecorated)
Ability to try a Window type with a construnctor 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

createWindow

public static Window createWindow(String type,
                                  Screen screen,
                                  Capabilities caps,
                                  boolean undecorated)
Create a Window entity using the given implementation type, incl native creation

Parameters:
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(String type,
                                  Object[] cstrArguments,
                                  Screen screen,
                                  Capabilities caps,
                                  boolean undecorated)

wrapDisplay

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



Copyright 2010 JogAmp Community.