Class FilePathDialogWithFilter

java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.csstudio.opibuilder.visualparts.FilePathDialogWithFilter
All Implemented Interfaces:
IShellProvider, Listener

public final class FilePathDialogWithFilter extends Dialog implements Listener
This class represents a Dialog to choose a file (applying or not filters) in the workspace. There is an option to return or not relative path.
  • Constructor Details

    • FilePathDialogWithFilter

      public FilePathDialogWithFilter(Shell parentShell, IPath refPath, String dialogMessage, String[] filters)
      Creates an input dialog with OK and Cancel buttons. Note that the dialog will have no visual representation (no widgets) until it is told to open.

      Note that the open method blocks for input dialogs.

      Parameters:
      parentShell - the parent shell, or null to create a top-level shell
      refPath - the reference path which doesn't include the file name.
      dialogMessage - the dialog message, or null if none
      filters -
  • Method Details

    • setSelectedResource

      public void setSelectedResource(IPath path)
      Sets the initially selected resource. Must be called before the dialog is displayed.
      Parameters:
      path - the path to the initially selected resource.
    • configureShell

      protected void configureShell(Shell shell)
      Overrides:
      configureShell in class Window
    • createDialogArea

      protected Control createDialogArea(Composite parent)
      Overrides:
      createDialogArea in class Dialog
    • okPressed

      protected void okPressed()
      Overrides:
      okPressed in class Dialog
    • getSelectedResource

      public IPath getSelectedResource()
    • handleEvent

      public void handleEvent(Event event)
      Specified by:
      handleEvent in interface Listener