|
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.GameFrameSettings
This class offers the methods for a game developer to define what kind
of features he wants to be enabled (fullscreen or non-fullscreen graphics
modes, proprietary engines or plain Java engines etc.) the resolution of
the created graphics engine.
Default values are:
Field Summary | |
static int |
SCREENMODE_COMPONENT
Enumerated mode for the graphics engine, means component graphics mode. |
static int |
SCREENMODE_FULLSCREEN
Enumerated mode for the graphics engine, means fullscreen graphics mode. |
static int |
SCREENMODE_WINDOWED
Enumerated mode for the graphics engine, means windowed graphics mode. |
Constructor Summary | |
GameFrameSettings()
|
Method Summary | |
GameFrameSettings |
getCopy()
Returns a copy of the settings. |
int |
getRequiredBitdepth()
Returns the bits per pixel value that is required from the graphics engine implementation. |
int |
getRequiredRefreshRate()
Returns the refresh rate that is required from the graphics engine implementation. |
java.lang.String |
getRequiredResolution()
Returns the resolution that is required from the graphics engine implementation. |
int |
getRequiredResolutionHeight()
Returns the required height of the resolution. |
int |
getRequiredResolutionWidth()
Returns the required width of the resolution. |
int |
getScreenMode()
Returns the flag that indicates if fullscreen modes are allowed. |
java.lang.String |
getTitle()
Reutnrs the title that is shown when possible for the graphics engine. |
boolean |
isJmf11Allowed()
Returns the flag that indicates if Java Media Framework 1.1 specific implementations are allowed. |
boolean |
isMsJavaAllowed()
Returns the flag that indicates if Microsoft Java VM specific implementations are allowed. |
boolean |
isNativeAllowed()
Returns the flag that indicates if native code implementations are allowed. |
void |
parseCommandLineArgs(java.lang.String[] aStrArgs)
Parses the given command line arguments and sets the contained settings accordingly. |
void |
setAllowJmf11(boolean fAllow)
Sets the flag that indicates if Java Media Framework 1.1 specific implementations are allowed. |
void |
setAllowMsJava(boolean fAllow)
Sets the flag that indicates if Microsoft Java VM specific implementations are allowed. |
void |
setAllowNative(boolean fAllow)
Sets the flag that indicates if native code implementations are allowed. |
void |
setFromApplet(java.applet.Applet applet)
Queries the given applet for parameters and sets the contained settings accordingly. |
void |
setRequiredResolution(java.lang.String requiredResolution)
Sets the resolution that is required from the graphics engine implementation. |
void |
setScreenMode(int eMode)
Sets the required screen mode for the graphics engine. |
void |
setTitle(java.lang.String strTitle)
Sets the title that is shown when possible for the graphics engine. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SCREENMODE_FULLSCREEN
public static final int SCREENMODE_WINDOWED
public static final int SCREENMODE_COMPONENT
Constructor Detail |
public GameFrameSettings()
Method Detail |
public final void setRequiredResolution(java.lang.String requiredResolution)
Sets the resolution that is required from the graphics engine implementation. Must be invoked before engine factory enumeration occurs (before first invocation of getRecommendedEngineFactory() or getFactories() methods) to have any effect. Resolution is represented as string that have one of the following syntaxes (the values used are purely examplary):
Note: The bitdepth (if defined) must be one of the GameFrameSettings.COLOURDEPTH_xxBITS values, otherwise it is ignored and the default bits per pixel value (defined in GraphicsEngine.DEFAULT_COLOURDEPTH) is used.
Note: The bitdepth & refresh rate are usually ignored for non-fullscreen graphics engine implementations and the desktop's refresh rate & bitdepth are used.
requiredResolution
- The resolution the graphics engine must support.getRequiredResolution()
public final java.lang.String getRequiredResolution()
setRequiredResolution(java.lang.String)
public final int getRequiredBitdepth()
setRequiredResolution(java.lang.String)
public final int getRequiredRefreshRate()
setRequiredResolution(java.lang.String)
public final int getRequiredResolutionWidth()
setRequiredResolution(java.lang.String)
public final int getRequiredResolutionHeight()
setRequiredResolution(java.lang.String)
public final void setScreenMode(int eMode)
eMode
- One of the SCREENMODE_xxx values.getScreenMode()
public final int getScreenMode()
setScreenMode(int)
public void setTitle(java.lang.String strTitle)
strTitle
- The title that is to be shown.public java.lang.String getTitle()
public final void setAllowMsJava(boolean fAllow)
fAllow
- True if Microsoft Java VM specific libraries are allowed, false if not.isMsJavaAllowed()
public final boolean isMsJavaAllowed()
setAllowMsJava(boolean)
public final void setAllowJmf11(boolean fAllow)
fAllow
- True if Java Media Framework 1.1 specific implementations are allowed, false if not.isJmf11Allowed()
public final boolean isJmf11Allowed()
setAllowJmf11(boolean)
public final void setAllowNative(boolean fAllow)
fAllow
- True if native libraries are allowed, false if not.isNativeAllowed()
public final boolean isNativeAllowed()
setAllowNative(boolean)
public final void setFromApplet(java.applet.Applet applet)
Queries the given applet for parameters and sets the contained settings accordingly. This method should be called AFTER you have set your own settings in order to allow users to override your settings. Recognizes the following Applet parameters:
applet
- The applet queried for parameters.public void parseCommandLineArgs(java.lang.String[] aStrArgs)
Parses the given command line arguments and sets the contained settings accordingly. This method should be called AFTER you have set your own settings in order to allow users to override your settings. Recognizes the following strings:
Note: The prefix can be also other than "-" as the prefix is ignored.
aStrArgs
- Array of command line arguments.public GameFrameSettings getCopy()
|
GF4J 0.9.4 Beta | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |