public class X11GraphicsDevice extends DefaultGraphicsDevice implements Cloneable
DEBUG, DEFAULT_CONNECTION, DEFAULT_UNIT, EXTERNAL_CONNECTION
Constructor and Description |
---|
X11GraphicsDevice(long display,
int unitID,
boolean owner)
Constructs a new X11GraphicsDevice corresponding to the given native display handle and default
ToolkitLock via NativeWindowFactory.createDefaultToolkitLock(String, long) . |
X11GraphicsDevice(long display,
int unitID,
ToolkitLock locker,
boolean owner) |
X11GraphicsDevice(String connection,
int unitID)
Constructs a new X11GraphicsDevice corresponding to the given connection and default
ToolkitLock via NativeWindowFactory.getDefaultToolkitLock(String) .Note that this is not an open connection, ie no native display handle exist. |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
boolean |
close()
Optionally closing the device if handle is not
null . |
int |
getDefaultVisualID() |
boolean |
open()
Optionally [re]opening the device if handle is
null . |
getConnection, getHandle, getToolkitLock, getType, getUniqueID, getUnitID, lock, toString, unlock
public X11GraphicsDevice(String connection, int unitID)
ToolkitLock
via NativeWindowFactory.getDefaultToolkitLock(String)
.public X11GraphicsDevice(long display, int unitID, boolean owner)
ToolkitLock
via NativeWindowFactory.createDefaultToolkitLock(String, long)
.public X11GraphicsDevice(long display, int unitID, ToolkitLock locker, boolean owner)
display
- the Display connectionlocker
- custom ToolkitLock
, eg to force null locking in NEWTDefaultGraphicsDevice.DefaultGraphicsDevice(String, String, int, long, ToolkitLock)
public int getDefaultVisualID()
public Object clone()
clone
in class DefaultGraphicsDevice
public boolean open()
AbstractGraphicsDevice
null
.
The default implementation is a NOP
.
Example implementations like X11GraphicsDevice
or EGLGraphicsDevice
issue the native open operation in case handle is null
.
open
in interface AbstractGraphicsDevice
open
in class DefaultGraphicsDevice
null
and opening was successful, otherwise false.public boolean close()
AbstractGraphicsDevice
null
.
The default implementation is a NOP
, just setting the handle to null
.
Example implementations like X11GraphicsDevice
or EGLGraphicsDevice
issue the native close operation or skip it depending on the handles's ownership.
close
in interface AbstractGraphicsDevice
close
in class DefaultGraphicsDevice
null
and closing was successful, otherwise false.Copyright 2010 JogAmp Community.