public class commonsdialog extends Object
Modifier and Type | Field and Description |
---|---|
static int |
ACCEPT_CANCEL |
static int |
CANCEL |
static int |
DIRECTORIES_ONLY |
static int |
FILES_ONLY
filechooser selectionMode
|
static int |
FORBIDEN
msgbox messagetypes
|
static int |
IDEA |
static int |
NO |
static int |
OPEN_DIRECTORY |
static int |
OPEN_FILE
filechooser options
|
static int |
QUESTION |
static int |
SAVE_FILE |
static int |
WARNING |
static int |
YES
Return values for confirmDialog
|
static int |
YES_NO
Confirmdialog optionType Options
|
static int |
YES_NO_CANCEL |
Constructor and Description |
---|
commonsdialog() |
Modifier and Type | Method and Description |
---|---|
static int |
confirmDialog(String prompt,
String title,
int optionType,
int messageType,
JComponent root)
Shows a dialog to request to the user an answer of YES, NO or CANCEL.
|
static String[] |
filechooser(int mode,
String title,
String initialPath,
boolean multiselection,
String filter,
boolean fileHidingEnabled,
Component root)
Show an file or folder selector dialog.
|
static String |
inputbox(String prompt,
String title,
int messageType,
String initialValue,
Component root)
Shows a dialog to request a input to the user.
|
static void |
msgbox(String message,
String title,
int messageType,
Component root)
Shows a message dialog with ok button only.
|
static String[] |
openFileDialog(String title,
String initialPath,
Component root)
Show a selector dialog for choose a file for reading.
|
static String[] |
openFolderDialog(String title,
String initialPath,
Component root)
Show a selector dialog for choose a folder.
|
static String[] |
saveFileDialog(String title,
String initialPath,
Component root)
Show a selector dialog for choose a file for writing.
|
public static final int FORBIDEN
public static final int IDEA
public static final int WARNING
public static final int QUESTION
public static final int YES_NO
public static final int YES_NO_CANCEL
public static final int ACCEPT_CANCEL
public static final int YES
public static final int NO
public static final int CANCEL
public static final int OPEN_FILE
public static final int OPEN_DIRECTORY
public static final int SAVE_FILE
public static final int FILES_ONLY
public static final int DIRECTORIES_ONLY
public static void msgbox(String message, String title, int messageType, Component root)
message
- title,
- optional, title of the dialogmessageType,
- optional, default value is IDEAroot,
- optional, parent Component for this dialog, default values is gvSIG main window.public static String inputbox(String prompt, String title, int messageType, String initialValue, Component root)
prompt
- title,
- optional, title of the dialogmessageType,
- optional, default value is IDEAinitialValue,
- optional, default value is ""root,
- optional, parent Component for this dialog, default values is gvSIG main window.public static int confirmDialog(String prompt, String title, int optionType, int messageType, JComponent root)
prompt
- title,
- optional, title of the dialogoptionType,
- optional, default value is YES_NOmessageType,
- optional, default value is IDEAroot,
- optional, parent Component for this dialog, default values is gvSIG main window.public static String[] filechooser(int mode, String title, String initialPath, boolean multiselection, String filter, boolean fileHidingEnabled, Component root)
mode
- title,
- optional, title of the dialoginitialPath,
- optional, default value is Nonemultiselection,
- optional, default value is Falsefilter,
- optional, default value is NonefileHidingEnabled,
- optional, default value is Trueroot,
- optional, parent Component for this dialog, default values is gvSIG main window.public static String[] openFileDialog(String title, String initialPath, Component root)
title,
- optional, title of the dialoginitialPath,
- optional, default value is Noneroot,
- optional, parent Component for this dialog, default values is gvSIG main window.public static String[] openFolderDialog(String title, String initialPath, Component root)
title,
- optional, title of the dialoginitialPath,
- optional, default value is Noneroot,
- optional, parent Component for this dialog, default values is gvSIG main window.public static String[] saveFileDialog(String title, String initialPath, Component root)
title,
- optional, title of the dialoginitialPath,
- optional, default value is Noneroot,
- optional, parent Component for this dialog, default values is gvSIG main window.