public class FileFieldEditor extends StringButtonFieldEditor
oldValue, UNLIMITED, VALIDATE_ON_FOCUS_LOST, VALIDATE_ON_KEY_STROKE
HORIZONTAL_GAP, IS_VALID, VALUE
Modifier | Constructor and Description |
---|---|
protected |
FileFieldEditor()
Creates a new file field editor
|
|
FileFieldEditor(String name,
String labelText,
boolean enforceAbsolute,
Composite parent)
Creates a file field editor.
|
|
FileFieldEditor(String name,
String labelText,
boolean enforceAbsolute,
int validationStrategy,
Composite parent)
Creates a file field editor.
|
|
FileFieldEditor(String name,
String labelText,
Composite parent)
Creates a file field editor.
|
Modifier and Type | Method and Description |
---|---|
protected String |
changePressed()
Notifies that this field editor's change button has been pressed.
|
protected boolean |
checkState()
Checks whether the text input field contains a valid value or not.
|
void |
setFileExtensions(String[] extensions)
Sets this file field editor's file extension filter.
|
void |
setFilterPath(File path)
Sets the initial path for the Browse dialog.
|
adjustForNumColumns, doFillIntoGrid, getChangeControl, getNumberOfControls, getShell, setChangeButtonText, setEnabled
doCheckState, doLoad, doLoadDefault, doStore, getErrorMessage, getStringValue, getTextControl, getTextControl, isEmptyStringAllowed, isValid, refreshValidState, setEmptyStringAllowed, setErrorMessage, setFocus, setStringValue, setTextLimit, setValidateStrategy, showErrorMessage, valueChanged
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
protected FileFieldEditor()
public FileFieldEditor(String name, String labelText, Composite parent)
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 controlpublic FileFieldEditor(String name, String labelText, boolean enforceAbsolute, Composite parent)
name
- the name of the preference this field editor works onlabelText
- the label text of the field editorenforceAbsolute
- true
if the file path
must be absolute, and false
otherwiseparent
- the parent of the field editor's controlpublic FileFieldEditor(String name, String labelText, boolean enforceAbsolute, int validationStrategy, Composite parent)
name
- the name of the preference this field editor works onlabelText
- the label text of the field editorenforceAbsolute
- true
if the file path
must be absolute, and false
otherwisevalidationStrategy
- either StringFieldEditor.VALIDATE_ON_KEY_STROKE
to perform on the fly checking, or StringFieldEditor.VALIDATE_ON_FOCUS_LOST
(the default) to perform validation only after the text has been typed inparent
- the parent of the field editor's control.StringFieldEditor.VALIDATE_ON_KEY_STROKE
,
StringFieldEditor.VALIDATE_ON_FOCUS_LOST
protected String changePressed()
StringButtonFieldEditor
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.
changePressed
in class StringButtonFieldEditor
null
to leave the
old string showingprotected boolean checkState()
StringFieldEditor
checkState
in class StringFieldEditor
true
if the field value is valid,
and false
if invalidpublic void setFileExtensions(String[] extensions)
extensions
- a list of file extension, or null
to set the filter to the system's default valuepublic void setFilterPath(File path)
path
- initial path for the Browse dialog
Copyright (c) 2000, 2017 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.