|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.eclipse.jface.preference.FieldEditor | +--org.eclipse.jface.preference.StringFieldEditor | +--org.eclipse.jface.preference.IntegerFieldEditor
A field editor for an integer type preference.
Field Summary |
Fields inherited from class org.eclipse.jface.preference.StringFieldEditor |
UNLIMITED, VALIDATE_ON_FOCUS_LOST, VALIDATE_ON_KEY_STROKE |
Fields inherited from class org.eclipse.jface.preference.FieldEditor |
HORIZONTAL_GAP, IS_VALID, VALUE |
Constructor Summary | |
protected |
IntegerFieldEditor()
Creates a new integer field editor |
|
IntegerFieldEditor(String name,
String labelText,
Composite parent)
Creates an integer field editor. |
Method Summary | |
protected boolean |
checkState()
Checks whether the text input field contains a valid value or not. |
protected void |
doLoad()
Initializes this field editor with the preference value from the preference store. |
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. |
int |
getIntValue()
Returns this field editor's current value as an integer. |
void |
setValidRange(int min,
int max)
Sets the range of valid values for this field. |
Methods inherited from class org.eclipse.jface.preference.StringFieldEditor |
adjustForNumColumns, doCheckState, doFillIntoGrid, getErrorMessage, getNumberOfControls, getStringValue, getTextControl, getTextControl, isEmptyStringAllowed, isValid, refreshValidState, setEmptyStringAllowed, setErrorMessage, setFocus, setStringValue, setTextLimit, setValidateStrategy, showErrorMessage, valueChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
protected IntegerFieldEditor()
public IntegerFieldEditor(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 controlMethod Detail |
public void setValidRange(int min, int max)
min
- the minimum allowed value (inclusive)max
- the maximum allowed value (inclusive)protected boolean checkState()
StringFieldEditor
checkState
in class StringFieldEditor
true
if the field value is valid,
and false
if invalidprotected void doLoad()
FieldEditor
Subclasses must implement this method to properly initialize the field editor.
doLoad
in class StringFieldEditor
protected void doLoadDefault()
FieldEditor
Subclasses must implement this method to properly initialize the field editor.
doLoadDefault
in class StringFieldEditor
protected void doStore()
FieldEditor
Subclasses must implement this method to save the entered value into the preference store.
doStore
in class StringFieldEditor
public int getIntValue() throws NumberFormatException
NumberFormatException
- if the String
does not
contain a parsable integer
|
Eclipse Platform 2.0 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |