|
JSampler v0.8a |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jsampler.HF
public class HF
This class contains some helper function.
| Constructor Summary | |
|---|---|
HF()
|
|
| Method Summary | |
|---|---|
static boolean |
createBackup(java.lang.String file,
java.lang.String bkpFile)
Create a backup copy of the specified file, located in the JSampler's home directory. |
static float |
decibelsToFactor(double vol)
Converts the volume value specified in decibels to volume factor. |
static int |
decibelsToPercents(double vol)
Converts the volume value specified in decibels to percents. |
static void |
deleteFile(java.lang.String file)
Deletes the specified file, if exists and is located in the JSampler's home directory. |
static java.lang.String |
getErrorMessage(java.lang.Exception e)
Returns more meaningful, non- null message. |
static double |
percentsToDecibels(int vol)
Converts the volume value specified in percents to decibels. |
static float |
percentsToFactor(int vol)
Converts the volume value specified in percents to volume factor. |
static void |
setUIDefaultFont(java.lang.String fontName)
Sets the default font to be used in the GUI. |
static void |
showErrorMessage(java.lang.Exception e)
Shows a dialog with error message obtained by getErrorMessage(java.lang.Exception) method. |
static void |
showErrorMessage(java.lang.Exception e,
java.awt.Dialog dlg)
Shows a dialog with error message obtained by getErrorMessage(java.lang.Exception) method. |
static void |
showErrorMessage(java.lang.Exception e,
java.awt.Frame frame)
Shows a dialog with error message obtained by getErrorMessage(java.lang.Exception) method. |
static void |
showErrorMessage(java.lang.Exception e,
java.awt.Frame frame,
java.lang.String prefix)
Shows a dialog with error message obtained by getErrorMessage(java.lang.Exception) method. |
static void |
showErrorMessage(java.lang.Exception e,
java.lang.String prefix)
Shows a dialog with error message obtained by getErrorMessage(java.lang.Exception) method. |
static void |
showErrorMessage(java.lang.String msg)
Shows a dialog with the specified error message. |
static void |
showErrorMessage(java.lang.String msg,
java.awt.Dialog dlg)
Shows a dialog with the specified error message. |
static void |
showErrorMessage(java.lang.String msg,
java.awt.Frame frame)
Shows a dialog with the specified error message. |
static boolean |
showYesNoDialog(java.awt.Component parent,
java.lang.String message)
Brings up a question dialog with Yes, No options, empty title and the specified message. |
static boolean |
showYesNoDialog(java.awt.Component parent,
java.lang.String message,
java.lang.String title)
Brings up a question dialog with Yes, No options, empty title and the specified message. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HF()
| Method Detail |
|---|
public static java.lang.String getErrorMessage(java.lang.Exception e)
null message.
null message.public static void showErrorMessage(java.lang.String msg)
msg - The error message to be shown.
public static void showErrorMessage(java.lang.String msg,
java.awt.Frame frame)
frame - The parent Frame for the dialog.msg - The error message to be shown.
public static void showErrorMessage(java.lang.String msg,
java.awt.Dialog dlg)
dlg - The parent Dialog from which the dialog is displayed.msg - The error message to be shown.public static void showErrorMessage(java.lang.Exception e)
getErrorMessage(java.lang.Exception) method.
e - The Exception from which the error message is obtained.
public static void showErrorMessage(java.lang.Exception e,
java.lang.String prefix)
getErrorMessage(java.lang.Exception) method.
e - The Exception from which the error message is obtained.prefix - The prefix to be added to the error message.
public static void showErrorMessage(java.lang.Exception e,
java.awt.Frame frame)
getErrorMessage(java.lang.Exception) method.
e - The Exception from which the error message is obtained.frame - The parent Frame for the dialog.
public static void showErrorMessage(java.lang.Exception e,
java.awt.Frame frame,
java.lang.String prefix)
getErrorMessage(java.lang.Exception) method.
e - The Exception from which the error message is obtained.frame - The parent Frame for the dialog.prefix - The prefix to be added to the error message.
public static void showErrorMessage(java.lang.Exception e,
java.awt.Dialog dlg)
getErrorMessage(java.lang.Exception) method.
e - The Exception from which the error message is obtained.dlg - The parent Dialog from which the dialog is displayed.
public static boolean showYesNoDialog(java.awt.Component parent,
java.lang.String message)
parent - The parent Component for the dialog.message - The message to display.
true if the user chooses "yes", false otherwise.
public static boolean showYesNoDialog(java.awt.Component parent,
java.lang.String message,
java.lang.String title)
parent - The parent Component for the dialog.message - The message to display.title - The dialog's title.
true if the user chooses "yes", false otherwise.public static void setUIDefaultFont(java.lang.String fontName)
fontName - The name of the font to be used as default.public static void deleteFile(java.lang.String file)
file - The file to delete.
public static boolean createBackup(java.lang.String file,
java.lang.String bkpFile)
file - The name of the file to backup.bkpFile - The backup name of the file.
true if the file is backuped successfully.public static double percentsToDecibels(int vol)
public static int decibelsToPercents(double vol)
public static float decibelsToFactor(double vol)
public static float percentsToFactor(int vol)
|
JSampler v0.8a |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||