|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectvisad.util.Util
public class Util
A hodge-podge of general utility methods.
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static void |
adjustTextField(javax.swing.JTextField field)
Limit the given text field to one line in height. |
static boolean |
arraysEqual(java.lang.Object[] o1,
java.lang.Object[] o2)
Tests whether two arrays are component-wise equal. |
static boolean |
canDoHDF5()
Test whether HDF-5 native code is present in this JVM. |
static boolean |
canDoJAI()
Test whether Java Advanced Imaging is present in this JVM. |
static boolean |
canDoJava3D()
Test whether Java 3D is present in this JVM. |
static boolean |
canDoJava3D(java.lang.String version)
Check to see if the version of Java 3D being used is compatible with the desired specification version. |
static boolean |
canDoJPEG()
Test whether JPEG codec (com.sun.image.codec.jpeg) is present in this JVM. |
static boolean |
canDoPython()
Test whether JPython is present in this JVM. |
static boolean |
canDoQuickTime()
Test whether QuickTime for Java is present in this JVM. |
static void |
captureDisplay(DisplayImpl display,
java.lang.String filename)
Capture a DisplayImpl into a JPEG file |
static void |
centerWindow(java.awt.Window window)
Center the given window on the screen. |
static java.lang.String |
getTimestamp()
Return a string representation of the current date and time. |
static javax.swing.JFileChooser |
getVisADFileChooser()
Return a JFileChooser that recognizes accepted VisAD file types. |
static void |
invoke(boolean wait,
boolean printStackTraces,
java.lang.Runnable r)
Executes the given Runnable object with the Swing event handling thread. |
static void |
invoke(boolean wait,
java.lang.Runnable r)
Executes the given Runnable object with the Swing event handling thread. |
static boolean |
isApproximatelyEqual(double a,
double b)
Determine whether two numbers are roughly the same. |
static boolean |
isApproximatelyEqual(double a,
double b,
double epsilon)
Determine whether two numbers are roughly the same. |
static boolean |
isApproximatelyEqual(float a,
float b)
Determine whether two numbers are roughly the same. |
static boolean |
isApproximatelyEqual(float a,
float b,
float epsilon)
Determine whether two numbers are roughly the same. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Util()
Method Detail |
---|
public static boolean isApproximatelyEqual(float a, float b, float epsilon)
a
- First numberb
- Second numberepsilon
- Absolute amount by which they can differ.
public static boolean isApproximatelyEqual(float a, float b)
a
- First numberb
- Second number
public static boolean isApproximatelyEqual(double a, double b, double epsilon)
a
- First numberb
- Second numberepsilon
- Absolute amount by which they can differ.
public static boolean isApproximatelyEqual(double a, double b)
a
- First numberb
- Second number
public static java.lang.String getTimestamp()
public static javax.swing.JFileChooser getVisADFileChooser()
public static void adjustTextField(javax.swing.JTextField field)
public static void centerWindow(java.awt.Window window)
public static boolean canDoHDF5()
public static boolean canDoJPEG()
public static boolean canDoJAI()
public static boolean canDoPython()
public static boolean canDoQuickTime()
public static boolean canDoJava3D()
public static boolean canDoJava3D(java.lang.String version)
version
- version to check. Needs to conform to the dotted format
of specification version numbers (e.g., 1.2)
public static void captureDisplay(DisplayImpl display, java.lang.String filename)
display
- the DisplayImpl to capturefilename
- the name of the file to write intopublic static boolean arraysEqual(java.lang.Object[] o1, java.lang.Object[] o2)
public static void invoke(boolean wait, java.lang.Runnable r)
wait
- true if method should block until Runnable code
finishes execution.r
- Runnable object to execute using the event handling thread.public static void invoke(boolean wait, boolean printStackTraces, java.lang.Runnable r)
wait
- true if method should block until Runnable code
finishes execution.printStackTraces
- true if the stack trace for
any exception should be printed.r
- Runnable object to execute using the event handling thread.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |