|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gameframe.GameFrame | +--gameframe.AppletGameFrame
The GameFrame librarys main entry point class. The methods in this class are mainly used when the game is starting, after that this class is normally not used at all. For this reason many of the methods in this class aren't optimized for speed, but for lesser memory usage. Only exception is the getGameFramePath() method that might be used by implementations to find out e.g. the location of the default font bitmap. This one method is made to be as fast as possible.
Field Summary | |
protected java.applet.Applet |
m_applet
The Applet that is using the GameFrame. |
Constructor Summary | |
AppletGameFrame(java.applet.Applet applet)
Constructs the GameFrame using default settings. |
|
AppletGameFrame(java.applet.Applet applet,
GameFrameSettings settings)
Constructs the GameFrame using the given settings. |
Method Summary | |
java.applet.Applet |
getApplet()
Returns the Applet that is using GF4J. |
java.lang.String |
getDefaultFontBitmapFilename()
Filename that can be used to load the default font bitmap. |
java.awt.Image |
getDefaultIcon()
Returns the Image that is set as the default image icon for all graphics engine windows. |
java.lang.String |
getGameFramePath()
Returns the absolute path to the main directory of the library that contains the GameFrame entry point. |
protected void |
searchEngineFactories()
Does the core job of adding all engine factories to the list of runnable factories (engine factories that can run on the current platform). |
Methods inherited from class java.lang.Object |
|
Field Detail |
protected java.applet.Applet m_applet
Constructor Detail |
public AppletGameFrame(java.applet.Applet applet) throws SettingsException, GameFrameException
applet
- The Applet that is the applet using gameframe.SettingsException
- Thrown if a GameFrame instance allready exists.
GameFrame instance can be destroyed by calling the finalize() method.GameFrameException
- Thrown if some engine fails to initialize.GameFrameSettings
public AppletGameFrame(java.applet.Applet applet, GameFrameSettings settings) throws SettingsException, GameFrameException
settings
- The settings to use inside the GameFrame library. If null is provided uses
default settings.SettingsException
- Thrown if a GameFrame instance allready exists.
GameFrame instance can be destroyed by calling the finalize() method.GameFrameException
- Thrown if some engine fails to initialize.GameFrameSettings
Method Detail |
public java.lang.String getGameFramePath()
getGameFramePath
in class GameFrame
public java.applet.Applet getApplet()
public java.awt.Image getDefaultIcon()
getDefaultIcon
in class GameFrame
public java.lang.String getDefaultFontBitmapFilename()
getDefaultFontBitmapFilename
in class GameFrame
protected void searchEngineFactories()
Does the core job of adding all engine factories to the list of runnable factories (engine factories that can run on the current platform). Later added engine factories that have the same suitability value will override engine factories that were added earlier.
Note to engine implementors: Engine implementors that add new engines for Applet use must add their engine factories in this method. Also this is the method to override if you want to make your own custom GameFrame subclass.
Overridden to use Applet friendly query tactics.searchEngineFactories
in class GameFrame
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |