private static class J2DPresentable.Bimg extends J2DPresentable
Modifier and Type | Field and Description |
---|---|
private boolean |
opaque |
buffer, factory, ib, needsResize, readbackBuffer
Constructor and Description |
---|
Bimg(java.awt.image.BufferedImage buffer,
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 dirtyregion)
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
public Bimg(java.awt.image.BufferedImage buffer, 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 dirtyregion)
Presentable
dirtyregion
- display region or null for full areapublic boolean present()
Presentable
public int getContentWidth()
public int getContentHeight()
public void setOpaque(boolean opaque)
public boolean isOpaque()