gameframe
Class AppletGameFrame
java.lang.Object
|
+--gameframe.GameFrame
|
+--gameframe.AppletGameFrame
- public class AppletGameFrame
- extends GameFrame
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.
- Since:
- GameFrame for Java 0.9.4
- Version:
- GameFrame for Java 0.9.4
- Author:
- Pasi Keränen 07.Apr 2000
Fields inherited from class gameframe.GameFrame |
BUILD_NUMBER, ENGINE_FACTORY_CLASS, ENGINE_FACTORY_GET_INSTANCE_METHOD_NAME, ENGINE_FACTORY_GET_INSTANCE_METHOD_PARAM_CLASSES, ENGINE_FACTORY_IS_RUNNABLE_METHOD_NAME, ENGINE_MAIN_PACKAGE_NAME, ENGINE_SUBDIR_NAME, GAME_FRAME_PACKAGE_NAME, IS_STABLE_RELEASE, MAJOR_VERSION, MINOR_VERSION |
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. |
Methods inherited from class gameframe.GameFrame |
createTimer, exit, finalize, getBuild, getDescription, getGraphicsEngine, getInputEngine, getInstance, getMajorVersion, getMinorVersion, getName, getSoundEngine, getSuitabilityForPlatform, getSupportedResolutions, isInitialized, isStableVersion |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AppletGameFrame
public AppletGameFrame(java.applet.Applet applet)
throws SettingsException,
GameFrameException
- Constructs the GameFrame using default settings. Also initializes the
recommended engines for the current platform, so that when any of the
getXXXXEngine() methods is called no exceptions are thrown.
- Parameters:
applet
- The Applet that is the applet using gameframe.- Throws:
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.- Since:
- GameFrame for Java 0.9.1
- See Also:
GameFrameSettings
AppletGameFrame
public AppletGameFrame(java.applet.Applet applet,
GameFrameSettings settings)
throws SettingsException,
GameFrameException
- Constructs the GameFrame using the given settings. Also initializes the
recommended engines for the current platform, so that when any of the
getXXXXEngine() methods is called no exceptions are thrown.
- Parameters:
settings
- The settings to use inside the GameFrame library. If null is provided uses
default settings.- Throws:
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.- Since:
- GameFrame for Java 0.9.1
- See Also:
GameFrameSettings
getGameFramePath
public java.lang.String getGameFramePath()
- Returns the absolute path to the main directory of the library that contains
the GameFrame entry point. The directory is found by getting the Applet document
base and adding "/" plus the engine package location to the URL.
and addig the string "gameframe" as subdirectory to each entry.
- Overrides:
getGameFramePath
in class GameFrame
- Returns:
- The directory that is the main directory of the GameFrame library.
- Since:
- GameFrame for Java 0.9.4
getApplet
public java.applet.Applet getApplet()
- Returns the Applet that is using GF4J.
- Returns:
- The Applet that is using GF4J.
- Since:
- GameFrame for Java 0.9.4
getDefaultIcon
public java.awt.Image getDefaultIcon()
- Returns the Image that is set as the default image icon for all graphics engine windows.
- Overrides:
getDefaultIcon
in class GameFrame
- Returns:
- Default icon for engine windows.
getDefaultFontBitmapFilename
public java.lang.String getDefaultFontBitmapFilename()
- Filename that can be used to load the default font bitmap.
- Overrides:
getDefaultFontBitmapFilename
in class GameFrame
- Returns:
- The default fontbitmap filename.