本文整理了Java中com.jme3.system.AppSettings.get()
方法的一些代码示例,展示了AppSettings.get()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.get()
方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:get
[英]Android Only Get the number of alpha bits for the surface view to use.
[中]Android只获取曲面视图要使用的alpha位数。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get a string from the settings.
* <p>
* If the key is not set, then null is returned.
*/
public String getString(String key) {
String s = (String) get(key);
if (s == null) {
return null;
}
return s;
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Process the attached settings and apply changes to this app state.
* @param settings the app settings to process.
*/
protected void processSettings(AppSettings settings){
if (settings != null){
if (settings.get(VRConstants.SETTING_DISABLE_VR) != null){
DISABLE_VR = settings.getBoolean(VRConstants.SETTING_DISABLE_VR);
}
}
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
if (settings.get(VRConstants.SETTING_USE_COMPOSITOR) != null){
useCompositor = settings.getBoolean(VRConstants.SETTING_USE_COMPOSITOR);
if( useCompositor == false ){
if (settings.get(VRConstants.SETTING_ENABLE_MIRROR_WINDOW) != null){
if( useCompositor == false ) {
disableSwapBuffers = false;
if (settings.get(VRConstants.SETTING_GUI_OVERDRAW) != null){
getVRGUIManager().setGuiOverdraw(settings.getBoolean(VRConstants.SETTING_GUI_OVERDRAW));
if (settings.get(VRConstants.SETTING_GUI_CURVED_SURFACE) != null){
getVRGUIManager().setCurvedSurface(settings.getBoolean(VRConstants.SETTING_GUI_CURVED_SURFACE));
if (settings.get(VRConstants.SETTING_NO_GUI) != null){
nogui = settings.getBoolean(VRConstants.SETTING_NO_GUI);
if (settings.get(VRConstants.SETTING_VRAPI) != null){
vrBinding = settings.getInteger(VRConstants.SETTING_VRAPI);
if (settings.get(VRConstants.SETTING_SEATED_EXPERIENCE) != null){
seated = settings.getBoolean(VRConstants.SETTING_SEATED_EXPERIENCE);
if (settings.get(VRConstants.SETTING_INSTANCE_RENDERING) != null){
instanceRendering = settings.getBoolean(VRConstants.SETTING_INSTANCE_RENDERING);
if (settings.get(VRConstants.SETTING_DEFAULT_FOV) != null){
defaultFOV = settings.getFloat(VRConstants.SETTING_DEFAULT_FOV);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
assertEqual(loadedSettings.getInteger("TestInt"), 123);
assertEqual(loadedSettings.getString("TestStr"), "HelloWorld");
assertEqual(loadedSettings.get("TestFloat"), 123.567f);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Tests preference based AppSettings.
*/
private static void testPreferenceSettings() {
AppSettings settings = new AppSettings(false);
settings.putBoolean("TestBool", true);
settings.putInteger("TestInt", 123);
settings.putString("TestStr", "HelloWorld");
settings.putFloat("TestFloat", 123.567f);
settings.put("TestObj", new Mesh()); // Objects not supported by preferences
try {
settings.save(APPSETTINGS_KEY);
} catch (BackingStoreException ex) {
ex.printStackTrace();
}
AppSettings loadedSettings = new AppSettings(false);
try {
loadedSettings.load(APPSETTINGS_KEY);
} catch (BackingStoreException ex) {
ex.printStackTrace();
}
assertEqual(loadedSettings.getBoolean("TestBool"), true);
assertEqual(loadedSettings.getInteger("TestInt"), 123);
assertEqual(loadedSettings.getString("TestStr"), "HelloWorld");
assertEqual(loadedSettings.get("TestFloat"), 123.567f);
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get the icon array
* @see #setIcons(java.lang.Object[])
*/
public Object[] getIcons() {
return (Object[]) get("Icons");
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get an integer from the settings.
* <p>
* If the key is not set, then 0 is returned.
*/
public int getInteger(String key) {
Integer i = (Integer) get(key);
if (i == null) {
return 0;
}
return i.intValue();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get a float from the settings.
* <p>
* If the key is not set, then 0.0 is returned.
*/
public float getFloat(String key) {
Float f = (Float) get(key);
if (f == null) {
return 0f;
}
return f.floatValue();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get a boolean from the settings.
* <p>
* If the key is not set, then false is returned.
*/
public boolean getBoolean(String key) {
Boolean b = (Boolean) get(key);
if (b == null) {
return false;
}
return b.booleanValue();
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Same as {@link #copyFrom(com.jme3.system.AppSettings) }, except
* doesn't overwrite settings that are already set.
*
* @param other The AppSettings to merge the settings from
*/
public void mergeFrom(AppSettings other) {
for (String key : other.keySet()) {
if( !this.containsKey(key) ) {
put(key, other.get(key));
}
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
Object val = get(key);
if (val instanceof Integer) {
prefs.putInt("I_" + key, (Integer) val);
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
Object defaultValue = defaults.get(key);
if (defaultValue instanceof Integer) {
put(key, prefs.getInt(key, (Integer) defaultValue));
代码示例来源:origin: tonihele/OpenKeeper
private Object getSetting(String key, Object defaultValue) {
Object value = settings.get(key);
if (value == null) {
value = defaultValue;
}
return value;
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Get a string from the settings.
* <p>
* If the key is not set, then null is returned.
*/
public String getString(String key) {
String s = (String) get(key);
if (s == null) {
return null;
}
return s;
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get a string from the settings.
* <p>
* If the key is not set, then null is returned.
*/
public String getString(String key) {
String s = (String) get(key);
if (s == null) {
return null;
}
return s;
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get the icon array
* @see #setIcons(java.lang.Object[])
*/
public Object[] getIcons() {
return (Object[]) get("Icons");
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get an integer from the settings.
* <p>
* If the key is not set, then 0 is returned.
*/
public int getInteger(String key) {
Integer i = (Integer) get(key);
if (i == null) {
return 0;
}
return i.intValue();
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get a float from the settings.
* <p>
* If the key is not set, then 0.0 is returned.
*/
public float getFloat(String key) {
Float f = (Float) get(key);
if (f == null) {
return 0f;
}
return f.floatValue();
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get a boolean from the settings.
* <p>
* If the key is not set, then false is returned.
*/
public boolean getBoolean(String key) {
Boolean b = (Boolean) get(key);
if (b == null) {
return false;
}
return b.booleanValue();
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Same as {@link #copyFrom(com.jme3.system.AppSettings) }, except
* doesn't overwrite settings that are already set.
*
* @param other The AppSettings to merge the settings from
*/
public void mergeFrom(AppSettings other) {
for (String key : other.keySet()) {
if (get(key) == null) {
put(key, other.get(key));
}
}
}
内容来源于网络,如有侵权,请联系作者删除!