|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.newt.MonitorDevice
public abstract class MonitorDevice
Visual output device, i.e. a CRT, LED ..consisting of it's components:
The returned
Use w/ care, it's not a copy!
Coverage is computed by:
DimensionImmutable
size in [mm]MonitorMode
original modeList<MonitorMode>
supportedModes
MonitorMode
current modeRectangleImmutable
viewport (rotated)
Method Summary
boolean
contains(int x,
int y)
Returns true
if given coordinates are contained by this viewport
, otherwise false
.
float
coverage(RectangleImmutable r)
Returns the coverage of given rectangle w/ this this viewport
, i.e.
boolean
equals(Object obj)
Tests equality of two MonitorDevice
objects
by evaluating equality of it's components:
nativeID
MonitorMode
getCurrentMode()
Returns the cached current MonitorMode
w/o native query.
int
getId()
MonitorMode
getOriginalMode()
Returns the immutable original MonitorMode
, as used at NEWT initialization.
Screen
getScreen()
Returns the Screen
owning this monitor.
DimensionImmutable
getSizeMM()
List<MonitorMode>
getSupportedModes()
Returns a list of immutable MonitorMode
s supported by this monitor.
RectangleImmutable
getViewport()
Returns the rectangular
portion of the rotated virtual Screen
size represented by this monitor.
int
hashCode()
Returns a combined hash code of it's elements:
nativeID
boolean
isModeChangedByUs()
Returns true if the
MonitorMode
has been changed programmatic via this API only, otherwise false
.
boolean
isOriginalMode()
abstract MonitorMode
queryCurrentMode()
Returns the current MonitorMode
resulting from a native query.
abstract boolean
setCurrentMode(MonitorMode mode)
Set the current MonitorMode
.
String
toString()
static Rectangle
unionOfViewports(Rectangle result,
List<MonitorDevice> monitors)
Returns the union of the given monitor's viewport
.
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
Method Detail
getScreen
public final Screen getScreen()
Screen
owning this monitor.
equals
public final boolean equals(Object obj)
MonitorDevice
objects
by evaluating equality of it's components:
nativeID
hashCode
public final int hashCode()
getId
public final int getId()
getSizeMM
public final DimensionImmutable getSizeMM()
getOriginalMode
public final MonitorMode getOriginalMode()
MonitorMode
, as used at NEWT initialization.
MonitorMode
is element of the lists getSupportedModes()
and Screen.getMonitorModes()
.
getSupportedModes
public final List<MonitorMode> getSupportedModes()
MonitorMode
s supported by this monitor.
getViewport
public final RectangleImmutable getViewport()
rectangular
portion of the rotated virtual Screen
size represented by this monitor.
contains
public final boolean contains(int x,
int y)
true
if given coordinates are contained by this viewport
, otherwise false
.
coverage
public final float coverage(RectangleImmutable r)
viewport
, i.e. between 0.0
and 1.0
.
isect = viewport.intersection(r);
coverage = area( isect ) / area( viewport ) ;
public static Rectangle unionOfViewports(Rectangle result, List<MonitorDevice> monitors)
viewport
.
result
- storage for result, will be returnedmonitors
- given list of monitors
public final boolean isOriginalMode()
public final boolean isModeChangedByUs()
true if the MonitorMode
has been changed programmatic via this API only, otherwise false
.
Note: We cannot guarantee that we won't interfere w/ another running
application's screen mode change or vice versa.
public final MonitorMode getCurrentMode()
MonitorMode
w/o native query.
The returned MonitorMode
is element of the lists getSupportedModes()
and Screen.getMonitorModes()
.
public abstract MonitorMode queryCurrentMode()
MonitorMode
resulting from a native query.
The returned MonitorMode
is element of the lists getSupportedModes()
and Screen.getMonitorModes()
.
public abstract boolean setCurrentMode(MonitorMode mode)
MonitorMode
.
mode
- to be made current, must be element of the list getSupportedModes()
and Screen.getMonitorModes()
.
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |