|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.psychomad.psycholib.ui.EasyDialog
public class EasyDialog
This class contains a lot of functionalities for displaying dialog boxes. Don't forget to give a parent component so the dialog can be center relative to your main window. Use the setParentComponent() method. Don't forget to give the default directory for the filechooser so he opens in the good directory. Use the setFileChooserDefaultDirectory() method. You will be able to change this dir temporary by using the same method passing a second argument.
Field Summary | |
---|---|
static int |
OPEN_DIALOG
This value must be used if you want to open a Load dialog box. |
static int |
SAVE_DIALOG
This value must be used if you want to open a Save dialog box. |
Constructor Summary | |
---|---|
EasyDialog()
|
Method Summary | |
---|---|
static java.lang.String |
getSelectedFile()
This method allow to get the string corresponding to the selected file int the fileChooser. |
static void |
setFileChooserDefaultDirectory(java.lang.String defaultDirectory)
This method allow to set the default directory for the filechooser. |
static void |
setParentComponent(java.awt.Component parentComponent)
This method allow to init the parent component of the dialogs. |
static void |
showErrorMsg(java.lang.Object msg)
Show an error message. |
static int |
showFileChooser(int typeOfDialog)
Show a file chooser. |
static int |
showFileChooser(int typeOfDialog,
java.lang.String tmpDir)
Show a file chooser. |
static void |
showInfoMsg(java.lang.Object msg)
Show an information message. |
static int |
showInternalQuestionMsg(java.awt.Component pC,
java.lang.Object msg)
TODO Show a question message. |
static int |
showQuestionMsg(java.lang.Object msg)
Show a question message. |
static java.lang.String[] |
tokenize(java.lang.String input)
Take the given string and chop it up into a series of strings on whitespace boundries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int OPEN_DIALOG
public static final int SAVE_DIALOG
Constructor Detail |
---|
public EasyDialog()
Method Detail |
---|
public static void setParentComponent(java.awt.Component parentComponent)
parentComponent
- the parent component for the dialogs.public static void setFileChooserDefaultDirectory(java.lang.String defaultDirectory)
defaultDirectory
- the default directory for the file chooser.public static void showErrorMsg(java.lang.Object msg)
msg
- the message to display.public static void showInfoMsg(java.lang.Object msg)
msg
- the message to display.public static int showQuestionMsg(java.lang.Object msg)
msg
- the message to display.
public static int showFileChooser(int typeOfDialog, java.lang.String tmpDir)
typeOfDialog
- one of the following : OPEN_DIALOG or SAVE_DIALOG.tmpDir
- the directory where the filechooser point. If this param
is null then this is equivalent to call the showFileChooser(int) method.
public static int showFileChooser(int typeOfDialog)
typeOfDialog
- one of the following : OPEN_DIALOG or SAVE_DIALOG.
public static java.lang.String getSelectedFile()
public static int showInternalQuestionMsg(java.awt.Component pC, java.lang.Object msg)
msg
- the message to display.
public static java.lang.String[] tokenize(java.lang.String input)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |