Top Fields Constructors Methods
jogamp.newt

public Class MonitorDeviceImpl

extends MonitorDevice
Class Inheritance
Imports
com.jogamp.nativewindow.ScalableSurface, com.jogamp.nativewindow.util.DimensionImmutable, .Rectangle, com.jogamp.common.util.ArrayHashSet, com.jogamp.newt.MonitorDevice, .MonitorMode, .Screen

Field Summary

Inherited from com.jogamp.newt.MonitorDevice:
currentModeisCloneisPrimarymodeChangednativeIdoriginalModepixelScalescreensizeMMsupportedModesviewportPUviewportWU

Constructor Summary

AccessConstructor and Description
public
MonitorDeviceImpl(final ScreenImpl
associated Screen
screen
,
final int
unique monitor device ID
nativeId
,
final boolean
flag
isClone
,
final boolean
flag
isPrimary
,
final DimensionImmutable
size in millimeters
sizeMM
,
final MonitorMode currentMode, final float[]
pre-fetched current pixel-scale, maybe null for ScalableSurface#IDENTITY_PIXELSCALE.
pixelScale
,
final Rectangle
viewport in pixel-units
viewportPU
,
final Rectangle
viewport in window-units
viewportWU
,
final ArrayHashSet<MonitorMode>
all supported MonitorModes
supportedModes
)

Method Summary

Modifier and TypeMethod and Description
pack-priv final Rectangle
pack-priv final Rectangle
pack-priv final ArrayHashSet<MonitorMode>
public final MonitorMode
queryCurrentMode()

Implements abstract com.jogamp.newt.MonitorDevice.queryCurrentMode.

Returns the current MonitorMode resulting from a native query.
public final boolean
setCurrentMode(final MonitorMode
to be made current, must be element of the list getSupportedModes() and Screen#getMonitorModes().
mode
)

Implements abstract com.jogamp.newt.MonitorDevice.setCurrentMode.

Set the current com.jogamp.newt.MonitorMode.
private final void
setCurrentModeValue(final MonitorMode currentMode, final boolean isPrimary)

pack-priv final void
setIsClone(final boolean isClone)

pack-priv final void
setIsPrimary(final boolean isPrimary)

Inherited from com.jogamp.newt.MonitorDevice:
containsequalsgetCurrentModegetIdgetOriginalModegetPixelScalegetPixelsPerMMgetPixelsPerMMgetScreengetSizeMMgetSupportedModesgetViewportgetViewportInWindowUnitshashCodeisCloneisModeChangedByUsisOriginalModeisPrimarytoStringunionOfViewports

Constructor Detail

MonitorDeviceImplback to summary
public MonitorDeviceImpl(final ScreenImpl screen, final int nativeId, final boolean isClone, final boolean isPrimary, final DimensionImmutable sizeMM, final MonitorMode currentMode, final float[] pixelScale, final Rectangle viewportPU, final Rectangle viewportWU, final ArrayHashSet<MonitorMode> supportedModes)
Parameters
screen:ScreenImpl

associated Screen

nativeId:int

unique monitor device ID

isClone:boolean

flag

isPrimary:boolean

flag

sizeMM:DimensionImmutable

size in millimeters

pixelScale:float[]

pre-fetched current pixel-scale, maybe null for ScalableSurface#IDENTITY_PIXELSCALE.

viewportPU:Rectangle

viewport in pixel-units

viewportWU:Rectangle

viewport in window-units

supportedModes:ArrayHashSet<MonitorMode>

all supported MonitorModes

Method Detail

getMutuableViewportPUback to summary
pack-priv final Rectangle getMutuableViewportPU()
getMutuableViewportWUback to summary
pack-priv final Rectangle getMutuableViewportWU()
getSupportedModesImplback to summary
pack-priv final ArrayHashSet<MonitorMode> getSupportedModesImpl()
queryCurrentModeback to summary
public final MonitorMode queryCurrentMode() throws IllegalStateException

Implements abstract com.jogamp.newt.MonitorDevice.queryCurrentMode.

Doc from com.jogamp.newt.MonitorDevice.queryCurrentMode.

Returns the current MonitorMode resulting from a native query.

The returned MonitorMode is element of the lists getSupportedModes() and Screen#getMonitorModes().

Annotations
@Override
Exceptions
IllegalStateException:
if the associated screen is not valid natively.
setCurrentModeback to summary
public final boolean setCurrentMode(final MonitorMode mode) throws IllegalStateException

Implements abstract com.jogamp.newt.MonitorDevice.setCurrentMode.

Doc from com.jogamp.newt.MonitorDevice.setCurrentMode.

Set the current com.jogamp.newt.MonitorMode.

This method is lifecycle heavy.

Parameters
mode:MonitorMode

to be made current, must be element of the list getSupportedModes() and Screen#getMonitorModes().

Returns:boolean

true if successful, otherwise false

Annotations
@Override
Exceptions
IllegalStateException:
if the associated screen is not valid natively.
setCurrentModeValueback to summary
private final void setCurrentModeValue(final MonitorMode currentMode, final boolean isPrimary)
setIsCloneback to summary
pack-priv final void setIsClone(final boolean isClone)
setIsPrimaryback to summary
pack-priv final void setIsPrimary(final boolean isPrimary)