com.sun.javafx.newt
Class Display

java.lang.Object
  extended by com.sun.javafx.newt.Display
All Implemented Interfaces:
Runnable

public abstract class Display
extends Object
implements Runnable


Nested Class Summary
static interface Display.Action
           
 
Field Summary
protected  AbstractGraphicsDevice aDevice
           
static boolean DEBUG
           
protected  String name
           
protected  int refCount
           
 
Constructor Summary
Display()
           
 
Method Summary
protected abstract  void closeNative()
           
protected static Display create(String type, String name)
          Make sure to reuse a Display with the same name
protected abstract  void createNative()
           
 void destroy()
           
protected abstract  void dispatchMessages()
           
static Display getCurrentDisplay(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
 AbstractGraphicsDevice getGraphicsDevice()
           
 long getHandle()
           
 String getName()
           
 void pumpMessages()
           
protected static Display removeCurrentDisplay(String name)
          removes the mapping of the given name from the thread local display map and notifies all threads synchronized to this display map.
 void run()
          calls pumpMessages()
static void runCurrentThreadDisplaysAction(Display.Action action)
          Calls Display.Action.run(Display) on all Display's bound to the current thread.
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.
 String toString()
           
protected static Display wrapHandle(String type, String name, AbstractGraphicsDevice aDevice)
           
 
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

name

protected String name

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 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 name)
Returns the thread local display mapped to the given name


getCurrentDisplays

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


create

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


destroy

public void destroy()

wrapHandle

protected static Display wrapHandle(String type,
                                    String name,
                                    AbstractGraphicsDevice aDevice)

createNative

protected abstract void createNative()

closeNative

protected abstract void closeNative()

getName

public String getName()

getHandle

public long getHandle()

getGraphicsDevice

public AbstractGraphicsDevice getGraphicsDevice()

pumpMessages

public void pumpMessages()

run

public void run()
calls pumpMessages()

Specified by:
run in interface Runnable

runCurrentThreadDisplaysAction

public static void runCurrentThreadDisplaysAction(Display.Action action)
Calls Display.Action.run(Display) on all Display's bound to the current thread.


toString

public String toString()
Overrides:
toString in class Object

dispatchMessages

protected abstract void dispatchMessages()


Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.