Class DefaultFileSelectionAdapter
java.lang.Object
org.eclipse.swt.events.SelectionAdapter
de.uka.ipd.sdq.workflow.launchconfig.tabs.DefaultFileSelectionAdapter
- All Implemented Interfaces:
EventListener,SelectionListener,SWTEventListener
Listener for File selection dialogs. Used to select a default value.
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultFileSelectionAdapter(Text field, String[] fileExtension, String defaultFileURI) Instantiates a new default file selection adapter. -
Method Summary
Modifier and TypeMethodDescriptionGeths the title/message for the dialog.protected ShellgetShell()Gets the shell used for the dialog.protected StringopenFileDialog(Text textField, String[] fileExtension) Opens a file selection dialog.protected StringopenFileDialog(Text textField, String[] fileExtension, boolean multipleSelection) Opens a file selection dialog.protected StringopenFolderDialog(Text textField) Opens a folder selection dialog.voidMethods inherited from class org.eclipse.swt.events.SelectionAdapter
widgetDefaultSelected
-
Constructor Details
-
DefaultFileSelectionAdapter
Instantiates a new default file selection adapter.- Parameters:
field- the fieldfileExtension- the file extensiondefaultFileURI- the default file uri
-
-
Method Details
-
openFileDialog
Opens a file selection dialog. UsegetShell()to retrieve the shell andgetDialogTitle()to retrieve the title within subclasses.- Parameters:
textField- The text field which receives the path of the selected file.fileExtension- The extension which are allowed for the selected file.- Returns:
- the string
-
openFileDialog
Opens a file selection dialog. UsegetShell()to retrieve the shell andgetDialogTitle()to retrieve the title within subclasses.- Parameters:
textField- The text field which receives the path of the selected file.fileExtension- The extension which are allowed for the selected file.multipleSelection- indicates whether multiple elements can be selected in the file dialog.- Returns:
- the string
-
openFolderDialog
Opens a folder selection dialog. UsegetShell()to retrieve the shell andgetDialogTitle()to retrieve the title within subclasses.- Parameters:
textField- The text field which receives the path of the selected folder.- Returns:
- the string
-
widgetSelected
- Specified by:
widgetSelectedin interfaceSelectionListener- Overrides:
widgetSelectedin classSelectionAdapter
-
getShell
Gets the shell used for the dialog.- Returns:
- The shell.
-
getDialogTitle
Geths the title/message for the dialog.- Returns:
- The title.
-