javax.media.nativewindow.x11
Class X11GraphicsDevice

java.lang.Object
  extended by javax.media.nativewindow.DefaultGraphicsDevice
      extended by 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
           
 
Fields inherited from interface javax.media.nativewindow.AbstractGraphicsDevice
DEFAULT_CONNECTION, DEFAULT_UNIT, EXTERNAL_CONNECTION
 
Constructor Summary
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(long display, int unitID, ToolkitLock locker)
           
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.
 
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, getUnitID, lock, toString, unlock
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEBUG

public static final boolean DEBUG
Constructor Detail

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 connection
locker - custom ToolkitLock, eg to force null locking in NEWT
Method Detail

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.