/** * Set the audio renderer to use. One of:<br> * <ul> * <li>AppSettings.LWJGL_OPENAL - Default for LWJGL</li> * <li>null - Disable audio</li> * </ul> * @param audioRenderer * (Default: LWJGL) */ public void setAudioRenderer(String audioRenderer) { putString("AudioRenderer", audioRenderer); }
/** * @param title The title of the rendering display * (Default: jMonkeyEngine 3.0) */ public void setTitle(String title) { putString("Title", title); }
/** * Sets the path of the settings dialog image to use. * <p> * The image will be displayed in the settings dialog when the * application is started. * </p> * (Default: /com/jme3/app/Monkey.png) * * @param path The path to the image in the classpath. */ public void setSettingsDialogImage(String path) { putString("SettingsDialogImage", path); }
/** * Set the graphics renderer to use, one of:<br> * <ul> * <li>AppSettings.LWJGL_OPENGL1 - Force OpenGL1.1 compatability</li> * <li>AppSettings.LWJGL_OPENGL2 - Force OpenGL2 compatability</li> * <li>AppSettings.LWJGL_OPENGL3 - Force OpenGL3.3 compatability</li> * <li>AppSettings.LWJGL_OPENGL_ANY - Choose an appropriate * OpenGL version based on system capabilities</li> * <li>null - Disable graphics rendering</li> * </ul> * @param renderer The renderer to set * (Default: AppSettings.LWJGL_OPENGL2) */ public void setRenderer(String renderer) { putString("Renderer", renderer); }
/** * Sets a custom platform chooser. This chooser specifies which platform and * which devices are used for the OpenCL context. * * Default: an implementation defined one. * * @param chooser the class of the chooser, must have a default constructor */ public void setOpenCLPlatformChooser(Class<? extends PlatformChooser> chooser) { putString("OpenCLPlatformChooser", chooser.getName()); }
putInteger(key, iVal); } else if (key.endsWith("(string)")) { putString(key.substring(0, key.length() - 8), val); } else if (key.endsWith("(bool)")) { boolean bVal = Boolean.parseBoolean(val);
settings.putString("AssetConfigURL", assetCfg.toString());
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 file settings
/** * 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); }
/** * Set the audio renderer to use. One of:<br> * <ul> * <li>AppSettings.LWJGL_OPENAL - Default for LWJGL</li> * <li>null - Disable audio</li> * </ul> * @param audioRenderer * (Default: LWJGL) */ public void setAudioRenderer(String audioRenderer) { putString("AudioRenderer", audioRenderer); }
/** * Sets the path of the settings dialog image to use. * <p> * The image will be displayed in the settings dialog when the * application is started. * </p> * (Default: /com/jme3/app/Monkey.png) * * @param path The path to the image in the classpath. */ public void setSettingsDialogImage(String path) { putString("SettingsDialogImage", path); }
/** * @param title The title of the rendering display * (Default: jMonkeyEngine 3.0) */ public void setTitle(String title) { putString("Title", title); }
/** * @param title The title of the rendering display * (Default: jMonkeyEngine 3.0) */ public void setTitle(String title) { putString("Title", title); }
/** * Set the audio renderer to use. One of:<br> * <ul> * <li>AppSettings.LWJGL_OPENAL - Default for LWJGL</li> * <li>null - Disable audio</li> * </ul> * @param audioRenderer * (Default: LWJGL) */ public void setAudioRenderer(String audioRenderer) { putString("AudioRenderer", audioRenderer); }
/** * Sets the path of the settings dialog image to use. * <p> * The image will be displayed in the settings dialog when the * application is started. * </p> * (Default: /com/jme3/app/Monkey.png) * * @param path The path to the image in the classpath. */ public void setSettingsDialogImage(String path) { putString("SettingsDialogImage", path); }
/** * Set the graphics renderer to use, one of:<br> * <ul> * <li>AppSettings.LWJGL_OPENGL1 - Force OpenGL1.1 compatability</li> * <li>AppSettings.LWJGL_OPENGL2 - Force OpenGL2 compatability</li> * <li>AppSettings.LWJGL_OPENGL3 - Force OpenGL3.3 compatability</li> * <li>AppSettings.LWJGL_OPENGL_ANY - Choose an appropriate * OpenGL version based on system capabilities</li> * <li>null - Disable graphics rendering</li> * </ul> * @param renderer The renderer to set * (Default: AppSettings.LWJGL_OPENGL2) */ public void setRenderer(String renderer) { putString("Renderer", renderer); }
/** * Set the graphics renderer to use, one of:<br> * <ul> * <li>AppSettings.LWJGL_OPENGL1 - Force OpenGL1.1 compatability</li> * <li>AppSettings.LWJGL_OPENGL2 - Force OpenGL2 compatability</li> * <li>AppSettings.LWJGL_OPENGL3 - Force OpenGL3.3 compatability</li> * <li>AppSettings.LWJGL_OPENGL_ANY - Choose an appropriate * OpenGL version based on system capabilities</li> * <li>null - Disable graphics rendering</li> * </ul> * @param renderer The renderer to set * (Default: AppSettings.LWJGL_OPENGL2) */ public void setRenderer(String renderer) { putString("Renderer", renderer); }
/** * Sets a custom platform chooser. This chooser specifies which platform and * which devices are used for the OpenCL context. * * Default: an implementation defined one. * * @param chooser the class of the chooser, must have a default constructor */ public void setOpenCLPlatformChooser(Class<? extends PlatformChooser> chooser) { putString("OpenCLPlatformChooser", chooser.getName()); }
/** * Set the folder of the dk2 installation in the settings * * @param dkIIFolder */ public static void setDKIIFolder(String dkIIFolder) { SettingUtils.getInstance().getSettings().putString(DKII_FOLDER_KEY, dkIIFolder); }
putInteger(key, iVal); } else if (key.endsWith("(string)")) { putString(key.substring(0, key.length() - 8), val); } else if (key.endsWith("(bool)")) { boolean bVal = Boolean.parseBoolean(val);