|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.utils.Util
public class Util
This is a class that contains useful routines. They are public and static.
Field Summary | |
---|---|
static java.lang.String |
JFC_CLOSE_BRACKET
This constant specifies the closing bracket string that the jfc
will be
looking for when approving selection. |
static java.lang.String |
JFC_OPEN_BRACKET
This constant sets the opening bracket string that the jfc
will be
looking for when approving selection. |
Constructor Summary | |
---|---|
Util()
|
Method Summary | |
---|---|
static void |
bewail(java.lang.String s,
java.lang.Throwable th,
java.awt.Component f)
Outputs an error dialog box and optionally prints out the exception stack trace, if it is not null. |
static javax.swing.JFileChooser |
createFileChooser()
This method creates a javax.swing.JFileChooser that is
responsible
for substituting the right sort of extensions (by examining the filter
description contents) and for asking for overwriting confirmation. |
static boolean |
extensionMatch(java.lang.String filename,
java.lang.String extension)
This routine returns whether or not the filename ends with the extension. |
static javax.swing.JDialog |
showSplash(java.awt.Frame owner,
java.lang.String title,
java.lang.String message)
This method creates a splash dialog with a given title. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String JFC_OPEN_BRACKET
jfc
will be
looking for when approving selection.
When approving selection, jfc
JFileChooser will look up for
the default extensions for the file to read or save. This is obtained by
parsing the description string. The first occurence of JFC_OPEN_BRACKET
specifies the start of the extension specification, the first occurence of
the
JFC_CLOSE_BRACKET
after the opening bracket signifies the end
of
the extension specification. The string inbetween them is treated as the
default
extension (leading and trailing spaces removed).
If the brackets are not encountered, or only one is found, the file is treated as is: no extension is added to it. The filename is not updated also if the "All files" filer has been chosen.
public static final java.lang.String JFC_CLOSE_BRACKET
jfc
will be
looking for when approving selection.
JFC_OPEN_BRACKET
,
Constant Field ValuesConstructor Detail |
---|
public Util()
Method Detail |
---|
public static javax.swing.JDialog showSplash(java.awt.Frame owner, java.lang.String title, java.lang.String message)
public static javax.swing.JFileChooser createFileChooser()
javax.swing.JFileChooser
that is
responsible
for substituting the right sort of extensions (by examining the filter
description contents) and for asking for overwriting confirmation.
JFC_OPEN_BRACKET
public static boolean extensionMatch(java.lang.String filename, java.lang.String extension)
filename
- is the examined filenameextension
- is the extension in question; in fact, it can be any
ending of a filename, so
please be careful and don't forget the "." to match the extensions
only; otherwise
"trace" and "tr.ace" would match the same extension "ace", unless you
specify it as ".ace"
public static void bewail(java.lang.String s, java.lang.Throwable th, java.awt.Component f)
s
- the message to output as an error.th
- the throwable of which the stack trace will be output to err;
can
be null, if no stack trace is to be outputf
- is the frame or Dialog to which the error message is modal
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |