|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface GameSettings
GameSettings
offers an abstraction from the internals of getting/setting
settings for a game.
Field Summary | |
---|---|
static int |
DEFAULT_ALPHA_BITS
|
static int |
DEFAULT_DEPTH
The default depth, used if there is a problem with the properties file. |
static int |
DEFAULT_DEPTH_BITS
|
static int |
DEFAULT_FRAMERATE
|
static int |
DEFAULT_FREQUENCY
The default frequency, used if there is a problem with the properties file. |
static boolean |
DEFAULT_FULLSCREEN
The default fullscreen flag, used if there is a problem with the properties file. |
static int |
DEFAULT_HEIGHT
The default height, used if there is a problem with the properties file. |
static boolean |
DEFAULT_MUSIC
|
static java.lang.String |
DEFAULT_RENDERER
The default renderer flag, used if there is a problem with the properties file. |
static int |
DEFAULT_SAMPLES
|
static boolean |
DEFAULT_SFX
|
static int |
DEFAULT_STENCIL_BITS
|
static boolean |
DEFAULT_VERTICAL_SYNC
|
static int |
DEFAULT_WIDTH
The default width, used if there is a problem with the properties file. |
Method Summary | |
---|---|
void |
clear()
Clears all settings. |
java.lang.String |
get(java.lang.String name,
java.lang.String defaultValue)
|
int |
getAlphaBits()
Returns the alpha bits to use for the renderer as stored or the default. |
boolean |
getBoolean(java.lang.String name,
boolean defaultValue)
|
byte[] |
getByteArray(java.lang.String name,
byte[] bytes)
|
java.lang.String |
getDefaultSettingsWidgetImage()
|
int |
getDepth()
Returns the depth for the screen as stored or the default. |
int |
getDepthBits()
Returns the depth bits to use for the renderer as stored or the default. |
double |
getDouble(java.lang.String name,
double defaultValue)
|
float |
getFloat(java.lang.String name,
float defaultValue)
|
int |
getFramerate()
Returns the specified framerate or -1 if variable framerate is specified. |
int |
getFrequency()
Returns the screen refresh frequency as stored or the default. |
int |
getHeight()
Returns the height for the screen as stored or the default. |
int |
getInt(java.lang.String name,
int defaultValue)
|
long |
getLong(java.lang.String name,
long defaultValue)
|
java.lang.Object |
getObject(java.lang.String name,
java.lang.Object obj)
|
java.lang.String |
getRenderer()
Returns the stored rendering API name, or the default |
int |
getSamples()
Returns the number of samples to use for the multisample buffer as stored or the default. |
int |
getStencilBits()
Returns the stencil bits to use for the renderer as stored or the default. |
int |
getWidth()
Returns the width for the screen as stored or the default. |
boolean |
isFullscreen()
Returns the screen's fullscreen status as stored or the default. |
boolean |
isMusic()
Returns the enabled status of music as stored or the default. |
boolean |
isNew()
|
boolean |
isSFX()
Returns the enabled status of sound effects as stored or the default. |
boolean |
isVerticalSync()
Returns the current state of vertical synchronization. |
void |
save()
This method will persist all changed settings. |
void |
set(java.lang.String name,
java.lang.String value)
|
void |
setAlphaBits(int alphaBits)
Sets the alpha bits for use with the renderer. |
void |
setBoolean(java.lang.String name,
boolean value)
|
void |
setByteArray(java.lang.String name,
byte[] bytes)
|
void |
setDepth(int depth)
Sets the depth for the screen. |
void |
setDepthBits(int depthBits)
Sets the depth bits for use with the renderer. |
void |
setDouble(java.lang.String name,
double value)
|
void |
setFloat(java.lang.String name,
float value)
|
void |
setFramerate(int framerate)
Sets the framerate. |
void |
setFrequency(int frequency)
Sets the screen refresh frequency. |
void |
setFullscreen(boolean fullscreen)
Sets the fullscreen status for the screen. |
void |
setHeight(int height)
Sets the height for the screen. |
void |
setInt(java.lang.String name,
int value)
|
void |
setLong(java.lang.String name,
long value)
|
void |
setMusic(boolean musicEnabled)
Sets the enabled status of music. |
void |
setObject(java.lang.String name,
java.lang.Object obj)
|
void |
setRenderer(java.lang.String renderer)
Sets the rendering API. |
void |
setSamples(int samples)
Sets the number of samples to use for the multisample buffer. |
void |
setSFX(boolean sfxEnabled)
Sets the enabled status of sound effects. |
void |
setStencilBits(int stencilBits)
Sets the stencil bits for use with the renderer. |
void |
setVerticalSync(boolean vsync)
Sets the state of vertical synchronization. |
void |
setWidth(int width)
Sets the width for the screen. |
Field Detail |
---|
static final int DEFAULT_WIDTH
static final int DEFAULT_HEIGHT
static final int DEFAULT_DEPTH
static final int DEFAULT_FREQUENCY
static final boolean DEFAULT_FULLSCREEN
static final java.lang.String DEFAULT_RENDERER
static final boolean DEFAULT_VERTICAL_SYNC
static final int DEFAULT_DEPTH_BITS
static final int DEFAULT_ALPHA_BITS
static final int DEFAULT_STENCIL_BITS
static final int DEFAULT_SAMPLES
static final boolean DEFAULT_MUSIC
static final boolean DEFAULT_SFX
static final int DEFAULT_FRAMERATE
Method Detail |
---|
java.lang.String getDefaultSettingsWidgetImage()
java.lang.String getRenderer()
void setRenderer(java.lang.String renderer)
renderer
- int getWidth()
void setWidth(int width)
width
- int getHeight()
void setHeight(int height)
height
- int getDepth()
void setDepth(int depth)
depth
- int getFrequency()
void setFrequency(int frequency)
frequency
- boolean isVerticalSync()
void setVerticalSync(boolean vsync)
vsync
- boolean isFullscreen()
void setFullscreen(boolean fullscreen)
fullscreen
- int getDepthBits()
void setDepthBits(int depthBits)
depthBits
- int getAlphaBits()
void setAlphaBits(int alphaBits)
alphaBits
- int getStencilBits()
void setStencilBits(int stencilBits)
stencilBits
- int getSamples()
void setSamples(int samples)
samples
- boolean isMusic()
void setMusic(boolean musicEnabled)
musicEnabled
- boolean isSFX()
void setSFX(boolean sfxEnabled)
sfxEnabled
- int getFramerate()
void setFramerate(int framerate)
framerate
- void clear() throws java.io.IOException
java.io.IOException
- If there is some consistency or access problem
obtaining the values to be cleared.save()
void set(java.lang.String name, java.lang.String value)
void setBoolean(java.lang.String name, boolean value)
void setInt(java.lang.String name, int value)
void setLong(java.lang.String name, long value)
void setFloat(java.lang.String name, float value)
void setDouble(java.lang.String name, double value)
void setByteArray(java.lang.String name, byte[] bytes)
void setObject(java.lang.String name, java.lang.Object obj)
java.lang.String get(java.lang.String name, java.lang.String defaultValue)
boolean getBoolean(java.lang.String name, boolean defaultValue)
int getInt(java.lang.String name, int defaultValue)
long getLong(java.lang.String name, long defaultValue)
float getFloat(java.lang.String name, float defaultValue)
double getDouble(java.lang.String name, double defaultValue)
byte[] getByteArray(java.lang.String name, byte[] bytes)
java.lang.Object getObject(java.lang.String name, java.lang.Object obj)
boolean isNew()
void save() throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |