本文整理了Java中com.jme3.system.AppSettings.getString()
方法的一些代码示例,展示了AppSettings.getString()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.getString()
方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:getString
[英]Get a string from the settings.
If the key is not set, then null is returned.
[中]从设置中获取字符串。
如果未设置密钥,则返回null。
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get the renderer
* @see #setRenderer(java.lang.String)
*/
public String getRenderer() {
return getString("Renderer");
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
public String getOpenCLPlatformChooser() {
return getString("OpenCLPlatformChooser");
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get the application title
* @see #setTitle(java.lang.String)
*/
public String getTitle() {
return getString("Title");
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get the audio renderer
* @see #setAudioRenderer(java.lang.String)
*/
public String getAudioRenderer() {
return getString("AudioRenderer");
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
/**
* Get the settings dialog image
* @see #setSettingsDialogImage(java.lang.String)
*/
public String getSettingsDialogImage() {
return getString("SettingsDialogImage");
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void initAssetManager(){
URL assetCfgUrl = null;
if (settings != null){
String assetCfg = settings.getString("AssetConfigURL");
if (assetCfg != null){
try {
assetCfgUrl = new URL(assetCfg);
} catch (MalformedURLException ex) {
}
if (assetCfgUrl == null) {
assetCfgUrl = LegacyApplication.class.getClassLoader().getResource(assetCfg);
if (assetCfgUrl == null) {
logger.log(Level.SEVERE, "Unable to access AssetConfigURL in asset config:{0}", assetCfg);
return;
}
}
}
}
if (assetCfgUrl == null) {
assetCfgUrl = JmeSystem.getPlatformAssetConfigURL();
}
if (assetManager == null){
assetManager = JmeSystem.newAssetManager(assetCfgUrl);
logger.config("Created asset manager from "+assetCfgUrl);
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
private void initAssetManager(){
URL assetCfgUrl = null;
if (settings != null){
String assetCfg = settings.getString("AssetConfigURL");
if (assetCfg != null){
try {
assetCfgUrl = new URL(assetCfg);
} catch (MalformedURLException ex) {
}
if (assetCfgUrl == null) {
assetCfgUrl = LegacyApplication.class.getClassLoader().getResource(assetCfg);
if (assetCfgUrl == null) {
logger.log(Level.SEVERE, "Unable to access AssetConfigURL in asset config:{0}", assetCfg);
return;
}
}
}
}
if (assetCfgUrl == null) {
assetCfgUrl = JmeSystem.getPlatformAssetConfigURL();
}
if (assetManager == null){
assetManager = JmeSystem.newAssetManager(assetCfgUrl);
}
}
代码示例来源:origin: jMonkeyEngine/jmonkeyengine
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: org.jmonkeyengine/jme3-core
/**
* Get the audio renderer
* @see #setAudioRenderer(java.lang.String)
*/
public String getAudioRenderer() {
return getString("AudioRenderer");
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get the renderer
* @see #setRenderer(java.lang.String)
*/
public String getRenderer() {
return getString("Renderer");
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get the settings dialog image
* @see #setSettingsDialogImage(java.lang.String)
*/
public String getSettingsDialogImage() {
return getString("SettingsDialogImage");
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Get the renderer
* @see #setRenderer(java.lang.String)
*/
public String getRenderer() {
return getString("Renderer");
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Get the audio renderer
* @see #setAudioRenderer(java.lang.String)
*/
public String getAudioRenderer() {
return getString("AudioRenderer");
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
/**
* Get the application title
* @see #setTitle(java.lang.String)
*/
public String getTitle() {
return getString("Title");
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Get the application title
* @see #setTitle(java.lang.String)
*/
public String getTitle() {
return getString("Title");
}
代码示例来源:origin: info.projectkyoto/mms-engine
/**
* Get the settings dialog image
* @see #setSettingsDialogImage(java.lang.String)
*/
public String getSettingsDialogImage() {
return getString("SettingsDialogImage");
}
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
public String getOpenCLPlatformChooser() {
return getString("OpenCLPlatformChooser");
}
}
代码示例来源:origin: tonihele/OpenKeeper
/**
* Get the folder of the original Dungeon Keeper 2 installation
*
* @return Dungeon Keeper 2 folder
*/
public static String getDKIIFolder() {
return SettingUtils.getInstance().getSettings().getString(DKII_FOLDER_KEY);
}
代码示例来源:origin: org.jmonkeyengine/jme3-core
private void initAssetManager(){
URL assetCfgUrl = null;
if (settings != null){
String assetCfg = settings.getString("AssetConfigURL");
if (assetCfg != null){
try {
assetCfgUrl = new URL(assetCfg);
} catch (MalformedURLException ex) {
}
if (assetCfgUrl == null) {
assetCfgUrl = LegacyApplication.class.getClassLoader().getResource(assetCfg);
if (assetCfgUrl == null) {
logger.log(Level.SEVERE, "Unable to access AssetConfigURL in asset config:{0}", assetCfg);
return;
}
}
}
}
if (assetCfgUrl == null) {
assetCfgUrl = JmeSystem.getPlatformAssetConfigURL();
}
if (assetManager == null){
assetManager = JmeSystem.newAssetManager(assetCfgUrl);
}
}
内容来源于网络,如有侵权,请联系作者删除!