Package adams.gui.goe
Class AbstractNumberEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.AbstractBasicTypePropertyEditor
-
- adams.gui.goe.AbstractNumberEditor
-
- All Implemented Interfaces:
HelpProvider
,PropertyEditor
- Direct Known Subclasses:
AbstractFloatingPointNumberEditor
,AbstractIntegralNumberEditor
public abstract class AbstractNumberEditor extends AbstractBasicTypePropertyEditor
An abstract ancestor for custom editors for numbers.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
Fields Modifier and Type Field Description protected Number
m_CurrentValue
the current value.protected Number
m_DefaultValue
the default value.protected Number
m_LowerBound
the lower bound.protected Number
m_UpperBound
the upper bound.-
Fields inherited from class adams.gui.goe.AbstractPropertyEditorSupport
APPROVE_OPTION, CANCEL_OPTION, EMPTY, m_ChosenOption, m_CustomEditor, m_WindowAdapter, NULL
-
-
Constructor Summary
Constructors Constructor Description AbstractNumberEditor()
Initializes the editor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Number
getDefaultValue()
Returns the default value.Number
getLowerBound()
Returns the optional lower bound.Number
getUpperBound()
Returns the optional upper bound.void
setDefaultValue(Number value)
Sets the default value.void
setLowerBound(Number value)
Sets the optional lower bound.void
setUpperBound(Number upper)
Sets the optional upper bound.protected abstract void
updateBounds()
Updates the bounds.-
Methods inherited from class adams.gui.goe.AbstractBasicTypePropertyEditor
createCustomEditor, getAsText, initForDisplay, isPaintable, paintValue, parse, setAsText, toString
-
Methods inherited from class adams.gui.goe.AbstractPropertyEditorSupport
addWindowAdapter, cleanUp, closeDialog, createPopup, createTipText, createWindowAdapter, getChosenOption, getCustomEditor, getHelpDescription, getHelpIcon, getHelpTitle, getHelpURL, getParentDialog, getParentFrame, initialize, resetChosenOption, setValue, supportsCustomEditor
-
Methods inherited from class java.beans.PropertyEditorSupport
addPropertyChangeListener, firePropertyChange, getJavaInitializationString, getSource, getTags, getValue, removePropertyChangeListener, setSource
-
-
-
-
Field Detail
-
m_CurrentValue
protected Number m_CurrentValue
the current value.
-
m_DefaultValue
protected Number m_DefaultValue
the default value. May get ignored by the concrete editor.
-
m_LowerBound
protected Number m_LowerBound
the lower bound.
-
m_UpperBound
protected Number m_UpperBound
the upper bound.
-
-
Method Detail
-
setDefaultValue
public void setDefaultValue(Number value)
Sets the default value. May get ignored by the concrete editor.- Parameters:
value
- the default value
-
getDefaultValue
public Number getDefaultValue()
Returns the default value.- Returns:
- the default value
-
setLowerBound
public void setLowerBound(Number value)
Sets the optional lower bound.- Parameters:
value
- the lower bound to use, use null to use no bound
-
getLowerBound
public Number getLowerBound()
Returns the optional lower bound.- Returns:
- the lower bound, can be null if none set
-
setUpperBound
public void setUpperBound(Number upper)
Sets the optional upper bound.- Parameters:
upper
- the upper bound to use, use null to use no bound
-
getUpperBound
public Number getUpperBound()
Returns the optional upper bound.- Returns:
- the upper bound, can be null if none set
-
updateBounds
protected abstract void updateBounds()
Updates the bounds.
-
-