|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.util.swing.Utilities
public class Utilities
| Field Summary | |
|---|---|
static String |
JGOODIES_PACKAGE
|
static boolean |
TEST_MODE
True if the program is run in non-interactive test mode. |
| Constructor Summary | |
|---|---|
Utilities()
|
|
| Method Summary | |
|---|---|
static void |
clearEventQueue()
Clears the event queue by waiting until all events currently in the queue have been processed. |
static void |
clearEventQueue(boolean newEvents)
Clears the event queue by waiting until all events currently in the queue have been processed. |
static AbstractAction |
createDelegateAction(String newName,
Action delegate)
|
static PropertyChangeListener |
enableDisableWith(Action observable,
Action observer)
Enables/disables the second action whenever the first action is enabled/disabled. |
static String |
getClipboardSelection(Component c)
|
static int |
getComponentIndex(Component component)
Return the index of the component in the parent container, or -1 if no parent or not found. |
static void |
invokeAndWait(Runnable task)
|
static void |
invokeLater(Runnable task)
Runs the task synchronously if the current thread is the event thread; otherwise passes it to the event thread to be run asynchronously after all events already on the queue have been processed. |
static boolean |
isPlasticLaf()
|
static boolean |
isPlasticLaf(String name)
|
static void |
setPopupLoc(Window popup,
Component owner)
Determines the location of the popup using a simple, uniform protocol. |
static void |
show(String msg)
Show a modal debug message box with an OK button regardless of TEST_MODE. |
static void |
showDebug(String msg)
Shows a modal debug message box with an OK button when not in TEST_MODE. |
static void |
showMessageBox(String msg,
String title)
Shows a modal message box with an OK button. |
static void |
showStackTrace(Throwable t)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static volatile boolean TEST_MODE
public static final String JGOODIES_PACKAGE
| Constructor Detail |
|---|
public Utilities()
| Method Detail |
|---|
public static void invokeLater(Runnable task)
public static void invokeAndWait(Runnable task)
public static void clearEventQueue()
public static void clearEventQueue(boolean newEvents)
newEvents - true if the method should also clear new events that were added by the events just clearedpublic static void show(String msg)
msg - string to displaypublic static void showDebug(String msg)
msg - string to display
public static void showMessageBox(String msg,
String title)
msg - string to displaypublic static void showStackTrace(Throwable t)
public static String getClipboardSelection(Component c)
public static AbstractAction createDelegateAction(String newName,
Action delegate)
public static boolean isPlasticLaf()
public static boolean isPlasticLaf(String name)
name - the fully-qualified classname of the LookAndFeel
public static void setPopupLoc(Window popup,
Component owner)
popup - the popup windowowner - the parent component for the popup
public static PropertyChangeListener enableDisableWith(Action observable,
Action observer)
observable - the action that is observed (leads)observer - the action that follows
public static int getComponentIndex(Component component)
component -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||