public class commonsdialog
extends java.lang.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(java.lang.String prompt,
java.lang.String title,
int optionType,
int messageType,
javax.swing.JComponent root)
Shows a dialog to request to the user an answer of YES, NO or CANCEL.
|
static java.lang.String[] |
filechooser(int mode,
java.lang.String title,
java.lang.String initialPath,
boolean multiselection,
java.lang.String filter,
boolean fileHidingEnabled,
java.awt.Component root)
Show an file or folder selector dialog.
|
static java.lang.String |
inputbox(java.lang.String prompt,
java.lang.String title,
int messageType,
java.lang.String initialValue,
java.awt.Component root)
Shows a dialog to request a input to the user.
|
static void |
msgbox(java.lang.String message,
java.lang.String title,
int messageType,
java.awt.Component root)
Shows a message dialog with ok button only.
|
static java.lang.String[] |
openFileDialog(java.lang.String title,
java.lang.String initialPath,
java.awt.Component root)
Show a selector dialog for choose a file for reading.
|
static java.lang.String[] |
openFolderDialog(java.lang.String title,
java.lang.String initialPath,
java.awt.Component root)
Show a selector dialog for choose a folder.
|
static java.lang.String[] |
saveFileDialog(java.lang.String title,
java.lang.String initialPath,
java.awt.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(java.lang.String message, java.lang.String title, int messageType, java.awt.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 java.lang.String inputbox(java.lang.String prompt, java.lang.String title, int messageType, java.lang.String initialValue, java.awt.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(java.lang.String prompt, java.lang.String title, int optionType, int messageType, javax.swing.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 java.lang.String[] filechooser(int mode, java.lang.String title, java.lang.String initialPath, boolean multiselection, java.lang.String filter, boolean fileHidingEnabled, java.awt.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 java.lang.String[] openFileDialog(java.lang.String title, java.lang.String initialPath, java.awt.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 java.lang.String[] openFolderDialog(java.lang.String title, java.lang.String initialPath, java.awt.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 java.lang.String[] saveFileDialog(java.lang.String title, java.lang.String initialPath, java.awt.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.