|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.newt.Display
com.jogamp.newt.impl.DisplayImpl
public abstract class DisplayImpl
Field Summary | |
---|---|
protected AbstractGraphicsDevice |
aDevice
|
static boolean |
DEBUG_TEST_EDT_MAINTHREAD
|
protected boolean |
destroyWhenUnused
|
protected EDTUtil |
edtUtil
|
protected String |
fqname
|
protected int |
hashCode
|
protected int |
id
|
protected String |
name
|
static String |
nilString
|
protected int |
refCount
|
protected String |
type
|
Fields inherited from class com.jogamp.newt.Display |
---|
DEBUG, displayList, displaysActive |
Constructor Summary | |
---|---|
DisplayImpl()
|
Method Summary | |
---|---|
int |
addReference()
The 1st call will initiate native creation, since we follow the lazy creation pattern. |
protected abstract void |
closeNativeImpl()
|
static Display |
create(String type,
String name,
long handle,
boolean reuse)
Make sure to reuse a Display with the same name |
protected void |
createEDTUtil()
|
void |
createNative()
Manual trigger the native creation, if it is not done yet. This is useful to be able to request the AbstractGraphicsDevice , via
Display.getGraphicsDevice() .Otherwise the abstract device won't be available before the dependent components (Screen and Window) are realized. |
protected abstract void |
createNativeImpl()
|
void |
destroy()
Manually trigger the destruction, incl. |
void |
dispatchMessages()
|
protected abstract void |
dispatchMessagesNative()
|
void |
enqueueEvent(boolean wait,
NEWTEvent e)
|
EDTUtil |
getEDTUtil()
|
String |
getFQName()
|
AbstractGraphicsDevice |
getGraphicsDevice()
|
long |
getHandle()
|
int |
getId()
|
String |
getName()
|
int |
getReferenceCount()
|
String |
getType()
|
int |
hashCode()
return precomputed hashCode from FQN Display.getFQName() |
boolean |
isEDTRunning()
|
boolean |
isNativeValid()
|
int |
removeReference()
The last call may destroy this instance, if #getDestroyWhenUnused() returns true . |
void |
runOnEDTIfAvail(boolean wait,
Runnable task)
|
protected boolean |
shallRunOnEDT()
|
String |
toString()
|
String |
validateDisplayName(String name,
long handle)
|
boolean |
validateEDT()
Validate EDT running state. Stop the running EDT in case this display is destroyed already. |
Methods inherited from class com.jogamp.newt.Display |
---|
dumpDisplayList, equals, getActiveDisplayNumber, getAllDisplays, getFirstDisplayOf, getLastDisplayOf, getThreadName, hashCodeNullSafe, toHexString, toHexString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEBUG_TEST_EDT_MAINTHREAD
public static final String nilString
protected EDTUtil edtUtil
protected int id
protected String name
protected String type
protected String fqname
protected int hashCode
protected int refCount
protected boolean destroyWhenUnused
protected AbstractGraphicsDevice aDevice
Constructor Detail |
---|
public DisplayImpl()
Method Detail |
---|
public static Display create(String type, String name, long handle, boolean reuse)
public int hashCode()
Display
Display.getFQName()
hashCode
in class Display
public final void createNative() throws NativeWindowException
Display
AbstractGraphicsDevice
, via
Display.getGraphicsDevice()
.
This method is usually invoke by Display.addReference()
createNative
in class Display
NativeWindowException
- if the native creation failed.protected boolean shallRunOnEDT()
protected void createEDTUtil()
public final EDTUtil getEDTUtil()
getEDTUtil
in class Display
public void runOnEDTIfAvail(boolean wait, Runnable task)
public boolean validateEDT()
Display
validateEDT
in class Display
public final void destroy()
Display
This method is usually invoke by Display.removeReference()
destroy
in class Display
public final int addReference()
Display
addReference
in class Display
Display.removeReference()
public final int removeReference()
Display
#getDestroyWhenUnused()
returns true
.
removeReference
in class Display
Display.addReference()
,
#getDestroyWhenUnused()
,
#setDestroyWhenUnused(boolean)
public final int getReferenceCount()
getReferenceCount
in class Display
protected abstract void createNativeImpl()
protected abstract void closeNativeImpl()
public final int getId()
getId
in class Display
public final String getType()
getType
in class Display
NativeWindowFactory.getNativeWindowType(boolean)
public final String getName()
getName
in class Display
public final String getFQName()
getFQName
in class Display
Display.getType()
+ Display.getName()
+ Display.getId()
public String validateDisplayName(String name, long handle)
public final long getHandle()
getHandle
in class Display
public final AbstractGraphicsDevice getGraphicsDevice()
getGraphicsDevice
in class Display
public final boolean isNativeValid()
isNativeValid
in class Display
Display.destroy()
public boolean isEDTRunning()
isEDTRunning
in class Display
public String toString()
toString
in class Object
protected abstract void dispatchMessagesNative()
public void dispatchMessages()
dispatchMessages
in class Display
public void enqueueEvent(boolean wait, NEWTEvent e)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |