com.jogamp.newt
Class Display

java.lang.Object
  extended by com.jogamp.newt.Display
Direct Known Subclasses:
AWTDisplay, Display, Display, KDDisplay, MacDisplay, WindowsDisplay, X11Display

public abstract class Display
extends Object


Field Summary
protected  AbstractGraphicsDevice aDevice
           
static boolean DEBUG
           
protected  Thread edt
           
protected  EDTUtil edtUtil
           
protected  String name
           
protected  int refCount
           
protected  String type
           
 
Constructor Summary
Display()
           
 
Method Summary
protected abstract  void closeNative()
           
protected static Display create(String type, String name, long handle)
          Make sure to reuse a Display with the same name
protected abstract  void createNative()
           
 void destroy()
           
protected  void dispatchMessages()
           
protected abstract  void dispatchMessagesNative()
           
static void dumpDisplayMap(String prefix)
           
 void enqueueEvent(boolean wait, NEWTEvent e)
           
 void enqueueEvent(NEWTEvent e)
           
static Display getCurrentDisplay(String type, String name)
          Returns the thread local display mapped to the given name
static Map getCurrentDisplayMap()
          Returns the thread local display map
static Collection getCurrentDisplays()
          Returns the thread local display collection
 EDTUtil getEDTUtil()
           
 String getFQName()
           
static String getFQName(String type, String name)
           
 AbstractGraphicsDevice getGraphicsDevice()
           
 long getHandle()
           
 String getName()
           
static String getThreadName()
           
 String getType()
           
 void lock()
           
 void pumpMessages()
           
protected static Display removeCurrentDisplay(String type, String name)
          removes the mapping of the given name from the thread local display map and notifies all threads synchronized to this display map.
 boolean runCreateAndDestroyOnEDT()
           
 void runOnEDTIfAvail(boolean wait, Runnable task)
           
protected static Display setCurrentDisplay(Display display)
          maps the given display to the thread local display map and notifies all threads synchronized to this display map.
static String toHexString(int hex)
           
static String toHexString(long hex)
           
 String toString()
           
 void unlock()
           
protected  String validateDisplayName(String name, long handle)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG

edtUtil

protected EDTUtil edtUtil

edt

protected Thread edt

name

protected String name

type

protected String type

refCount

protected int refCount

aDevice

protected AbstractGraphicsDevice aDevice
Constructor Detail

Display

public Display()
Method Detail

getCurrentDisplayMap

public static Map getCurrentDisplayMap()
Returns the thread local display map


setCurrentDisplay

protected static Display setCurrentDisplay(Display display)
maps the given display to the thread local display map and notifies all threads synchronized to this display map.


removeCurrentDisplay

protected static Display removeCurrentDisplay(String type,
                                              String name)
removes the mapping of the given name from the thread local display map and notifies all threads synchronized to this display map.


getCurrentDisplay

public static Display getCurrentDisplay(String type,
                                        String name)
Returns the thread local display mapped to the given name


dumpDisplayMap

public static void dumpDisplayMap(String prefix)

getCurrentDisplays

public static Collection getCurrentDisplays()
Returns the thread local display collection


create

protected static Display create(String type,
                                String name,
                                long handle)
Make sure to reuse a Display with the same name


runCreateAndDestroyOnEDT

public boolean runCreateAndDestroyOnEDT()

getEDTUtil

public EDTUtil getEDTUtil()

runOnEDTIfAvail

public void runOnEDTIfAvail(boolean wait,
                            Runnable task)

destroy

public void destroy()

createNative

protected abstract void createNative()

closeNative

protected abstract void closeNative()

getType

public final String getType()

getName

public final String getName()

getFQName

public final String getFQName()

validateDisplayName

protected String validateDisplayName(String name,
                                     long handle)

getFQName

public static final String getFQName(String type,
                                     String name)

getHandle

public long getHandle()

getGraphicsDevice

public AbstractGraphicsDevice getGraphicsDevice()

pumpMessages

public void pumpMessages()

toString

public String toString()
Overrides:
toString in class Object

getThreadName

public static String getThreadName()

toHexString

public static String toHexString(int hex)

toHexString

public static String toHexString(long hex)

dispatchMessagesNative

protected abstract void dispatchMessagesNative()

dispatchMessages

protected void dispatchMessages()

enqueueEvent

public void enqueueEvent(NEWTEvent e)

enqueueEvent

public void enqueueEvent(boolean wait,
                         NEWTEvent e)

lock

public void lock()

unlock

public void unlock()


Copyright 2010 JogAmp Community.