|
Runtime | ||||||||||
| 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.gmf.runtime.common.ui.preferences.FontFieldEditor
A field editor for a font type preference. Very similar to the org.eclipse.jface.preference.FontFieldEditor. The difference is that the ability to change the selected font without a user action (using the change font button) is provided. Subclassing from the jface FontFieldEditor was not an option because the needed methods and instance variables were private.
| Field Summary |
| Fields inherited from class org.eclipse.jface.preference.FieldEditor |
HORIZONTAL_GAP, IS_VALID, VALUE |
| Constructor Summary | |
FontFieldEditor(java.lang.String name,
java.lang.String labelText,
Composite parent)
Creates a font field editor without a preview. |
|
FontFieldEditor(java.lang.String name,
java.lang.String labelText,
java.lang.String previewAreaText,
Composite parent)
Creates a font field editor with an optional preview area. |
|
| Method Summary | |
protected void |
adjustForNumColumns(int numColumns)
|
protected void |
applyFont()
|
protected void |
doFillIntoGrid(Composite parent,
int numColumns)
|
protected void |
doLoad()
|
protected void |
doLoadDefault()
|
protected void |
doStore()
|
protected Button |
getChangeControl(Composite parent)
Returns the change button for this field editor. |
int |
getNumberOfControls()
|
int |
getPreferredPreviewHeight()
Returns the preferred preview height. |
Control |
getPreviewControl()
Returns the preview control for this field editor. |
protected Label |
getValueControl(Composite parent)
Returns the value control for this field editor. |
void |
setChangeButtonText(java.lang.String text)
Sets the text of the change button. |
void |
setEnabled(boolean enabled,
Composite parent)
|
void |
setFont(FontData newFont)
Sets the displayed/selected font to be the font for FontData newFont. |
protected void |
setToDefault()
Store the default preference for the field being edited |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FontFieldEditor(java.lang.String name,
java.lang.String labelText,
java.lang.String previewAreaText,
Composite parent)
name - the name of the preference this field editor works onlabelText - the label text of the field editorpreviewAreaText - the text used for the preview window. If it is
null there will be no preview area,parent - the parent of the field editor's control
public FontFieldEditor(java.lang.String name,
java.lang.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 control| Method Detail |
protected void adjustForNumColumns(int numColumns)
protected void applyFont()
protected void doFillIntoGrid(Composite parent,
int numColumns)
protected void doLoad()
protected void doLoadDefault()
protected void doStore()
protected Button getChangeControl(Composite parent)
parent - The Composite to create the button in if required.
public int getNumberOfControls()
public int getPreferredPreviewHeight()
-1 if no previewer
is installedpublic Control getPreviewControl()
protected Label getValueControl(Composite parent)
parent - The Composite to create the viewer in if required
public void setChangeButtonText(java.lang.String text)
text - the new textprotected void setToDefault()
public void setEnabled(boolean enabled,
Composite parent)
public void setFont(FontData newFont)
newFont -
|
Runtime | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
Guidelines for using Eclipse APIs.
Copyright (c) IBM Corp., Borland Software Corp., and others 2005,2006. All rights reserved.