|
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.ComboFieldEditor
Constructs a field editor with a label and a drop down combo box.
| Field Summary | |
boolean |
autoStorage
True for automatically loading and storing and false for manual loading and storing of values in the combo box. |
protected Combo |
combo
The combo box control. |
protected int |
indent
Indent of controls |
protected java.util.ArrayList |
indexToValue
Index of list contains value of preference to store |
static int |
INT_TYPE
INT_TYPE saves the index. |
static int |
INT_TYPE_INDEXED
INT_TYPE_INDEXED saves an associated value for the index value |
protected boolean |
readOnly
Whether you can type into the combo box |
protected boolean |
separateLine
Whether the label and combo should be on separate lines |
static int |
STRING_TYPE
STRING_TYPE saves the actual string. |
protected int |
type
The type that was chosen for saving preferences |
protected int |
width
Width of combo box. |
| Fields inherited from class org.eclipse.jface.preference.FieldEditor |
HORIZONTAL_GAP, IS_VALID, VALUE |
| Constructor Summary | |
ComboFieldEditor(java.lang.String name,
java.lang.String labelText,
Composite parent)
Constructor to create the combo field editor |
|
ComboFieldEditor(java.lang.String name,
java.lang.String labelText,
Composite parent,
int aType,
boolean aSeparateLine,
int anIndent,
int aWidth,
boolean aReadOnly)
Constructor to create the combo field editor |
|
| Method Summary | |
void |
addIndexedItemToCombo(java.lang.String stringValue,
int storeValue)
Adds an item to the combo. |
protected void |
adjustForNumColumns(int numColumns)
|
protected void |
doFillIntoGrid(Composite parent,
int numColumns)
|
protected void |
doLoad()
|
protected void |
doLoadDefault()
|
protected void |
doStore()
|
boolean |
existsInCombo(java.lang.String value)
Returns whether or not the given string is already in the combo box. |
Combo |
getComboControl()
Returns the actual combo box contained in the field editor. |
int |
getNumberOfControls()
Returns the number of controls in this editor |
java.lang.String |
getStringValue()
Returns this field editor's current value. |
void |
setAutoStorage(boolean anAutoStorage)
Sets the automatic loading and storing of contents for the combo box. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected boolean separateLine
protected boolean readOnly
protected int indent
protected int width
protected Combo combo
public static final int STRING_TYPE
public static final int INT_TYPE
public static final int INT_TYPE_INDEXED
protected int type
protected java.util.ArrayList indexToValue
public boolean autoStorage
| Constructor Detail |
public ComboFieldEditor(java.lang.String name,
java.lang.String labelText,
Composite parent)
name - String containing unique name of field editorlabelText - String containing text to displayparent - Composite the parent composite that contains this field editor
public ComboFieldEditor(java.lang.String name,
java.lang.String labelText,
Composite parent,
int aType,
boolean aSeparateLine,
int anIndent,
int aWidth,
boolean aReadOnly)
name - String containing unique name of field editorlabelText - String containing text to displayparent - Composite the parent composite that contains this field editoraType - int, either INT_TYPE or STRING_TYPE which describes the way
that we will be saving preferences. INT_TYPE will save
according to the index and STRING_TYPE will save the actual
string.aSeparateLine - boolean. Set to true to make labelText and the combo appear on
separate lines. Set to false to make labelText appear to the
left of the combo box.anIndent - How much to indent on the left side.aWidth - is the width of the combo.aReadOnly - true to be read only, false to be read write| Method Detail |
protected void adjustForNumColumns(int numColumns)
protected void doFillIntoGrid(Composite parent,
int numColumns)
protected void doLoad()
protected void doLoadDefault()
protected void doStore()
public java.lang.String getStringValue()
public int getNumberOfControls()
public Combo getComboControl()
public boolean existsInCombo(java.lang.String value)
value - the String to check
public void setAutoStorage(boolean anAutoStorage)
anAutoStorage - true for automatically loading and storing and false for
manual loading and storing
public void addIndexedItemToCombo(java.lang.String stringValue,
int storeValue)
stringValue - String value of the itemstoreValue - int value of the item
|
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.