Class LocalFileSystemButtonSelectionAdapter

java.lang.Object
org.eclipse.swt.events.SelectionAdapter
de.uka.ipd.sdq.workflow.launchconfig.tabs.LocalFileSystemButtonSelectionAdapter
All Implemented Interfaces:
EventListener, SelectionListener, SWTEventListener

public class LocalFileSystemButtonSelectionAdapter extends SelectionAdapter
Listener for File selection dialogs. Used to select files on the local file system.
  • 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 field
      fileExtension - the file extension
      dialogTitle - the dialog title
      shell - 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 field
      fileExtension - the file extension
      dialogTitle - the dialog title
      shell - the shell
      useFolder - 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 field
      fileExtension - the file extension
      dialogTitle - the dialog title
      shell - the shell
      useFolder - the use folder
      useMultipleSelection - if true, multiple files can be selected.
  • Method Details

    • openFileDialog

      public String openFileDialog(Text textField, String[] fileExtension)
      Opens a file selection dialog. Use getShell() to retrieve the shell and getDialogTitle() 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

      public String openFileDialog(Text textField, String[] fileExtension, boolean multipleSelection)
      Opens a file selection dialog. Use getShell() to retrieve the shell and getDialogTitle() 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

      public String openFolderDialog(Text textField)
      Opens a folder selection dialog. Use getShell() to retrieve the shell and getDialogTitle() to retrieve the title within subclasses.
      Parameters:
      textField - The text field which receives the path of the selected folder.
      Returns:
      the string
    • widgetSelected

      public void widgetSelected(SelectionEvent e)
      Specified by:
      widgetSelected in interface SelectionListener
      Overrides:
      widgetSelected in class SelectionAdapter
    • getShell

      protected Shell getShell()
      Gets the shell used for the dialog.
      Returns:
      The shell.
    • getDialogTitle

      public String getDialogTitle()
      Geths the title/message for the dialog.
      Returns:
      The title.