|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.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#createDefaultToolkitLock() . |
|
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. 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. |
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#createDefaultToolkitLock()
.
type
- public DefaultGraphicsDevice(String type, String connection, int unitID, long handle)
ToolkitLock
.
gathered via NativeWindowFactory#createDefaultToolkitLock()
.
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 close()
AbstractGraphicsDevice
X11GraphicsDevice
,
shall have a enable/disable like javax.media.nativewindow.x11.X11GraphicsDevice#setCloseDisplay(boolean, boolean)
,
close
in interface AbstractGraphicsDevice
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 |