private static class J2DPresentable.Glass extends J2DPresentable
Modifier and Type | Field and Description |
---|---|
private boolean |
opaque |
private Pixels |
pixels |
private QueuedPixelSource |
pixelSource |
private PresentableState |
pState |
private int |
theFormat |
buffer, factory, ib, needsResize, readbackBuffer
Constructor and Description |
---|
Glass(PresentableState pState,
J2DResourceFactory factory) |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
createBuffer(int w,
int h) |
int |
getContentHeight() |
int |
getContentWidth() |
boolean |
isOpaque() |
boolean |
lockResources(PresentableState pState)
Locks any underlying resources needed for a createGraphics/prepare/present
sequence and returns a boolean indicating if the presentable needs to be
recreated.
|
boolean |
prepare(Rectangle dirty)
display the indicated region to the user.
|
boolean |
present()
present the prepared region to the user.
|
void |
setOpaque(boolean opaque) |
create, create, createGraphics, getAssociatedScreen, getBackBuffer, getContentX, getContentY, getPhysicalHeight, getPhysicalWidth, getPixelScaleFactor, getReadbackBuffer, getResourceFactory, isMSAA
private final PresentableState pState
private final int theFormat
private Pixels pixels
private QueuedPixelSource pixelSource
private boolean opaque
Glass(PresentableState pState, J2DResourceFactory factory)
public java.awt.image.BufferedImage createBuffer(int w, int h)
createBuffer
in class J2DPresentable
public boolean lockResources(PresentableState pState)
Presentable
GraphicsResource
then its dispose()
method will be
called prior to recreating a new Presentable
object and
so no resource should need to be locked in that case.
The resources will be unlocked in either #prepare()
or
Presentable.present()
.pState
- The presentation state for the upcoming pulsepublic boolean prepare(Rectangle dirty)
Presentable
dirty
- display region or null for full areapublic boolean present()
Presentable
public int getContentWidth()
public int getContentHeight()
public void setOpaque(boolean opaque)
public boolean isOpaque()