Class LocalFileSystemButtonSelectionAdapter
java.lang.Object
org.eclipse.swt.events.SelectionAdapter
de.uka.ipd.sdq.workflow.launchconfig.tabs.LocalFileSystemButtonSelectionAdapter
- All Implemented Interfaces:
EventListener
,SelectionListener
,SWTEventListener
Listener for File selection dialogs. Used to select files on the local file system.
-
Constructor Summary
ConstructorDescriptionLocalFileSystemButtonSelectionAdapter
(Text field, String[] fileExtension, String dialogTitle, Shell shell) Instantiates a new local file system button selection adapter.LocalFileSystemButtonSelectionAdapter
(Text field, String[] fileExtension, String dialogTitle, Shell shell, boolean useFolder) Instantiates a new local file system button selection adapter.LocalFileSystemButtonSelectionAdapter
(Text field, String[] fileExtension, String dialogTitle, Shell shell, boolean useFolder, boolean useMultipleSelection) Instantiates a new local file system button selection adapter. -
Method Summary
Modifier and TypeMethodDescriptionGeths the title/message for the dialog.protected Shell
getShell()
Gets the shell used for the dialog.openFileDialog
(Text textField, String[] fileExtension) Opens a file selection dialog.openFileDialog
(Text textField, String[] fileExtension, boolean multipleSelection) Opens a file selection dialog.openFolderDialog
(Text textField) Opens a folder selection dialog.void
Methods inherited from class org.eclipse.swt.events.SelectionAdapter
widgetDefaultSelected
-
Constructor Details
-
LocalFileSystemButtonSelectionAdapter
public LocalFileSystemButtonSelectionAdapter(Text field, String[] fileExtension, String dialogTitle, Shell shell) Instantiates a new local file system button selection adapter.- Parameters:
field
- the fieldfileExtension
- the file extensiondialogTitle
- the dialog titleshell
- the shell
-
LocalFileSystemButtonSelectionAdapter
public LocalFileSystemButtonSelectionAdapter(Text field, String[] fileExtension, String dialogTitle, Shell shell, boolean useFolder) Instantiates a new local file system button selection adapter.- Parameters:
field
- the fieldfileExtension
- the file extensiondialogTitle
- the dialog titleshell
- the shelluseFolder
- the use folder
-
LocalFileSystemButtonSelectionAdapter
public LocalFileSystemButtonSelectionAdapter(Text field, String[] fileExtension, String dialogTitle, Shell shell, boolean useFolder, boolean useMultipleSelection) Instantiates a new local file system button selection adapter.- Parameters:
field
- the fieldfileExtension
- the file extensiondialogTitle
- the dialog titleshell
- the shelluseFolder
- the use folderuseMultipleSelection
- if true, multiple files can be selected.
-
-
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:
widgetSelected
in interfaceSelectionListener
- Overrides:
widgetSelected
in classSelectionAdapter
-
getShell
Gets the shell used for the dialog.- Returns:
- The shell.
-
getDialogTitle
Geths the title/message for the dialog.- Returns:
- The title.
-