Package org.eclipse.jface.preference
Class DirectoryFieldEditor
java.lang.Object
org.eclipse.jface.preference.FieldEditor
org.eclipse.jface.preference.StringFieldEditor
org.eclipse.jface.preference.StringButtonFieldEditor
org.eclipse.jface.preference.DirectoryFieldEditor
A field editor for a directory path type preference. A standard directory
dialog appears when the user presses the change button.
-
Field Summary
Fields inherited from class org.eclipse.jface.preference.StringFieldEditor
oldValue, UNLIMITED, VALIDATE_ON_FOCUS_LOST, VALIDATE_ON_KEY_STROKEFields inherited from class org.eclipse.jface.preference.FieldEditor
HORIZONTAL_GAP, IS_VALID, VALUE -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCreates a new directory field editorDirectoryFieldEditor(String name, String labelText, Composite parent) Creates a directory field editor. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringNotifies that this field editor's change button has been pressed.protected booleanHook for subclasses to do specific state checks.voidsetFilterPath(File path) Sets the initial path for the Browse dialog.Methods inherited from class org.eclipse.jface.preference.StringButtonFieldEditor
adjustForNumColumns, doFillIntoGrid, getChangeControl, getNumberOfControls, getShell, setChangeButtonText, setEnabledMethods inherited from class org.eclipse.jface.preference.StringFieldEditor
checkState, createTextWidget, doLoad, doLoadDefault, doStore, getErrorMessage, getStringValue, getTextControl, getTextControl, isEmptyStringAllowed, isValid, refreshValidState, setEmptyStringAllowed, setErrorMessage, setFocus, setStringValue, setTextLimit, setValidateStrategy, showErrorMessage, valueChangedMethods inherited from class org.eclipse.jface.preference.FieldEditor
applyFont, checkParent, clearErrorMessage, clearMessage, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, createControl, dispose, fillIntoGrid, fireStateChanged, fireValueChanged, getFieldEditorFontName, getLabelControl, getLabelControl, getLabelText, getPage, getPreferenceName, getPreferencePage, getPreferenceStore, init, load, loadDefault, presentsDefaultValue, setButtonLayoutData, setLabelText, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage, store
-
Constructor Details
-
DirectoryFieldEditor
protected DirectoryFieldEditor()Creates a new directory field editor -
DirectoryFieldEditor
Creates a directory field editor.- Parameters:
name- the name of the preference this field editor works onlabelText- the label text of the field editorparent- the parent of the field editor's control
-
-
Method Details
-
changePressed
Description copied from class:StringButtonFieldEditorNotifies 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:
changePressedin classStringButtonFieldEditor- Returns:
- the new string to display, or
nullto leave the old string showing
-
doCheckState
protected boolean doCheckState()Description copied from class:StringFieldEditorHook 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:
doCheckStatein classStringFieldEditor- Returns:
trueif the field value is valid, andfalseif invalid
-
setFilterPath
Sets the initial path for the Browse dialog.- Parameters:
path- initial path for the Browse dialog- Since:
- 3.6
-