|
GTGE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Panel
java.applet.Applet
com.golden.gamedev.engine.graphics.AppletMode
public class AppletMode
Graphics engine for Applet Environment.
See BaseGraphics for how to use graphics
engine separated from Golden T Game Engine (GTGE) Frame Work.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.applet.Applet |
|---|
Applet.AccessibleApplet |
| Nested classes/interfaces inherited from class java.awt.Panel |
|---|
Panel.AccessibleAWTPanel |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static GraphicsConfiguration |
CONFIG
The graphics configuration that constructs this graphics engine. |
static GraphicsDevice |
DEVICE
The graphics device that constructs this graphics engine. |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
AppletMode()
Creates new instance of Applet Graphics Engine, please see note below. |
|
| Method Summary | |
|---|---|
void |
cleanup()
Releases any system graphics resources and do finalization. |
void |
destroy()
Override Applet.destroy() to release any graphics resource
by calling cleanup(). |
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. |
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. |
void |
setWindowIcon(Image icon)
Sets graphics engine window icon image. |
void |
setWindowTitle(String st)
Sets graphics engine window title. |
void |
start()
Initializes this applet graphics engine, do not attempt to use any graphics function before this method is automatically called by the browser. |
| Methods inherited from class java.applet.Applet |
|---|
getAccessibleContext, getAppletContext, getAppletInfo, getAudioClip, getAudioClip, getCodeBase, getDocumentBase, getImage, getImage, getLocale, getParameter, getParameterInfo, init, isActive, newAudioClip, play, play, resize, resize, setStub, showStatus, stop |
| Methods inherited from class java.awt.Panel |
|---|
addNotify |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final GraphicsDevice DEVICE
public static final GraphicsConfiguration CONFIG
| Constructor Detail |
|---|
public AppletMode()
Note:
Do not make any overloading constructors.
The engine is initialized in start() method,
therefore do not use any graphics function before
the start() method is being called by the browser.
start()| Method Detail |
|---|
public void start()
start in class Appletpublic 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 void destroy()
Applet.destroy() to release any graphics resource
by calling cleanup().
destroy in class Appletpublic Dimension getSize()
BaseGraphics
getSize in interface BaseGraphicsgetSize in class Componentpublic Component getComponent()
BaseGraphics
getComponent in interface BaseGraphicspublic 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
|
GTGE API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||