/[svn]/jsampler/trunk/src/org/jsampler/HF.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/HF.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2301 by iliev, Wed Nov 23 21:19:44 2011 UTC revision 2302 by iliev, Thu Dec 15 23:13:30 2011 UTC
# Line 25  package org.jsampler; Line 25  package org.jsampler;
25  import java.io.File;  import java.io.File;
26  import java.io.FileInputStream;  import java.io.FileInputStream;
27  import java.io.FileOutputStream;  import java.io.FileOutputStream;
28    import java.text.NumberFormat;
29  import java.util.logging.Level;  import java.util.logging.Level;
30    
31  import org.linuxsampler.lscp.LSException;  import org.linuxsampler.lscp.LSException;
# Line 39  import static org.jsampler.JSI18n.i18n; Line 39  import static org.jsampler.JSI18n.i18n;
39   * @author Grigor Iliev   * @author Grigor Iliev
40   */   */
41  public class HF {  public class HF {
42            private static NumberFormat numberFormat = NumberFormat.getInstance();
43            
44            static {
45                    numberFormat.setMaximumFractionDigits(1);
46            }
47                    
48          /**          /**
49           * Returns more meaningful, non-<code>null</code> message.           * Returns more meaningful, non-<code>null</code> message.
# Line 173  public class HF { Line 178  public class HF {
178                  if(f.canRead() && f.canWrite() && f.canExecute()) return true;                  if(f.canRead() && f.canWrite() && f.canExecute()) return true;
179                  return false;                  return false;
180          }          }
181                    
182            public static String
183            getVolumeString(int volume) {
184                    if(CC.getViewConfig().isMeasurementUnitDecibel()) {
185                            return numberFormat.format(HF.percentsToDecibels(volume)) + "dB";
186                    } else {
187                            return String.valueOf(volume) + "%";
188                    }
189            }
190  }  }

Legend:
Removed from v.2301  
changed lines
  Added in v.2302

  ViewVC Help
Powered by ViewVC