APIdia Launch Partner
Top Description Fields Constructors Methods
com.sun.prism

public abstract Class PresentableState

extends Object
Class Inheritance
Known Direct Subclasses
com.sun.javafx.tk.quantum.SceneState
Imports
com.sun.glass.ui.Application, .Pixels, .Screen, .View, .Window

PresentableState is intended to provide for a shadow copy of View/Window state for use off the event thread. It is the task of the invoker of Prism to make sure that the state is consistent for a rendering probably by use of the AbstractPainter.renderLock to ensure consistent state.

Field Summary

Modifier and TypeField and Description
protected static final boolean
protected boolean
protected boolean
protected boolean
protected long
protected long
protected long
protected int
protected float
protected float
protected int
protected final int
protected int
protected float
protected float
protected int
protected int
protected int
protected View
protected int
protected int
protected Window
window

The underlying Window and View

protected float
protected int
protected int

Constructor Summary

AccessConstructor and Description
public
PresentableState()

Create a PresentableState based on a View.

Method Summary

Modifier and TypeMethod and Description
public float
getAlpha()

Returns: the window's alpha level May be called on any thread.

public int
getHeight()

Returns: the height of the View May be called on any thread.

public long
getNativeFrameBuffer()

Returns: native native frame buffer May be called on any thread.

public long
getNativeView()

Returns: the native handle of the View represented by this PresentableState May be called on any thread.

public long
getNativeWindow()

Returns: the native handle of the window represented by this PresentableState May be called on any thread.

public int
public float
public float
public int
public int
getPixelFormat()

Returns: native pixel format May be called on any thread.

public int
public float
getRenderScaleX()

Returns: Screen.getScale May be called on any thread

public float
getRenderScaleY()

Returns: Screen.getScale May be called on any thread

public int
public int
getScreenHeight()

Returns: the current height of the screen May be called on any thread.

public int
getScreenWidth()

Returns: the current width of the screen May be called on any thread.

public View
getView()

Returns: the underlying View May be called on any thread.

public int
getWidth()

Returns: the width of the View May be called on any thread.

public Window
getWindow()

Returns: the underlying Window May be called on any thread.

public int

Returns:

The screen relative window X May be called on any thread.
getWindowX
()

The screen relative window X

public int

Returns:

The screen relative window Y May be called on any thread.
getWindowY
()

The screen relative window Y

public boolean
hasWindowManager()

Returns: true if the underlying window is managed by a window manager external to JavaFX May be called on any thread.

public boolean
public boolean
isViewClosed()

Returns: true if the underlying View is closed, false otherwise May be called on any thread.

public boolean
isWindowMinimized()

Returns: true if the underlying Window is minimized, false otherwise May be called on any thread.

public boolean
isWindowVisible()

Returns: true if the underlying Window is Visible, false otherwise May be called on any thread.

public void
lock()

Locks the underlying view for rendering Must be called on Prism renderer thread.

private int
scale(int dim, float fromScale, float toScale)

public void
unlock()

Unlocks the underlying view after rendering Must be called on Prism renderer thread.

protected void
update(float viewScaleX, float viewScaleY, float renderScaleX, float renderScaleY, float outputScaleX, float outputScaleY)

public void
update()

Updates the state of this object based on the current state of its nativeWindow.

public void
uploadPixels(PixelSource
- the source for the Pixels object to be uploaded
source
)

Put the pixels on the screen.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

hasWindowManagerback to summary
protected static final boolean hasWindowManager
isClosedback to summary
protected boolean isClosed
isWindowMinimizedback to summary
protected boolean isWindowMinimized
isWindowVisibleback to summary
protected boolean isWindowVisible
nativeFrameBufferback to summary
protected long nativeFrameBuffer
nativeViewback to summary
protected long nativeView
nativeWindowHandleback to summary
protected long nativeWindowHandle
outputHeightback to summary
protected int outputHeight
outputScaleXback to summary
protected float outputScaleX
outputScaleYback to summary
protected float outputScaleY
outputWidthback to summary
protected int outputWidth
pixelFormatback to summary
protected final int pixelFormat
renderHeightback to summary
protected int renderHeight
renderScaleXback to summary
protected float renderScaleX
renderScaleYback to summary
protected float renderScaleY
renderWidthback to summary
protected int renderWidth
screenHeightback to summary
protected int screenHeight
screenWidthback to summary
protected int screenWidth
viewback to summary
protected View view
viewHeightback to summary
protected int viewHeight
viewWidthback to summary
protected int viewWidth
windowback to summary
protected Window window

The underlying Window and View

windowAlphaback to summary
protected float windowAlpha
windowXback to summary
protected int windowX
windowYback to summary
protected int windowY

Constructor Detail

PresentableStateback to summary
public PresentableState()

Create a PresentableState based on a View. Must be called on the event thread.

Method Detail

getAlphaback to summary
public float getAlpha()
Returns:float

the window's alpha level May be called on any thread.

getHeightback to summary
public int getHeight()
Returns:int

the height of the View May be called on any thread.

getNativeFrameBufferback to summary
public long getNativeFrameBuffer()
Returns:long

native native frame buffer May be called on any thread.

getNativeViewback to summary
public long getNativeView()
Returns:long

the native handle of the View represented by this PresentableState May be called on any thread.

getNativeWindowback to summary
public long getNativeWindow()
Returns:long

the native handle of the window represented by this PresentableState May be called on any thread.

getOutputHeightback to summary
public int getOutputHeight()
getOutputScaleXback to summary
public float getOutputScaleX()
getOutputScaleYback to summary
public float getOutputScaleY()
getOutputWidthback to summary
public int getOutputWidth()
getPixelFormatback to summary
public int getPixelFormat()
Returns:int

native pixel format May be called on any thread.

getRenderHeightback to summary
public int getRenderHeight()
getRenderScaleXback to summary
public float getRenderScaleX()
Returns:float

Screen.getScale May be called on any thread

getRenderScaleYback to summary
public float getRenderScaleY()
Returns:float

Screen.getScale May be called on any thread

getRenderWidthback to summary
public int getRenderWidth()
getScreenHeightback to summary
public int getScreenHeight()
Returns:int

the current height of the screen May be called on any thread.

getScreenWidthback to summary
public int getScreenWidth()
Returns:int

the current width of the screen May be called on any thread.

getViewback to summary
public View getView()
Returns:View

the underlying View May be called on any thread.

getWidthback to summary
public int getWidth()
Returns:int

the width of the View May be called on any thread.

getWindowback to summary
public Window getWindow()
Returns:Window

the underlying Window May be called on any thread.

getWindowXback to summary
public int getWindowX()

The screen relative window X

Returns:int

The screen relative window X May be called on any thread.

getWindowYback to summary
public int getWindowY()

The screen relative window Y

Returns:int

The screen relative window Y May be called on any thread.

hasWindowManagerback to summary
public boolean hasWindowManager()
Returns:boolean

true if the underlying window is managed by a window manager external to JavaFX May be called on any thread.

isMSAAback to summary
public boolean isMSAA()
isViewClosedback to summary
public boolean isViewClosed()
Returns:boolean

true if the underlying View is closed, false otherwise May be called on any thread.

isWindowMinimizedback to summary
public boolean isWindowMinimized()
Returns:boolean

true if the underlying Window is minimized, false otherwise May be called on any thread.

isWindowVisibleback to summary
public boolean isWindowVisible()
Returns:boolean

true if the underlying Window is Visible, false otherwise May be called on any thread.

lockback to summary
public void lock()

Locks the underlying view for rendering Must be called on Prism renderer thread.

scaleback to summary
private int scale(int dim, float fromScale, float toScale)
unlockback to summary
public void unlock()

Unlocks the underlying view after rendering Must be called on Prism renderer thread.

updateback to summary
protected void update(float viewScaleX, float viewScaleY, float renderScaleX, float renderScaleY, float outputScaleX, float outputScaleY)
updateback to summary
public void update()

Updates the state of this object based on the current state of its nativeWindow. May only be called from the event thread.

uploadPixelsback to summary
public void uploadPixels(PixelSource source)

Put the pixels on the screen.

Parameters
source:PixelSource

- the source for the Pixels object to be uploaded