javax.media.nativewindow.x11
Class X11GraphicsDevice
java.lang.Object
javax.media.nativewindow.DefaultGraphicsDevice
javax.media.nativewindow.x11.X11GraphicsDevice
- All Implemented Interfaces:
- Cloneable, AbstractGraphicsDevice
public class X11GraphicsDevice
- extends DefaultGraphicsDevice
- implements Cloneable
Encapsulates a graphics device on X11 platforms.
Field Summary |
static boolean |
DEBUG
|
Method Summary |
Object |
clone()
|
boolean |
close()
Optionally closing the device.
The default implementation is a NOP operation, returning false.
The specific implementing, ie X11GraphicsDevice ,
shall have a enable/disable like javax.media.nativewindow.x11.X11GraphicsDevice#setCloseDisplay(boolean, boolean) ,
which shall be invoked at creation time to determine ownership/role of freeing the resource.
|
void |
setCloseDisplay(boolean close)
|
Methods inherited from class javax.media.nativewindow.DefaultGraphicsDevice |
getConnection, getHandle, getToolkitLock, getType, getUniqueID, getUniqueID, getUnitID, lock, setToolkitLock, toString, unlock |
DEBUG
public static final boolean DEBUG
X11GraphicsDevice
public X11GraphicsDevice(String connection,
int unitID)
- Constructs a new X11GraphicsDevice corresponding to the given connection and default
ToolkitLock
via NativeWindowFactory.createDefaultToolkitLock(java.lang.String, long)
.
Note that this is not an open connection, ie no native display handle exist.
This constructor exist to setup a default device connection.
X11GraphicsDevice
public X11GraphicsDevice(long display,
int unitID)
- Constructs a new X11GraphicsDevice corresponding to the given native display handle and default
ToolkitLock
via NativeWindowFactory.createDefaultToolkitLock(java.lang.String, long)
.
X11GraphicsDevice
public X11GraphicsDevice(long display,
int unitID,
ToolkitLock locker)
- Parameters:
display
- the Display connectionlocker
- custom ToolkitLock
, eg to force null locking in NEWT
clone
public Object clone()
- Overrides:
clone
in class DefaultGraphicsDevice
setCloseDisplay
public void setCloseDisplay(boolean close)
close
public boolean close()
- Description copied from interface:
AbstractGraphicsDevice
- Optionally closing the device.
The default implementation is a NOP operation, returning false.
The specific implementing, ie X11GraphicsDevice
,
shall have a enable/disable like javax.media.nativewindow.x11.X11GraphicsDevice#setCloseDisplay(boolean, boolean)
,
which shall be invoked at creation time to determine ownership/role of freeing the resource.
- Specified by:
close
in interface AbstractGraphicsDevice
- Overrides:
close
in class DefaultGraphicsDevice
- Returns:
- true if a specialized closing operation was successfully issued, otherwise false,
ie no native closing operation was issued, which doesn't imply an error at all.
Copyright 2010 JogAmp Community.