Package noaa.coastwatch.gui.visual
Class VisualInteger
java.lang.Object
noaa.coastwatch.gui.visual.AbstractVisualObject
noaa.coastwatch.gui.visual.VisualInteger
- All Implemented Interfaces:
ComponentProducer
,VisualObject
The
VisualInteger
class represents an Integer as a
spinner. When the spinner is modified, the Integer changes value.- Since:
- 3.1.7
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from class noaa.coastwatch.gui.visual.AbstractVisualObject
VALUE_PROPERTY
-
Constructor Summary
ConstructorDescriptionVisualInteger
(Integer value) Creates a new visual Integer object using the specified Integer. -
Method Summary
Modifier and TypeMethodDescriptionGets the button used to represent the Integer.getValue()
Gets the Integer value.static void
Tests this class.void
setRestrictions
(Object restrict) Sets restrictions on the allowed integer values.Methods inherited from class noaa.coastwatch.gui.visual.AbstractVisualObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, hasChooser, refreshComponent, showChooser
-
Constructor Details
-
VisualInteger
Creates a new visual Integer object using the specified Integer.
-
-
Method Details
-
getComponent
Gets the button used to represent the Integer. -
getValue
Gets the Integer value.- Returns:
- the value that this visual object currently holds.
-
setRestrictions
Sets restrictions on the allowed integer values.- Specified by:
setRestrictions
in interfaceVisualObject
- Overrides:
setRestrictions
in classAbstractVisualObject
- Parameters:
restrict
- the Integer[] restriction array as [min, max, step].
-
main
Tests this class.- Parameters:
argv
- the array of command line parameters.
-