|
UTJML | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.utep.cs.utjml.canica.Util
public abstract class Util
A utility class that provides various static utility methods.
| Field Summary |
|---|
| Method Summary | |
|---|---|
static void |
centerWindow(Component window)
Centers the given window within the screen. |
static ComponentListener |
createComponentListener(int w,
int h)
Returns a component listener that prohibits the component c from being resized smaller than the width
w and the height h. |
static void |
debug(String msg)
Prints the given message on stdout if the debug
flag Constants.DEBUG is true; otherwise, do nothing. |
static ImageIcon |
getIcon(String name)
Returns an image icon whose image is read from the file named name. |
static void |
invokeAndWait(Runnable job)
Runs the given job in a thread-safe way. |
static boolean |
isClassFile(File file)
Returns true if the given file is a Java class file. |
static boolean |
isClassFile(String name)
Returns true if the given file name ends with the class extension. |
static boolean |
isJavaFile(File file)
Returns true if the given file is a Java source file. |
static boolean |
isJavaFile(String name)
Returns true if the argument names a Java source file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static void invokeAndWait(Runnable job)
public static void centerWindow(Component window)
window - The window to center.
requires window != null;
public static ImageIcon getIcon(String name)
name. A null is returned if reading the file fails.
public static void debug(String msg)
stdout if the debug
flag Constants.DEBUG is true; otherwise, do nothing.
public static boolean isJavaFile(String name)
public static boolean isJavaFile(File file)
public static boolean isClassFile(File file)
public static boolean isClassFile(String name)
name - File name
public static ComponentListener createComponentListener(int w,
int h)
c from being resized smaller than the width
w and the height h.
|
UTJML | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||