public final class ResourceEncodingFieldEditor extends AbstractEncodingFieldEditor
This class may be instantiated; it is not intended to be subclassed.
HORIZONTAL_GAP, IS_VALID, VALUE
Constructor and Description |
---|
ResourceEncodingFieldEditor(String labelText,
Composite parent,
IResource charsetResource)
Creates a new encoding field editor for setting the encoding on the given
resource.
|
Modifier and Type | Method and Description |
---|---|
protected Composite |
createEncodingGroup(Composite parent,
int numColumns)
Creates a composite with all the encoding controls.
|
protected String |
defaultButtonText()
Returns the text for the default encoding button.
|
protected void |
doStore()
Stores the preference value from this field editor into
the preference store.
|
protected String |
findDefaultEncoding()
Returns the default encoding for the object being shown.
|
protected String |
getStoredValue()
Returns the value that is currently stored for the encoding.
|
void |
load()
Initializes this field editor with the preference value from
the preference store.
|
void |
loadDefault()
Initializes this field editor with the default preference value
from the preference store.
|
void |
store()
Stores this field editor's value back into the preference store.
|
adjustForNumColumns, doFillIntoGrid, doLoad, doLoadDefault, getDefaultEnc, getNumberOfControls, getSelectedEncoding, hasSameEncoding, isValid, refreshValidState, setPreferenceStore
applyFont, checkParent, clearErrorMessage, clearMessage, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, createControl, dispose, fillIntoGrid, fireStateChanged, fireValueChanged, getFieldEditorFontName, getLabelControl, getLabelControl, getLabelText, getPage, getPreferenceName, getPreferencePage, getPreferenceStore, init, presentsDefaultValue, setButtonLayoutData, setEnabled, setFocus, setLabelText, setPage, setPreferenceName, setPreferencePage, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage
public ResourceEncodingFieldEditor(String labelText, Composite parent, IResource charsetResource)
labelText
- the label text of the field editorparent
- the parent of the field editor's controlcharsetResource
- must be an IContainer
or an IFile
.IContainer.getDefaultCharset()
,
IFile.getCharset()
protected String getStoredValue()
AbstractEncodingFieldEditor
getStoredValue
in class AbstractEncodingFieldEditor
protected void doStore()
FieldEditor
Subclasses must implement this method to save the entered value into the preference store.
doStore
in class FieldEditor
public void store()
FieldEditor
store
in class FieldEditor
public void load()
FieldEditor
load
in class FieldEditor
public void loadDefault()
FieldEditor
loadDefault
in class FieldEditor
protected String findDefaultEncoding()
AbstractEncodingFieldEditor
findDefaultEncoding
in class AbstractEncodingFieldEditor
protected String defaultButtonText()
AbstractEncodingFieldEditor
defaultButtonText
in class AbstractEncodingFieldEditor
protected Composite createEncodingGroup(Composite parent, int numColumns)
AbstractEncodingFieldEditor
Subclasses may extend.
createEncodingGroup
in class AbstractEncodingFieldEditor
parent
- the parent widgetnumColumns
- the number of columns in the parentGuidelines for using Eclipse APIs. Copyright (c) IBM Corp. and others 2000, 2006. All rights reserved.