com.jme3.system
クラス AppSettings

java.lang.Object
  上位を拡張 java.util.AbstractMap<K,V>
      上位を拡張 java.util.HashMap<java.lang.String,java.lang.Object>
          上位を拡張 com.jme3.system.AppSettings
すべての実装されたインタフェース:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,java.lang.Object>

public final class AppSettings
extends java.util.HashMap<java.lang.String,java.lang.Object>

AppSettings provides a store of configuration to be used by the application.

By default only the context uses the configuration, however the user may set and retrieve the settings as well.

関連項目:
直列化された形式

入れ子のクラスの概要
 
クラス java.util.AbstractMap から継承された入れ子のクラス/インタフェース
java.util.AbstractMap.SimpleEntry<K,V>, java.util.AbstractMap.SimpleImmutableEntry<K,V>
 
フィールドの概要
static java.lang.String JOGL
          推奨されていません。 Use the LWJGL renderer instead.
static java.lang.String LWJGL_OPENAL
          Use the LWJGL OpenAL based renderer for audio capabilities.
static java.lang.String LWJGL_OPENGL_ANY
          Use LWJGL as the display system and allow the context to choose an appropriate renderer based on system capabilities.
static java.lang.String LWJGL_OPENGL1
          Use LWJGL as the display system and force using the OpenGL1.1 renderer.
static java.lang.String LWJGL_OPENGL2
          Use LWJGL as the display system and force using the OpenGL2.0 renderer.
static java.lang.String LWJGL_OPENGL3
          Use LWJGL as the display system and force using the core OpenGL3.3 renderer.
static java.lang.String NULL
          推奨されていません。 Specify the "null" value instead
 
コンストラクタの概要
AppSettings(boolean loadDefaults)
          Create a new instance of AppSettings.
 
メソッドの概要
 void copyFrom(AppSettings other)
          Copies all settings from other to this AppSettings.
 java.lang.String getAudioRenderer()
          Get the audio renderer
 int getBitsPerPixel()
          Get the bits per pixel
 boolean getBoolean(java.lang.String key)
          Get a boolean from the settings.
 int getDepthBits()
          Get the number of depth bits
 int getFrameRate()
          Get the framerate.
 int getFrequency()
          Get the frequency
 int getHeight()
          Get the height
 java.lang.Object[] getIcons()
          Get the icon array
 int getInteger(java.lang.String key)
          Get an integer from the settings.
 java.lang.String getRenderer()
          Get the renderer
 int getSamples()
          Get the number of samples
 java.lang.String getSettingsDialogImage()
          Get the settings dialog image
 int getStencilBits()
          Get the number of stencil bits
 java.lang.String getString(java.lang.String key)
          Get a string from the settings.
 java.lang.String getTitle()
          Get the application title
 int getWidth()
          Get the width
 boolean isFullscreen()
          Get the fullscreen state
 boolean isVSync()
          Get the vsync state
 void load(java.io.InputStream in)
          Loads the settings from the given properties input stream.
 void load(java.lang.String preferencesKey)
          Loads settings previously saved in the Java preferences.
 void mergeFrom(AppSettings other)
          Same as copyFrom(com.jme3.system.AppSettings), except doesn't overwrite settings that are already set.
 void putBoolean(java.lang.String key, boolean value)
          Set a boolean on the settings.
 void putInteger(java.lang.String key, int value)
          Set an integer on the settings.
 void putString(java.lang.String key, java.lang.String value)
          Set a string on the settings.
 void save(java.io.OutputStream out)
          Saves all settings to the given properties output stream.
 void save(java.lang.String preferencesKey)
          Saves settings into the Java preferences.
 void setAudioRenderer(java.lang.String audioRenderer)
          Set the audio renderer to use.
 void setBitsPerPixel(int value)
          Set the bits per pixel for the display.
 void setCustomRenderer(java.lang.Class clazz)
          Set a custom graphics renderer to use.
 void setDepthBits(int value)
          Sets the number of depth bits to use.
 void setFrameRate(int frameRate)
           
 void setFrequency(int value)
          Set the frequency, also known as refresh rate, for the rendering display.
 void setFullscreen(boolean value)
           
 void setHeight(int value)
           
 void setIcons(java.lang.Object[] value)
          Sets the application icons to be used, with the most preferred first.
 void setRenderer(java.lang.String renderer)
          Set the graphics renderer to use, one of:
AppSettings.LWJGL_OPENGL1 - Force OpenGL1.1 compatability AppSettings.LWJGL_OPENGL2 - Force OpenGL2 compatability AppSettings.LWJGL_OPENGL3 - Force OpenGL3.3 compatability AppSettings.LWJGL_OPENGL_ANY - Choose an appropriate OpenGL version based on system capabilities null - Disable graphics rendering
 void setResolution(int width, int height)
          Set the resolution for the rendering display
 void setSamples(int value)
          Set the number of samples per pixel.
 void setSettingsDialogImage(java.lang.String path)
          Sets the path of the settings dialog image to use.
 void setStencilBits(int value)
          Set the number of stencil bits.
 void setStereo3D(boolean value)
          Enable 3D stereo.
 void setTitle(java.lang.String title)
           
 void setUseInput(boolean use)
           
 void setUseJoysticks(boolean use)
           
 void setVSync(boolean value)
          Set to true to enable vertical-synchronization, limiting and synchronizing every frame rendered to the monitor's refresh rate.
 void setWidth(int value)
           
 boolean useInput()
          Get the use input state.
 boolean useJoysticks()
          Get the use joysticks state
 boolean useStereo3D()
          Get the stereo 3D state
 
クラス java.util.HashMap から継承されたメソッド
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
クラス java.util.AbstractMap から継承されたメソッド
equals, hashCode, toString
 
クラス java.lang.Object から継承されたメソッド
getClass, notify, notifyAll, wait, wait, wait
 
インタフェース java.util.Map から継承されたメソッド
equals, hashCode
 

フィールドの詳細

LWJGL_OPENGL1

public static final java.lang.String LWJGL_OPENGL1
Use LWJGL as the display system and force using the OpenGL1.1 renderer.

関連項目:
setRenderer(java.lang.String), 定数フィールド値

LWJGL_OPENGL2

public static final java.lang.String LWJGL_OPENGL2
Use LWJGL as the display system and force using the OpenGL2.0 renderer.

If the underlying system does not support OpenGL2.0, then the context initialization will throw an exception.

関連項目:
setRenderer(java.lang.String), 定数フィールド値

LWJGL_OPENGL3

public static final java.lang.String LWJGL_OPENGL3
Use LWJGL as the display system and force using the core OpenGL3.3 renderer.

If the underlying system does not support OpenGL3.3, then the context initialization will throw an exception. Note that currently jMonkeyEngine does not have any shaders that support OpenGL3.3 therefore this option is not useful.

関連項目:
setRenderer(java.lang.String), 定数フィールド値

LWJGL_OPENGL_ANY

public static final java.lang.String LWJGL_OPENGL_ANY
Use LWJGL as the display system and allow the context to choose an appropriate renderer based on system capabilities.

If the GPU supports OpenGL2 or later, then the OpenGL2.0 renderer will be used, otherwise, the OpenGL1.1 renderer is used.

関連項目:
setRenderer(java.lang.String), 定数フィールド値

JOGL

@Deprecated
public static final java.lang.String JOGL
推奨されていません。 Use the LWJGL renderer instead.
The JOGL renderer is no longer supported by jME.

関連項目:
setRenderer(java.lang.String), 定数フィールド値

NULL

@Deprecated
public static final java.lang.String NULL
推奨されていません。 Specify the "null" value instead
The "NULL" option is no longer supported

関連項目:
setRenderer(java.lang.String), setAudioRenderer(java.lang.String), 定数フィールド値

LWJGL_OPENAL

public static final java.lang.String LWJGL_OPENAL
Use the LWJGL OpenAL based renderer for audio capabilities.

関連項目:
setAudioRenderer(java.lang.String), 定数フィールド値
コンストラクタの詳細

AppSettings

public AppSettings(boolean loadDefaults)
Create a new instance of AppSettings.

If loadDefaults is true, then the default settings will be set on the AppSettings. Use false if you want to change some settings but you would like the application to load settings from previous launches.

パラメータ:
loadDefaults - If default settings are to be loaded.
メソッドの詳細

copyFrom

public void copyFrom(AppSettings other)
Copies all settings from other to this AppSettings.

Any settings that are specified in other will overwrite settings set on this AppSettings.

パラメータ:
other - The AppSettings to copy the settings from

mergeFrom

public void mergeFrom(AppSettings other)
Same as copyFrom(com.jme3.system.AppSettings), except doesn't overwrite settings that are already set.

パラメータ:
other - The AppSettings to merge the settings from

load

public void load(java.io.InputStream in)
          throws java.io.IOException
Loads the settings from the given properties input stream.

パラメータ:
in - The InputStream to load from
例外:
java.io.IOException - If an IOException occurs
関連項目:
save(java.io.OutputStream)

save

public void save(java.io.OutputStream out)
          throws java.io.IOException
Saves all settings to the given properties output stream.

パラメータ:
out - The OutputStream to write to
例外:
java.io.IOException - If an IOException occurs
関連項目:
load(java.io.InputStream)

load

public void load(java.lang.String preferencesKey)
          throws java.util.prefs.BackingStoreException
Loads settings previously saved in the Java preferences.

パラメータ:
preferencesKey - The preferencesKey previously used to save the settings.
例外:
java.util.prefs.BackingStoreException - If an exception occurs with the preferences
関連項目:
save(java.lang.String)

save

public void save(java.lang.String preferencesKey)
          throws java.util.prefs.BackingStoreException
Saves settings into the Java preferences.

On the Windows operating system, the preferences are saved in the registry at the following key:
HKEY_CURRENT_USER\Software\JavaSoft\Prefs\[preferencesKey]

パラメータ:
preferencesKey - The preferences key to save at. Generally the application's unique name.
例外:
java.util.prefs.BackingStoreException - If an exception occurs with the preferences

getInteger

public int getInteger(java.lang.String key)
Get an integer from the settings.

If the key is not set, then 0 is returned.


getBoolean

public boolean getBoolean(java.lang.String key)
Get a boolean from the settings.

If the key is not set, then false is returned.


getString

public java.lang.String getString(java.lang.String key)
Get a string from the settings.

If the key is not set, then null is returned.


putInteger

public void putInteger(java.lang.String key,
                       int value)
Set an integer on the settings.


putBoolean

public void putBoolean(java.lang.String key,
                       boolean value)
Set a boolean on the settings.


putString

public void putString(java.lang.String key,
                      java.lang.String value)
Set a string on the settings.


setFrameRate

public void setFrameRate(int frameRate)
パラメータ:
frameRate - The frame-rate is the upper limit on how high the application's frames-per-second can go. (Default: -1 no frame rate limit imposed)

setUseInput

public void setUseInput(boolean use)
パラメータ:
use - If true, the application will initialize and use input. Set to false for headless applications that do not require keyboard or mouse input. (Default: true)

setUseJoysticks

public void setUseJoysticks(boolean use)
パラメータ:
use - If true, the application will initialize and use joystick input. Set to false if no joystick input is desired. (Default: false)

setRenderer

public void setRenderer(java.lang.String renderer)
Set the graphics renderer to use, one of:

パラメータ:
renderer - The renderer to set (Default: AppSettings.LWJGL_OPENGL2)

setCustomRenderer

public void setCustomRenderer(java.lang.Class clazz)
Set a custom graphics renderer to use. The class should implement the Renderer interface.

パラメータ:
clazz - The custom graphics renderer class. (Default: not set)

setAudioRenderer

public void setAudioRenderer(java.lang.String audioRenderer)
Set the audio renderer to use. One of:

パラメータ:
audioRenderer - (Default: LWJGL)

setWidth

public void setWidth(int value)
パラメータ:
value - the width for the rendering display. (Default: 640)

setHeight

public void setHeight(int value)
パラメータ:
value - the height for the rendering display. (Default: 480)

setResolution

public void setResolution(int width,
                          int height)
Set the resolution for the rendering display

パラメータ:
width - The width
height - The height (Default: 640x480)

setFrequency

public void setFrequency(int value)
Set the frequency, also known as refresh rate, for the rendering display.

パラメータ:
value - The frequency (Default: 60)

setDepthBits

public void setDepthBits(int value)
Sets the number of depth bits to use.

The number of depth bits specifies the precision of the depth buffer. To increase precision, specify 32 bits. To decrease precision, specify 16 bits. On some platforms 24 bits might not be supported, in that case, specify 16 bits.

(Default: 24)

パラメータ:
value - The depth bits

setStencilBits

public void setStencilBits(int value)
Set the number of stencil bits.

This value is only relevant when the stencil buffer is being used. Specify 8 to indicate an 8-bit stencil buffer, specify 0 to disable the stencil buffer.

(Default: 0)

パラメータ:
value - Number of stencil bits

setBitsPerPixel

public void setBitsPerPixel(int value)
Set the bits per pixel for the display. Appropriate values are 16 for RGB565 color format, or 24 for RGB8 color format.

パラメータ:
value - The bits per pixel to set (Default: 24)

setSamples

public void setSamples(int value)
Set the number of samples per pixel. A value of 1 indicates each pixel should be single-sampled, higher values indicate a pixel should be multi-sampled.

パラメータ:
value - The number of samples (Default: 1)

setTitle

public void setTitle(java.lang.String title)
パラメータ:
title - The title of the rendering display (Default: jMonkeyEngine 3.0)

setFullscreen

public void setFullscreen(boolean value)
パラメータ:
value - true to enable full-screen rendering, false to render in a window (Default: false)

setVSync

public void setVSync(boolean value)
Set to true to enable vertical-synchronization, limiting and synchronizing every frame rendered to the monitor's refresh rate.

パラメータ:
value - (Default: false)

setStereo3D

public void setStereo3D(boolean value)
Enable 3D stereo.

This feature requires hardware support from the GPU driver. See: http://en.wikipedia.org/wiki/Quad_buffering
Once enabled, filters or scene processors that handle 3D stereo rendering could use this feature to render using hardware 3D stereo.

(Default: false)


setIcons

public void setIcons(java.lang.Object[] value)
Sets the application icons to be used, with the most preferred first. For Windows you should supply at least one 16x16 icon and one 32x32. The former is used for the title/task bar, the latter for the alt-tab icon. Linux (and similar platforms) expect one 32x32 icon. Mac OS X should be supplied one 128x128 icon.
The icon is used for the settings window, and the LWJGL render window. Not currently supported for JOGL. Note that a bug in Java 6 (bug ID 6445278, currently hidden but available in Google cache) currently prevents the icon working for alt-tab on the settings dialog in Windows.

パラメータ:
value - An array of BufferedImages to use as icons. (Default: not set)

setSettingsDialogImage

public void setSettingsDialogImage(java.lang.String path)
Sets the path of the settings dialog image to use.

The image will be displayed in the settings dialog when the application is started.

(Default: /com/jme3/app/Monkey.png)

パラメータ:
path - The path to the image in the classpath.

getFrameRate

public int getFrameRate()
Get the framerate.

関連項目:
setFrameRate(int)

useInput

public boolean useInput()
Get the use input state.

関連項目:
setUseInput(boolean)

getRenderer

public java.lang.String getRenderer()
Get the renderer

関連項目:
setRenderer(java.lang.String)

getWidth

public int getWidth()
Get the width

関連項目:
setWidth(int)

getHeight

public int getHeight()
Get the height

関連項目:
setHeight(int)

getBitsPerPixel

public int getBitsPerPixel()
Get the bits per pixel

関連項目:
setBitsPerPixel(int)

getFrequency

public int getFrequency()
Get the frequency

関連項目:
setFrequency(int)

getDepthBits

public int getDepthBits()
Get the number of depth bits

関連項目:
setDepthBits(int)

getStencilBits

public int getStencilBits()
Get the number of stencil bits

関連項目:
setStencilBits(int)

getSamples

public int getSamples()
Get the number of samples

関連項目:
setSamples(int)

getTitle

public java.lang.String getTitle()
Get the application title

関連項目:
setTitle(java.lang.String)

isVSync

public boolean isVSync()
Get the vsync state

関連項目:
setVSync(boolean)

isFullscreen

public boolean isFullscreen()
Get the fullscreen state

関連項目:
setFullscreen(boolean)

useJoysticks

public boolean useJoysticks()
Get the use joysticks state

関連項目:
setUseJoysticks(boolean)

getAudioRenderer

public java.lang.String getAudioRenderer()
Get the audio renderer

関連項目:
setAudioRenderer(java.lang.String)

useStereo3D

public boolean useStereo3D()
Get the stereo 3D state

関連項目:
setStereo3D(boolean)

getIcons

public java.lang.Object[] getIcons()
Get the icon array

関連項目:
setIcons(java.lang.Object[])

getSettingsDialogImage

public java.lang.String getSettingsDialogImage()
Get the settings dialog image

関連項目:
setSettingsDialogImage(java.lang.String)