com.jme3.system.AppSettings.getInteger()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.3k)|赞(0)|评价(0)|浏览(93)

本文整理了Java中com.jme3.system.AppSettings.getInteger()方法的一些代码示例,展示了AppSettings.getInteger()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AppSettings.getInteger()方法的具体详情如下:
包路径:com.jme3.system.AppSettings
类名称:AppSettings
方法名:getInteger

AppSettings.getInteger介绍

[英]Get an integer from the settings.

If the key is not set, then 0 is returned.
[中]从设置中获取一个整数。
如果未设置密钥,则返回0。

代码示例

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the bits per pixel
 * @see #setBitsPerPixel(int)
 */
public int getBitsPerPixel() {
  return getInteger("BitsPerPixel");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the frequency
 * @see #setFrequency(int)
 */
public int getFrequency() {
  return getInteger("Frequency");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the number of samples
 * @see #setSamples(int)
 */
public int getSamples() {
  return getInteger("Samples");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the width
 * @see #setWidth(int)
 */
public int getWidth() {
  return getInteger("Width");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the width
 * @see #setWidth(int)
 */
public int getMinWidth() {
  return getInteger("MinWidth");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the height
 * @see #setHeight(int)
 */
public int getMinHeight() {
  return getInteger("MinHeight");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the height
 * @see #setHeight(int)
 */
public int getHeight() {
  return getInteger("Height");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Android Only
 * Get the number of alpha bits for the surface view to use.
 * @see #setAlphaBits(int)
 */
public int getAlphaBits() {
  return getInteger("AlphaBits");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the number of stencil bits
 * @see #setStencilBits(int)
 */
public int getStencilBits() {
  return getInteger("StencilBits");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the framerate.
 * @see #setFrameRate(int)
 */
public int getFrameRate() {
  return getInteger("FrameRate");
}

代码示例来源:origin: jMonkeyEngine/jmonkeyengine

/**
 * Get the number of depth bits
 * @see #setDepthBits(int)
 */
public int getDepthBits() {
  return getInteger("DepthBits");
}

代码示例来源: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

vrBinding = settings.getInteger(VRConstants.SETTING_VRAPI);

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * Get the framerate.
 * @see #setFrameRate(int)
 */
public int getFrameRate() {
  return getInteger("FrameRate");
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * Get the number of depth bits
 * @see #setDepthBits(int)
 */
public int getDepthBits() {
  return getInteger("DepthBits");
}

代码示例来源:origin: info.projectkyoto/mms-engine

/**
 * Get the bits per pixel
 * @see #setBitsPerPixel(int) 
 */
public int getBitsPerPixel() {
  return getInteger("BitsPerPixel");
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * Get the height
 * @see #setHeight(int)
 */
public int getHeight() {
  return getInteger("Height");
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * Android Only
 * Get the number of alpha bits for the surface view to use.
 * @see #setAlphaBits(int)
 */
public int getAlphaBits() {
  return getInteger("AlphaBits");
}

代码示例来源:origin: org.jmonkeyengine/jme3-core

/**
 * Get the number of samples
 * @see #setSamples(int)
 */
public int getSamples() {
  return getInteger("Samples");
}

相关文章

AppSettings类方法