|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.media.nativewindow.DefaultGraphicsDevice
public class DefaultGraphicsDevice
| Field Summary |
|---|
| Fields inherited from interface javax.media.nativewindow.AbstractGraphicsDevice |
|---|
DEFAULT_CONNECTION, DEFAULT_UNIT, EXTERNAL_CONNECTION |
| Constructor Summary | |
|---|---|
DefaultGraphicsDevice(String type,
String connection,
int unitID)
Create an instance with the system default ToolkitLock,
gathered via NativeWindowFactory.getDefaultToolkitLock(String). |
|
DefaultGraphicsDevice(String type,
String connection,
int unitID,
long handle)
Create an instance with the system default ToolkitLock. |
|
DefaultGraphicsDevice(String type,
String connection,
int unitID,
long handle,
ToolkitLock locker)
Create an instance with the given ToolkitLock instance. |
|
| Method Summary | |
|---|---|
Object |
clone()
|
boolean |
close()
Optionally closing the device. |
String |
getConnection()
Returns the semantic GraphicsDevice connection. On platforms supporting remote devices, eg via tcp/ip network, the implementation shall return a unique name for each remote address. On X11 for example, the connection string should be as the following example. :0.0 for a local connection
remote.host.net:0.0 for a remote connection
To support multiple local device, see AbstractGraphicsDevice.getUnitID(). |
long |
getHandle()
Returns the native handle of the underlying native device, if such thing exist. |
ToolkitLock |
getToolkitLock()
|
String |
getType()
Returns the type of the underlying subsystem, ie NativeWindowFactory.TYPE_KD, NativeWindowFactory.TYPE_X11, .. |
String |
getUniqueID()
Returns a unique ID String of this device using type,
connection and unitID.The unique ID does not reflect the instance of the device, hence the handle is not included. The unique ID may be used as a key for semantic device mapping. |
int |
getUnitID()
Returns the graphics device unit ID.The unit ID support multiple graphics device configurations
on a local machine.To support remote device, see AbstractGraphicsDevice.getConnection(). |
void |
lock()
No lock is performed on the graphics device per default, instead the aggregated recursive ToolkitLock.lock() is invoked. |
String |
toString()
|
void |
unlock()
No lock is performed on the graphics device per default, instead the aggregated recursive ToolkitLock.unlock() is invoked. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public DefaultGraphicsDevice(String type,
String connection,
int unitID)
ToolkitLock,
gathered via NativeWindowFactory.getDefaultToolkitLock(String).
type -
public DefaultGraphicsDevice(String type,
String connection,
int unitID,
long handle)
ToolkitLock.
gathered via NativeWindowFactory.createDefaultToolkitLock(String, long).
type - handle -
public DefaultGraphicsDevice(String type,
String connection,
int unitID,
long handle,
ToolkitLock locker)
ToolkitLock instance.
type - handle - locker - | Method Detail |
|---|
public Object clone()
clone in class Objectpublic final String getType()
AbstractGraphicsDevice
getType in interface AbstractGraphicsDevicepublic final String getConnection()
AbstractGraphicsDevice:0.0 for a local connectionremote.host.net:0.0 for a remote connectionAbstractGraphicsDevice.getUnitID().
getConnection in interface AbstractGraphicsDevicepublic final int getUnitID()
AbstractGraphicsDeviceunit ID.unit ID support multiple graphics device configurations
on a local machine.AbstractGraphicsDevice.getConnection().
getUnitID in interface AbstractGraphicsDevicepublic final String getUniqueID()
AbstractGraphicsDevicetype,
connection and unitID.
getUniqueID in interface AbstractGraphicsDevicepublic final long getHandle()
AbstractGraphicsDevice
getHandle in interface AbstractGraphicsDevicepublic final void lock()
ToolkitLock.lock() is invoked.
lock in interface AbstractGraphicsDeviceDefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long),
DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long, javax.media.nativewindow.ToolkitLock)public final void unlock()
ToolkitLock.unlock() is invoked.
unlock in interface AbstractGraphicsDeviceDefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long),
DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long, javax.media.nativewindow.ToolkitLock)public boolean close()
AbstractGraphicsDevice
The default implementation is a NOP, just setting the handle to null.
X11GraphicsDevice,
shall have a enable/disable like com.jogamp.nativewindow.x11.X11GraphicsDevice#setCloseDisplay(boolean, boolean),
close in interface AbstractGraphicsDevicenull, otherwise false.public String toString()
toString in class Objectpublic final ToolkitLock getToolkitLock()
DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long),
DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long, javax.media.nativewindow.ToolkitLock)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||