|
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
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 | |
static int |
BUILD_NUMBER
The build number of this library. |
static java.lang.Class |
ENGINE_FACTORY_CLASS
The engine factory class (used when finding engine factories). |
static java.lang.String |
ENGINE_FACTORY_GET_INSTANCE_METHOD_NAME
The engine factory's get instance method name. |
static java.lang.Class[] |
ENGINE_FACTORY_GET_INSTANCE_METHOD_PARAM_CLASSES
The engine factory's get instance methods parameter classes. |
static java.lang.String |
ENGINE_FACTORY_IS_RUNNABLE_METHOD_NAME
The engine factory's is runnable on current platform method name. |
static java.lang.String |
ENGINE_MAIN_PACKAGE_NAME
The package name of the main package for engines. |
static java.lang.String |
ENGINE_SUBDIR_NAME
The subdirectory name of the directory for engines. |
static java.lang.String |
GAME_FRAME_PACKAGE_NAME
The package name of the main package for engines. |
static boolean |
IS_STABLE_RELEASE
Is this release a stable release. |
static int |
MAJOR_VERSION
The major version number of this library. |
static int |
MINOR_VERSION
The minor version number of this library. |
Constructor Summary | |
GameFrame()
Constructs the GameFrame using default settings. |
|
GameFrame(GameFrameSettings settings)
Constructs the GameFrame using the given settings. |
Method Summary | |
static Timer |
createTimer()
Returns a new timer instance. |
static void |
exit(int iValue)
Exits cleanly from application that has used GameFrame by first finalizing the whole library (that ensures all native resources are freed) and then calling carbage collector and waiting for a while and THEN exiting the application just like System.exit() method. |
void |
finalize()
Finalizes this GameFrame instance and finalizes the whole GameFrame library. |
static int |
getBuild()
Returns the build number of the GameFrame library. |
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. |
static java.lang.String |
getDescription()
Returns the (possibly multiline) description of the currently used implementation. |
java.lang.String |
getGameFramePath()
Returns the absolute path to the main directory of the library that contains the GameFrame public classes. |
static GraphicsEngine |
getGraphicsEngine()
Returns the recommended graphics engine for the current platform or null if graphics engine was for some reason not created. |
static InputEngine |
getInputEngine()
Returns the recommended input engine for the current platform or null if input engine was for some reason not created. |
static GameFrame |
getInstance()
Returns the singleton instance of the GameFrame class. |
static int |
getMajorVersion()
Returns the major version of the GameFrame library. |
static int |
getMinorVersion()
Returns the minor version of the GameFrame library. |
static java.lang.String |
getName()
Returns the short name (max 8 characters) of the currently used implementation e.g. |
static SoundEngine |
getSoundEngine()
Returns the recommended sound engine for the current platform or null if sound engine was for some reason not created. |
static int |
getSuitabilityForPlatform()
Returns the suitability of the currently used implementation for the current platform as one of the enumerated EngineFactory.SUITABILITY_xxx values. |
static java.lang.String[] |
getSupportedResolutions()
Returns all the fullscreen graphics modes supported by recommended graphics engine. |
static boolean |
isInitialized()
Returns whether GF4J library is initialized at the moment or not. |
static boolean |
isStableVersion()
Returns true if this version is a stable release (not prerelease, beta or alpha or anything like that) meant for anyones use. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MAJOR_VERSION
public static final int MINOR_VERSION
public static final int BUILD_NUMBER
public static final boolean IS_STABLE_RELEASE
public static final java.lang.String GAME_FRAME_PACKAGE_NAME
public static final java.lang.String ENGINE_MAIN_PACKAGE_NAME
public static final java.lang.String ENGINE_SUBDIR_NAME
public static final java.lang.Class ENGINE_FACTORY_CLASS
public static final java.lang.String ENGINE_FACTORY_GET_INSTANCE_METHOD_NAME
public static final java.lang.String ENGINE_FACTORY_IS_RUNNABLE_METHOD_NAME
public static final java.lang.Class[] ENGINE_FACTORY_GET_INSTANCE_METHOD_PARAM_CLASSES
Constructor Detail |
public GameFrame() throws SettingsException, GameFrameException
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 GameFrame(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 static boolean isInitialized()
public static GameFrame getInstance()
NullPointerException
- Thrown if GameFrame has not been created.public java.lang.String getGameFramePath()
public java.awt.Image getDefaultIcon()
public java.lang.String getDefaultFontBitmapFilename()
public static boolean isStableVersion()
public static int getMajorVersion()
public static int getMinorVersion()
public static int getBuild()
public static java.lang.String getName()
public static java.lang.String getDescription()
public static int getSuitabilityForPlatform()
public static GraphicsEngine getGraphicsEngine()
public static InputEngine getInputEngine()
public static SoundEngine getSoundEngine()
public static java.lang.String[] getSupportedResolutions()
public static Timer createTimer() throws GameFrameException
GameFrameException
- Thrown if timer creation fails.public static void exit(int iValue)
iValue
- The integer value to be returned by the exit method
to the native system.public void finalize()
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |