Package noaa.coastwatch.gui.visual
Class VisualChoice
java.lang.Object
noaa.coastwatch.gui.visual.AbstractVisualObject
noaa.coastwatch.gui.visual.VisualChoice
- All Implemented Interfaces:
ComponentProducer
,VisualObject
The
VisualChoice
class represents a value choice as a
combo box. When the combo box selection is modified, the value is
changed.- Since:
- 3.1.7
- Author:
- Peter Hollemans
-
Field Summary
Fields inherited from class noaa.coastwatch.gui.visual.AbstractVisualObject
VALUE_PROPERTY
-
Constructor Summary
ConstructorDescriptionVisualChoice
(Object value) Creates a new visual choice object using the specified value. -
Method Summary
Modifier and TypeMethodDescriptionGets the field used to represent the string.getValue()
Gets the choice value value.static void
Tests this class.void
setRestrictions
(Object restrict) Sets restrictions on the allowed choice values.Methods inherited from class noaa.coastwatch.gui.visual.AbstractVisualObject
addPropertyChangeListener, firePropertyChange, firePropertyChange, hasChooser, refreshComponent, showChooser
-
Constructor Details
-
VisualChoice
Creates a new visual choice object using the specified value.
-
-
Method Details
-
getComponent
Gets the field used to represent the string. -
getValue
Gets the choice value value.- Returns:
- the value that this visual object currently holds.
-
setRestrictions
Sets restrictions on the allowed choice values.- Specified by:
setRestrictions
in interfaceVisualObject
- Overrides:
setRestrictions
in classAbstractVisualObject
- Parameters:
restrict
- theList
of values that are allowed.
-
main
Tests this class.- Parameters:
argv
- the array of command line parameters.
-