Package adams.gui.goe
Class AbstractFloatingPointNumberEditor
- java.lang.Object
-
- java.beans.PropertyEditorSupport
-
- adams.gui.goe.AbstractPropertyEditorSupport
-
- adams.gui.goe.AbstractBasicTypePropertyEditor
-
- adams.gui.goe.AbstractNumberEditor
-
- adams.gui.goe.AbstractFloatingPointNumberEditor
-
- All Implemented Interfaces:
HelpProvider
,PropertyEditor
- Direct Known Subclasses:
DoubleEditor
,FloatEditor
public abstract class AbstractFloatingPointNumberEditor extends AbstractNumberEditor
An abstract ancestor for custom editors for floating point numbers, like floats and doubles.- Version:
- $Revision$
- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
-
Fields inherited from class adams.gui.goe.AbstractNumberEditor
m_CurrentValue, m_DefaultValue, m_LowerBound, m_UpperBound
-
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 AbstractFloatingPointNumberEditor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected NumberTextField.BoundedNumberCheckModel
createCheckModel()
Returns the check model to use, based on the type of number.protected JComponent
createCustomEditor()
Creates the custom editor to use.protected abstract NumberTextField.Type
getType()
Returns the type of number to check for.protected void
updateBounds()
Updates the bounds.-
Methods inherited from class adams.gui.goe.AbstractNumberEditor
getDefaultValue, getLowerBound, getUpperBound, setDefaultValue, setLowerBound, setUpperBound
-
Methods inherited from class adams.gui.goe.AbstractBasicTypePropertyEditor
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
-
-
-
-
Method Detail
-
getType
protected abstract NumberTextField.Type getType()
Returns the type of number to check for.- Returns:
- the type of number
-
createCheckModel
protected NumberTextField.BoundedNumberCheckModel createCheckModel()
Returns the check model to use, based on the type of number. Also sets the bounds in the check model.- Returns:
- the check model
- See Also:
getType()
,AbstractNumberEditor.getLowerBound()
,AbstractNumberEditor.getUpperBound()
,AbstractNumberEditor.getDefaultValue()
-
updateBounds
protected void updateBounds()
Updates the bounds. Creates a new check model and sets this.- Specified by:
updateBounds
in classAbstractNumberEditor
- See Also:
createCheckModel()
-
createCustomEditor
protected JComponent createCustomEditor()
Creates the custom editor to use.- Overrides:
createCustomEditor
in classAbstractBasicTypePropertyEditor
- Returns:
- the custom editor
-
-