|
GTGE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.golden.gamedev.engine.graphics.WindowedMode
public class WindowedMode
Graphics engine for Windowed Environment.
See BaseGraphics
for how to use graphics
engine separated from Golden T Game Engine (GTGE) Frame Work.
Field Summary | |
---|---|
static GraphicsConfiguration |
CONFIG
The graphics configuration that constructs this graphics engine. |
static GraphicsDevice |
DEVICE
The graphics device that constructs this graphics engine. |
Constructor Summary | |
---|---|
WindowedMode(Dimension d,
boolean bufferstrategy)
Creates new instance of Windowed Graphics Engine with specified size, and whether want to use bufferstrategy or volatile image. |
Method Summary | |
---|---|
void |
cleanup()
Releases any system graphics resources and do finalization. |
boolean |
flip()
Flips backbuffer to the screen (primary surface). |
Graphics2D |
getBackBuffer()
Returns backbuffer where the rendering perform. |
Component |
getComponent()
Returns the component where the rendering perform. |
Frame |
getFrame()
Returns the top level frame where this graphics engine is being put on. |
String |
getGraphicsDescription()
Returns graphics engine description, for example: fullscreen, windowed, applet, fullscreen with bufferstrategy, etc. |
Dimension |
getSize()
Returns graphics engine dimension. |
Image |
getWindowIcon()
Returns graphics engine window icon image or null if
setting window icon image is not supported. |
String |
getWindowTitle()
Returns graphics engine window title or String "" if
setting window title is not supported. |
boolean |
isBufferStrategy()
Returns whether this graphics engine is using buffer strategy or volatile image. |
void |
setWindowIcon(Image icon)
Sets graphics engine window icon image. |
void |
setWindowTitle(String st)
Sets graphics engine window title. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final GraphicsDevice DEVICE
public static final GraphicsConfiguration CONFIG
Constructor Detail |
---|
public WindowedMode(Dimension d, boolean bufferstrategy)
Method Detail |
---|
public Graphics2D getBackBuffer()
BaseGraphics
getBackBuffer
in interface BaseGraphics
public boolean flip()
BaseGraphics
For example:
do { Graphics2D g = BaseGraphics.getBackBuffer(); //.... do graphics operation } while (BaseGraphics.flip() == false);See
VolatileImage
for detail information.
flip
in interface BaseGraphics
BaseGraphics.getBackBuffer()
public void cleanup()
BaseGraphics
cleanup
in interface BaseGraphics
public Dimension getSize()
BaseGraphics
getSize
in interface BaseGraphics
public Component getComponent()
BaseGraphics
getComponent
in interface BaseGraphics
public Frame getFrame()
public boolean isBufferStrategy()
public String getGraphicsDescription()
BaseGraphics
getGraphicsDescription
in interface BaseGraphics
public void setWindowTitle(String st)
BaseGraphics
Note: Not all graphics engine support for setting window title, for example applet graphics engine.
setWindowTitle
in interface BaseGraphics
public String getWindowTitle()
BaseGraphics
String
"" if
setting window title is not supported.
getWindowTitle
in interface BaseGraphics
public void setWindowIcon(Image icon)
BaseGraphics
Note: Not all graphics engine support for setting window icon, for example applet graphics engine.
setWindowIcon
in interface BaseGraphics
ImageUtil.getImage(java.net.URL)
public Image getWindowIcon()
BaseGraphics
null
if
setting window icon image is not supported.
getWindowIcon
in interface BaseGraphics
|
GTGE API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |