Class DirectoryFieldEditor


  • public class DirectoryFieldEditor
    extends StringButtonFieldEditor
    A field editor for a directory path type preference. A standard directory dialog appears when the user presses the change button.
    • Constructor Detail

      • DirectoryFieldEditor

        protected DirectoryFieldEditor()
        Creates a new directory field editor
      • DirectoryFieldEditor

        public DirectoryFieldEditor​(String name,
                                    String labelText,
                                    Composite parent)
        Creates a directory field editor.
        Parameters:
        name - the name of the preference this field editor works on
        labelText - the label text of the field editor
        parent - the parent of the field editor's control
    • Method Detail

      • changePressed

        protected String changePressed()
        Description copied from class: StringButtonFieldEditor
        Notifies that this field editor's change button has been pressed.

        Subclasses must implement this method to provide a corresponding new string for the text field. If the returned value is null, the currently displayed value remains.

        Specified by:
        changePressed in class StringButtonFieldEditor
        Returns:
        the new string to display, or null to leave the old string showing
      • doCheckState

        protected boolean doCheckState()
        Description copied from class: StringFieldEditor
        Hook for subclasses to do specific state checks.

        The default implementation of this framework method does nothing and returns true. Subclasses should override this method to specific state checks.

        Overrides:
        doCheckState in class StringFieldEditor
        Returns:
        true if the field value is valid, and false if invalid
      • setFilterPath

        public void setFilterPath​(File path)
        Sets the initial path for the Browse dialog.
        Parameters:
        path - initial path for the Browse dialog
        Since:
        3.6