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
ConstructorsConstructorDescriptionVisualChoice(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 voidTests this class.voidsetRestrictions(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:
setRestrictionsin interfaceVisualObject- Overrides:
setRestrictionsin classAbstractVisualObject- Parameters:
restrict- theListof values that are allowed.
-
main
Tests this class.- Parameters:
argv- the array of command line parameters.
-