de.cau.cs.kieler.core.ui.util
Class DoubleFieldEditor

java.lang.Object
  extended by org.eclipse.jface.preference.FieldEditor
      extended by org.eclipse.jface.preference.StringFieldEditor
          extended by de.cau.cs.kieler.core.ui.util.DoubleFieldEditor

public class DoubleFieldEditor
extends StringFieldEditor

Field editor for input of double values.

Rating proposed yellow
(2009-12-11) msp

Field Summary
 
Fields inherited from class org.eclipse.jface.preference.StringFieldEditor
oldValue, 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
DoubleFieldEditor(String name, String labelText, Composite parent)
          Creates a new Double Field Editor.
 
Method Summary
protected  boolean checkState()
          
protected  void doLoad()
          
protected  void doLoadDefault()
          
protected  void doStore()
          
 double getDoubleValue()
          Returns this field editor's current value as an integer.
 void setValidRange(double thelowerBound, double theupperBound)
          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, setEnabled, setErrorMessage, setFocus, setStringValue, setTextLimit, setValidateStrategy, showErrorMessage, valueChanged
 
Methods inherited from class org.eclipse.jface.preference.FieldEditor
applyFont, checkParent, clearErrorMessage, clearMessage, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, createControl, dispose, fillIntoGrid, fireStateChanged, fireValueChanged, getFieldEditorFontName, getLabelControl, getLabelControl, getLabelText, getPage, getPreferenceName, getPreferencePage, getPreferenceStore, init, load, loadDefault, presentsDefaultValue, setButtonLayoutData, setLabelText, setPage, setPreferenceName, setPreferencePage, setPreferenceStore, setPresentsDefaultValue, setPropertyChangeListener, showErrorMessage, showMessage, store
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleFieldEditor

public DoubleFieldEditor(String name,
                         String labelText,
                         Composite parent)
Creates a new Double Field Editor.

Parameters:
name - the name of the preference this field editor works on
labelText - the label text of the field editor
parent - the parent of the field editor's control
Method Detail

setValidRange

public void setValidRange(double thelowerBound,
                          double theupperBound)
Sets the range of valid values for this field.

Parameters:
thelowerBound - the minimum allowed value (inclusive)
theupperBound - the maximum allowed value (inclusive)

checkState

protected boolean checkState()

Overrides:
checkState in class StringFieldEditor

doLoad

protected void doLoad()

Overrides:
doLoad in class StringFieldEditor

doLoadDefault

protected void doLoadDefault()

Overrides:
doLoadDefault in class StringFieldEditor

doStore

protected void doStore()

Overrides:
doStore in class StringFieldEditor

getDoubleValue

public double getDoubleValue()
Returns this field editor's current value as an integer.

Returns:
the value