|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.neu.ccs.util.JPTUtilities
Provides general utility methods used by various classes in the JPT.
Several JPT classes can notfy a programmer
of a grave programming error by throwing a
using the
JPTErrortrue
method of this class, a setDebugModeJPTError
will be handled by the JPT before it is thrown,
and a dialog box will be shown
to notify the programmer of the error.
If debug mode is set to false,
as it is by default, a JPTError
will be treated almost exactly the same as
any other instance of the Error class.
| Field Summary | |
private static boolean |
DEBUG
Debug flag for the toolkit. |
| Fields inherited from interface edu.neu.ccs.util.JPTConstants |
ABOVE, ALIGNMENT, BELOW, BOTTOM_LEFT, BOTTOM_RIGHT, DEFAULT, FONT, INPUT_PROPERTIES, MANDATORY, OPTIONAL, ORIENTATION, TOP_LEFT, TOP_RIGHT, VALUE |
| Fields inherited from interface javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Constructor Summary | |
JPTUtilities()
|
|
| Method Summary | |
static String |
getBorderLayoutLocation(int alignment)
Returns the
constant corresponding with
the given alignment constant. |
static boolean |
isDebugModeSet()
Returns the toolkit debug flag. |
static void |
pauseThread(long milliseconds)
Pauses the calling thread for at most the given number of milliseconds. |
static void |
setDebugMode(boolean flag)
Sets the debug flag for the toolkit to the given value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static boolean DEBUG
| Constructor Detail |
public JPTUtilities()
| Method Detail |
public static String getBorderLayoutLocation(int alignment)
BorderLayout
constant corresponding with
the given alignment constant.
alignment - the desired alignment constantpublic static boolean isDebugModeSet()
setDebugMode(boolean)public static void pauseThread(long milliseconds)
Thread.sleep method
is not perfectly timed to millisecond precision,
the actual number of milliseconds the thread pauses
will be slightly greater than the given number.
If the calling thread is interrupted, this method will return
before the given number of milliseconds have elapsed.
If the given number of millseconds is less than zero,
the calling thread is not paused.
milliseconds - the length of time in milliseconds
to pause the calling threadpublic static void setDebugMode(boolean flag)
flag - whether or not the toolkit
is in debug stateisDebugModeSet()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||