public class DefaultThreadSafeDialogs extends java.lang.Object implements ThreadSafeDialogs
| Constructor and Description |
|---|
DefaultThreadSafeDialogs() |
DefaultThreadSafeDialogs(java.awt.Component rootComponent) |
DefaultThreadSafeDialogs(java.awt.Component rootComponent,
NewStatusBar statusbar) |
| Modifier and Type | Method and Description |
|---|---|
int |
confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType)
Show a JOptionPane confirm dialog.
|
int |
confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType,
java.lang.String msgid) |
java.awt.Component |
createComponent(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object... parameters)
Creates an return a new instance of the component specified
This method ensure that the component is created in the event dispatch thread of swing.
|
java.awt.Component |
createComponentWithParams(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object[] parameters)
Creates an return a new instance of the component specified
This method ensure that the component is created in the event dispatch thread of swing.
|
java.lang.String |
inputDialog(java.lang.String message,
java.lang.String title)
Show a JOptionPane input dialog.
|
java.lang.String |
inputDialog(java.lang.String message,
java.lang.String title,
int messageType,
java.lang.String initialValue)
Show a JOptionPane input dialog.
|
void |
message(java.lang.String message,
int messageType)
Show a non intrusibe message to the user.
|
void |
messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType)
Create a message dialog with ok button.
|
void |
messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType,
java.lang.String msgid) |
void |
messageDialog(java.lang.String message,
java.lang.String title,
int messageType)
Create a message dialog with an ok button.
|
java.io.File[] |
showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled)
Creates and show a JFileChooser dialog.
|
<any> |
showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
boolean askCharset)
Creates and show a JFileChooser dialog.This method return an array whit the selected files.
|
java.io.File[] |
showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
javax.swing.JComponent accesory) |
void |
showDialog(java.awt.Component contents,
java.lang.String title)
Create a window with the contents and title specified as parameters
and show as a dialog windows of gvSIG.
|
java.io.File[] |
showOpenDirectoryDialog(java.lang.String title,
java.io.File initialPath)
Creates and show a JFileChooser dialog for folder selection.
|
java.io.File[] |
showOpenFileDialog(java.lang.String title,
java.io.File initialPath)
Creates and show a JFileChooser dialog for selection a file for open.
|
java.io.File[] |
showSaveFileDialog(java.lang.String title,
java.io.File initialPath)
Creates and show a JFileChooser dialog for selection a file for save.
|
public DefaultThreadSafeDialogs()
public DefaultThreadSafeDialogs(java.awt.Component rootComponent)
public DefaultThreadSafeDialogs(java.awt.Component rootComponent,
NewStatusBar statusbar)
public void message(java.lang.String message,
int messageType)
ThreadSafeDialogsManagermessage in interface ThreadSafeDialogsManagermessageType - One of: JOptionPane.ERROR_MESSAGE,
JOptionPane.WARNING_MESSAGE, JOptionPane.INFORMATION_MESSAGEpublic int confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType)
ThreadSafeDialogsManagerconfirmDialog in interface ThreadSafeDialogsManagerJOptionPane.showConfirmDialog(Component, Object, String, int, int)public int confirmDialog(java.lang.String message,
java.lang.String title,
int optionType,
int messageType,
java.lang.String msgid)
confirmDialog in interface ThreadSafeDialogsconfirmDialog in interface ThreadSafeDialogsManagerpublic java.lang.String inputDialog(java.lang.String message,
java.lang.String title,
int messageType,
java.lang.String initialValue)
ThreadSafeDialogsManagerinputDialog in interface ThreadSafeDialogsManagermessageType - an integer designating the kind of message this is;
primarily used to determine the icon from the pluggable
Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE,
WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGEJOptionPane.showInputDialog(Component, Object, String, int)public java.lang.String inputDialog(java.lang.String message,
java.lang.String title)
ThreadSafeDialogsManagerinputDialog in interface ThreadSafeDialogsManagerJOptionPane.showInputDialog(Component, Object, String, int)public void messageDialog(java.lang.String message,
java.lang.String title,
int messageType)
ThreadSafeDialogsManagermessageDialog in interface ThreadSafeDialogsManagermessage - to present in the dialogtitle - title of the dialogmessageType - type of icon to use.JOptionPane.showMessageDialog(Component, Object, String, int)public void messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType)
ThreadSafeDialogsManagermessageDialog in interface ThreadSafeDialogsManagermessage - to present in the dialogmessageArgs - string array of arguments used to format the messagetitle - title of the dialogmessageType - type of icon to use.JOptionPane.showMessageDialog(Component, Object, String, int)public void messageDialog(java.lang.String message,
java.lang.String[] messageArgs,
java.lang.String title,
int messageType,
java.lang.String msgid)
messageDialog in interface ThreadSafeDialogsmessageDialog in interface ThreadSafeDialogsManagerpublic void showDialog(java.awt.Component contents,
java.lang.String title)
ThreadSafeDialogsshowDialog in interface ThreadSafeDialogspublic java.awt.Component createComponent(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object... parameters)
ThreadSafeDialogsManagercreateComponent in interface ThreadSafeDialogsManagertheClass - of component to be createdparameters - passed to the constructor of the componentpublic java.awt.Component createComponentWithParams(java.lang.Class<? extends java.awt.Component> theClass,
java.lang.Object[] parameters)
ThreadSafeDialogsManagercreateComponentWithParams in interface ThreadSafeDialogsManagertheClass - of component to be createdparameters - passed to the constructor of the componentpublic java.io.File[] showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled)
ThreadSafeDialogsManagershowChooserDialog in interface ThreadSafeDialogsManagertype - of the dialog, JFileChooser.SAVE_DIALOG or JFileChooser.OPEN_DIALOGselectionMode - of the dialog, values are: JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY, JFileChooser.FILES_AND_DIRECTORIESfilter - used to filter the files show in the dialog.public <any> showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
boolean askCharset)
ThreadSafeDialogsManagershowChooserDialog in interface ThreadSafeDialogsManagertype - of the dialog, JFileChooser.SAVE_DIALOG or JFileChooser.OPEN_DIALOGselectionMode - of the dialog, values are: JFileChooser.FILES_ONLY, JFileChooser.DIRECTORIES_ONLY, JFileChooser.FILES_AND_DIRECTORIESfilter - used to filter the files show in the dialog.public java.io.File[] showOpenDirectoryDialog(java.lang.String title,
java.io.File initialPath)
ThreadSafeDialogsManagershowOpenDirectoryDialog in interface ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public java.io.File[] showOpenFileDialog(java.lang.String title,
java.io.File initialPath)
ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean) call.showOpenFileDialog in interface ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public java.io.File[] showSaveFileDialog(java.lang.String title,
java.io.File initialPath)
ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean) call.showSaveFileDialog in interface ThreadSafeDialogsManagerThreadSafeDialogsManager.showChooserDialog(String, int, int, boolean, File, FileFilter, boolean)public java.io.File[] showChooserDialog(java.lang.String title,
int type,
int selectionMode,
boolean multiselection,
java.io.File initialPath,
javax.swing.filechooser.FileFilter filter,
boolean fileHidingEnabled,
javax.swing.JComponent accesory)
showChooserDialog in interface ThreadSafeDialogsManager