|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.enhydra.tool.common.SwingUtil
SwingUtil contains static utility methods for working with Swing classes.
Method Summary | |
static java.awt.Point |
getCenteringPoint(java.awt.Dimension size)
Get the point on point on the screen at which to open a dialog or window for it to appear centered. |
static java.io.File |
getDirectoryChoice(java.awt.Component owner,
java.io.File defaultDir,
java.lang.String title)
Open a JFileChooser dialog for selecting a directory and return the selected directory. |
static java.io.File |
getDirectoryChoice(java.awt.Component owner,
java.lang.String defaultDir,
java.lang.String title)
Open a JFileChooser dialog for selecting a directory and return the selected directory. |
static java.io.File |
getFileChoice(java.awt.Component owner,
java.io.File defaultSelection,
javax.swing.filechooser.FileFilter filter,
java.lang.String title)
Get a file selection using the FileChooser dialog. |
static java.io.File |
getFileChoice(java.awt.Component owner,
java.lang.String defaultSelection,
javax.swing.filechooser.FileFilter filter,
java.lang.String title)
Get a file selection using the FileChooser dialog. |
static void |
setLookAndFeelToSystem()
Sets the look and feel to the native operating system look and feel. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static java.io.File getDirectoryChoice(java.awt.Component owner, java.lang.String defaultDir, java.lang.String title)
owner
- The frame or dialog that controls the invokation of this dialog.defaultDir
- A string representation of the directory to show when the
dialog opens.title
- Tile for the dialog.
public static java.io.File getDirectoryChoice(java.awt.Component owner, java.io.File defaultDir, java.lang.String title)
owner
- The frame or dialog that controls the invokation of this dialog.defaultDir
- The directory to show when the dialog opens.title
- Tile for the dialog.
public static java.io.File getFileChoice(java.awt.Component owner, java.lang.String defaultSelection, javax.swing.filechooser.FileFilter filter, java.lang.String title)
owner
- The parent of this modal dialog.defaultSelection
- The default file selection as a string.filter
- An extension filtertitle
- The caption for the dialog.
public static java.io.File getFileChoice(java.awt.Component owner, java.io.File defaultSelection, javax.swing.filechooser.FileFilter filter, java.lang.String title)
owner
- The parent of this modal dialog.defaultSelection
- The default file selection as a file.filter
- An extension filtertitle
- The caption for the dialog.
public static java.awt.Point getCenteringPoint(java.awt.Dimension size)
size
- The demensions of the dialog or window to position.
public static void setLookAndFeelToSystem()
|
Enhydra 5.1 API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |