예제 #1
0
  private String getStringProperty(String prop) {
    String ret = m_CurState.getStringProperty(prop);

    if (ret == null) ret = (String) m_App.getProperty(prop);

    return ret;
  }
예제 #2
0
  private float getFloat(String prop, float df) throws Exception {
    String vol = getStringProperty(prop);

    if (vol == null) return df;

    vol = m_CurState.translate(vol);
    if (vol != null) {
      try {
        df = Float.parseFloat(vol);
      } catch (Exception ex) {
        throw new Exception("Invalid Decimal provided!" + "Must be a decimal 0.0 to 1.0.");
      }
    }

    return df;
  }
예제 #3
0
 private String getString(String prop, String df) throws Exception {
   String vol = getStringProperty(prop);
   if (vol == null) vol = df;
   vol = m_CurState.translate(vol);
   return vol;
 }
예제 #4
0
 public void setActualAudioProperty(String property) throws Exception {
   float vol = m_AudioPlayer.getNormalizedVolume(getBiasVolume() + getAudioVolume());
   System.err.println("Setting volume");
   m_CurState.setProperty(property, String.valueOf(vol));
 }
예제 #5
0
 private String getAudioPath() throws Exception {
   return m_CurState.translate(getString("AudioPath", "$Pair1B"));
 }