|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.eclipse.jface.preference.FieldEditor
org.eclipse.ui.ide.dialogs.AbstractEncodingFieldEditor
org.eclipse.ui.ide.dialogs.ResourceEncodingFieldEditor
public final class ResourceEncodingFieldEditor
The ResourceEncodingFieldEditor is a field editor for editing the encoding of a resource and does not use a preference store.
This class may be instantiated; it is not intended to be subclassed.
| Field Summary |
|---|
| Fields inherited from class org.eclipse.jface.preference.FieldEditor |
|---|
HORIZONTAL_GAP, IS_VALID, VALUE |
| Constructor Summary | |
|---|---|
ResourceEncodingFieldEditor(String labelText,
Composite parent,
IResource charsetResource)
Creates a new encoding field editor for setting the encoding on the given resource. |
|
ResourceEncodingFieldEditor(String labelText,
Composite parent,
IResource charsetResource,
String groupTitle)
Creates a new encoding field editor for setting the encoding on the given resource. |
|
| Method Summary | |
|---|---|
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 |
doLoadDefault()
Initializes this field editor with the default preference value from the preference store. |
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 |
setEnabled(boolean enabled,
Composite parent)
Set whether or not the controls in the field editor are enabled. |
void |
store()
Stores this field editor's value back into the preference store. |
| Methods inherited from class org.eclipse.ui.ide.dialogs.AbstractEncodingFieldEditor |
|---|
adjustForNumColumns, doFillIntoGrid, doLoad, getDefaultEnc, getNumberOfControls, getSelectedEncoding, hasSameEncoding, isValid, refreshValidState, setGroupTitle, setPreferenceStore |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
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()
public ResourceEncodingFieldEditor(String labelText,
Composite parent,
IResource charsetResource,
String groupTitle)
labelText - the label text of the field editorparent - the parent of the field editor's controlcharsetResource - must be an IContainer or an IFile.groupTitle - the title for the field editor's control. If groupTitle is
null the control will be unlabelled
(by default a Composite instead of a Group.IContainer.getDefaultCharset(),
IFile.getCharset(),
AbstractEncodingFieldEditor.setGroupTitle(String)| Method Detail |
|---|
protected String getStoredValue()
AbstractEncodingFieldEditor
getStoredValue in class AbstractEncodingFieldEditorprotected void doStore()
FieldEditorSubclasses must implement this method to save the entered value into the preference store.
doStore in class FieldEditorpublic void store()
FieldEditor
store in class FieldEditorpublic void load()
FieldEditor
load in class FieldEditorpublic void loadDefault()
FieldEditor
loadDefault in class FieldEditorprotected void doLoadDefault()
FieldEditorSubclasses must implement this method to properly initialize the field editor.
doLoadDefault in class AbstractEncodingFieldEditorprotected String findDefaultEncoding()
AbstractEncodingFieldEditor
findDefaultEncoding in class AbstractEncodingFieldEditorprotected String defaultButtonText()
AbstractEncodingFieldEditor
defaultButtonText in class AbstractEncodingFieldEditor
protected Composite createEncodingGroup(Composite parent,
int numColumns)
AbstractEncodingFieldEditorSubclasses may extend.
createEncodingGroup in class AbstractEncodingFieldEditorparent - the parent widgetnumColumns - the number of columns in the parent
public void setEnabled(boolean enabled,
Composite parent)
FieldEditor
setEnabled in class AbstractEncodingFieldEditorenabled - The enabled state.parent - The parent of the controls in the group.
Used to create the controls if required.
|
Eclipse Platform Release 3.7 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Guidelines for using Eclipse APIs.
Copyright (c) Eclipse contributors and others 2000, 2011. All rights reserved.