|
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.FullScreenMode
public class FullScreenMode
Graphics engine for Full Screen Exclusive Environment (FSEM).
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 | |
|---|---|
FullScreenMode(Dimension d,
boolean bufferstrategy)
Creates new instance of Full Screen 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. |
int |
compare(Object o1,
Object o2)
Sorts display mode, display mode in the first stack will be used by this graphics engine. |
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 |
| Methods inherited from interface java.util.Comparator |
|---|
equals |
| Field Detail |
|---|
public static final GraphicsDevice DEVICE
public static final GraphicsConfiguration CONFIG
| Constructor Detail |
|---|
public FullScreenMode(Dimension d,
boolean bufferstrategy)
| Method Detail |
|---|
public Graphics2D getBackBuffer()
BaseGraphics
getBackBuffer in interface BaseGraphicspublic boolean flip()
BaseGraphicsFor example:
do {
Graphics2D g = BaseGraphics.getBackBuffer();
//.... do graphics operation
} while (BaseGraphics.flip() == false);
See VolatileImage for detail information.
flip in interface BaseGraphicsBaseGraphics.getBackBuffer()public void cleanup()
BaseGraphics
cleanup in interface BaseGraphicspublic Dimension getSize()
BaseGraphics
getSize in interface BaseGraphicspublic Component getComponent()
BaseGraphics
getComponent in interface BaseGraphicspublic Frame getFrame()
public boolean isBufferStrategy()
public String getGraphicsDescription()
BaseGraphics
getGraphicsDescription in interface BaseGraphicspublic void setWindowTitle(String st)
BaseGraphicsNote: Not all graphics engine support for setting window title, for example applet graphics engine.
setWindowTitle in interface BaseGraphicspublic String getWindowTitle()
BaseGraphicsString "" if
setting window title is not supported.
getWindowTitle in interface BaseGraphicspublic void setWindowIcon(Image icon)
BaseGraphicsNote: Not all graphics engine support for setting window icon, for example applet graphics engine.
setWindowIcon in interface BaseGraphicsImageUtil.getImage(java.net.URL)public Image getWindowIcon()
BaseGraphicsnull if
setting window icon image is not supported.
getWindowIcon in interface BaseGraphics
public int compare(Object o1,
Object o2)
o1 and o2 are instance of
java.awt.DisplayMode. In this comparator, the first stack (the one that this graphics engine will be used) will be display mode that has the biggest bits per pixel (bpp) and has the biggest but limited to 75Hz frequency (refresh rate).
compare in interface Comparator
|
GTGE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||