|
|||||||||
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 |
---|
DEBUG, 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 if handle is not null . |
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. |
boolean |
open()
Optionally [re]opening the device if handle is null . |
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 Object
public final String getType()
AbstractGraphicsDevice
getType
in interface AbstractGraphicsDevice
public final String getConnection()
AbstractGraphicsDevice
:0.0
for a local connectionremote.host.net:0.0
for a remote connectionAbstractGraphicsDevice.getUnitID()
.
getConnection
in interface AbstractGraphicsDevice
public final int getUnitID()
AbstractGraphicsDevice
unit ID
.unit ID
support multiple graphics device configurations
on a local machine.AbstractGraphicsDevice.getConnection()
.
getUnitID
in interface AbstractGraphicsDevice
public final String getUniqueID()
AbstractGraphicsDevice
type
,
connection
and unitID
.
getUniqueID
in interface AbstractGraphicsDevice
public final long getHandle()
AbstractGraphicsDevice
getHandle
in interface AbstractGraphicsDevice
public final void lock()
ToolkitLock.lock()
is invoked.
lock
in interface AbstractGraphicsDevice
DefaultGraphicsDevice#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 AbstractGraphicsDevice
DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long)
,
DefaultGraphicsDevice#DefaultGraphicsDevice(java.lang.String, long, javax.media.nativewindow.ToolkitLock)
public boolean open()
AbstractGraphicsDevice
null
.
The default implementation is a NOP
.
Example implementations like com.jogamp.nativewindow.x11.X11GraphicsDevice
or com.jogamp.nativewindow.egl.EGLGraphicsDevice
issue the native open operation in case handle is null
.
open
in interface AbstractGraphicsDevice
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 com.jogamp.nativewindow.x11.X11GraphicsDevice
or com.jogamp.nativewindow.egl.EGLGraphicsDevice
issue the native close operation or skip it depending on the handles's ownership.
close
in interface AbstractGraphicsDevice
null
and closing was successful, otherwise false.public String toString()
toString
in class Object
public 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 |