Package jam.util
Class Utils
- java.lang.Object
-
- jam.util.Utils
-
public class Utils extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description Utils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
centerComponent(java.awt.Component component, java.awt.Component reference)
Center a component in reference to another, if the reference is null or not visible the screen is used as referencestatic double
getDoubleFromTextField(javax.swing.JTextField textField, double defaultValue)
static java.lang.String
getEnv(java.lang.String name)
static void
showDefaultCursor(java.awt.Component component)
static void
showPredefinedCursor(java.awt.Component component, int cursor)
static void
showWaitCursor(java.awt.Component component)
-
-
-
Method Detail
-
getDoubleFromTextField
public static double getDoubleFromTextField(javax.swing.JTextField textField, double defaultValue)
- Returns:
- the value in a text field as a double. If the text field contents do not represent a valid double then the default value is inserted into the text field and returned.
-
centerComponent
public static void centerComponent(java.awt.Component component, java.awt.Component reference)
Center a component in reference to another, if the reference is null or not visible the screen is used as reference
-
showWaitCursor
public static void showWaitCursor(java.awt.Component component)
-
showPredefinedCursor
public static void showPredefinedCursor(java.awt.Component component, int cursor)
-
showDefaultCursor
public static void showDefaultCursor(java.awt.Component component)
-
getEnv
public static java.lang.String getEnv(java.lang.String name)
-
-