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; |
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. |
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 |
} |
} |