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,PropertyEditorWithConstraint<NumericBounds>,PropertyEditorWithDefaultValue,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.- Author:
- fracpete (fracpete at waikato dot ac dot nz)
-
-
Field Summary
-
Fields inherited from class adams.gui.goe.AbstractNumberEditor
m_Constraint, m_CurrentValue, m_DefaultValue
-
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.BoundedNumberCheckModelcreateCheckModel()Returns the check model to use, based on the type of number.protected JComponentcreateCustomEditor()Creates the custom editor to use.protected abstract NumberTextField.TypegetType()Returns the type of number to check for.protected voidupdateBounds()Updates the bounds.-
Methods inherited from class adams.gui.goe.AbstractNumberEditor
getConstraint, getDefaultValue, setConstraint, setDefaultValue
-
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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, getAsText, getCustomEditor, getJavaInitializationString, getTags, getValue, isPaintable, paintValue, removePropertyChangeListener, setAsText, setValue, supportsCustomEditor
-
-
-
-
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.getConstraint(),AbstractNumberEditor.getDefaultValue()
-
updateBounds
protected void updateBounds()
Updates the bounds. Creates a new check model and sets this.- Specified by:
updateBoundsin classAbstractNumberEditor- See Also:
createCheckModel()
-
createCustomEditor
protected JComponent createCustomEditor()
Creates the custom editor to use.- Overrides:
createCustomEditorin classAbstractBasicTypePropertyEditor- Returns:
- the custom editor
-
-