Package org.eclipse.jface.preference
Class FileFieldEditor
java.lang.Object
org.eclipse.jface.preference.FieldEditor
org.eclipse.jface.preference.StringFieldEditor
org.eclipse.jface.preference.StringButtonFieldEditor
org.eclipse.jface.preference.FileFieldEditor
A field editor for a file path type preference. A standard file
 dialog appears when the user presses the change button.
- 
Field SummaryFields inherited from class org.eclipse.jface.preference.StringFieldEditoroldValue, UNLIMITED, VALIDATE_ON_FOCUS_LOST, VALIDATE_ON_KEY_STROKEFields inherited from class org.eclipse.jface.preference.FieldEditorHORIZONTAL_GAP, IS_VALID, VALUE
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedCreates a new file field editorFileFieldEditor(String name, String labelText, boolean enforceAbsolute, int validationStrategy, Composite parent) Creates a file field editor.FileFieldEditor(String name, String labelText, boolean enforceAbsolute, Composite parent) Creates a file field editor.FileFieldEditor(String name, String labelText, Composite parent) Creates a file field editor.
- 
Method SummaryModifier and TypeMethodDescriptionprotected StringNotifies that this field editor's change button has been pressed.protected booleanChecks whether the text input field contains a valid value or not.voidsetFileExtensions(String[] extensions) Sets this file field editor's file extension filter.voidsetFilterPath(File path) Sets the initial path for the Browse dialog.Methods inherited from class org.eclipse.jface.preference.StringButtonFieldEditoradjustForNumColumns, doFillIntoGrid, getChangeControl, getNumberOfControls, getShell, setChangeButtonText, setEnabledMethods inherited from class org.eclipse.jface.preference.StringFieldEditorcreateTextWidget, doCheckState, 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.FieldEditorapplyFont, 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- 
FileFieldEditorprotected FileFieldEditor()Creates a new file field editor
- 
FileFieldEditorCreates a file 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
 
- 
FileFieldEditorCreates a file field editor.- Parameters:
- name- the name of the preference this field editor works on
- labelText- the label text of the field editor
- enforceAbsolute-- trueif the file path must be absolute, and- falseotherwise
- parent- the parent of the field editor's control
 
- 
FileFieldEditorpublic FileFieldEditor(String name, String labelText, boolean enforceAbsolute, int validationStrategy, Composite parent) Creates a file field editor.- Parameters:
- name- the name of the preference this field editor works on
- labelText- the label text of the field editor
- enforceAbsolute-- trueif the file path must be absolute, and- falseotherwise
- validationStrategy- either- StringFieldEditor.VALIDATE_ON_KEY_STROKEto perform on the fly checking, or- StringFieldEditor.VALIDATE_ON_FOCUS_LOST(the default) to perform validation only after the text has been typed in
- parent- the parent of the field editor's control.
- Since:
- 3.4
- See Also:
 
 
- 
- 
Method Details- 
changePressedDescription 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 class- StringButtonFieldEditor
- Returns:
- the new string to display, or nullto leave the old string showing
 
- 
checkStateprotected boolean checkState()Description copied from class:StringFieldEditorChecks whether the text input field contains a valid value or not.- Overrides:
- checkStatein class- StringFieldEditor
- Returns:
- trueif the field value is valid, and- falseif invalid
 
- 
setFileExtensionsSets this file field editor's file extension filter.- Parameters:
- extensions- a list of file extension, or- nullto set the filter to the system's default value
 
- 
setFilterPathSets the initial path for the Browse dialog.- Parameters:
- path- initial path for the Browse dialog
- Since:
- 3.6
 
 
-