Package edu.wisc.ssec.mcidasv.control
Class LinearCombo.Selector
java.lang.Object
edu.wisc.ssec.mcidasv.control.LinearCombo.JythonThing
edu.wisc.ssec.mcidasv.control.LinearCombo.Selector
- Enclosing class:
LinearCombo
Selectors are objects that allow users to select a given wavenumber/band
by simply dragging within the GUI.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ConstantMap[]
private Console
private HydraControl
private Data
private MultiSpectralDisplay
private final String
private float
Fields inherited from class edu.wisc.ssec.mcidasv.control.LinearCombo.JythonThing
jythonNames
-
Constructor Summary
ConstructorsConstructorDescriptionSelector
(float waveNumber, ConstantMap[] color, HydraControl control, Console console) Create a new Selector. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Attempts to associate a Jython "variable"/"name" with this Selector.void
Resets the known names of a Selector.getColor()
Returns the color associated with thisSelector
.getData()
Returns the data selected by the location of thisSelector
.getId()
Returns an identifier for thisSelector
.getName()
Returns a Jython name associated with this Selector.getNames()
Returns the known Jython names associated with this Selector.float
Returns the "selected" wave number associated with thisSelector
.boolean
removeName
(String name) Attempts removal of a known name for the current Selector.void
setWaveNumber
(float newWaveNumber) Changes the "selected" wave number to the given value.toString()
Returns aString
representation of the relevant information "stored" by thisSelector
.
-
Field Details
-
ID
-
waveNumber
-
color
-
console
-
control
-
data
-
display
-
-
Constructor Details
-
Selector
Create a new Selector.- Parameters:
waveNumber
- Initial "wave number (or band)" of the Selector.color
- RGB triple that will be the color of the Selector.control
- Control that created the Selector.console
- Console that created the Selector.
-
-
Method Details
-
removeName
Attempts removal of a known name for the current Selector.- Specified by:
removeName
in classLinearCombo.JythonThing
- Parameters:
name
- Name (within Jython namespace) to remove.- Returns:
true
if removal was successful,false
otherwise.
-
getNames
Returns the known Jython names associated with this Selector.- Specified by:
getNames
in classLinearCombo.JythonThing
- Returns:
- "Names" (aka variables) in a Jython namespace that
refer to this Selector. Collection may be empty, but never
null
.
-
clearNames
Resets the known names of a Selector. -
addName
Attempts to associate a Jython "variable"/"name" with this Selector.- Specified by:
addName
in classLinearCombo.JythonThing
- Parameters:
name
- Name used within the Jython namespace. Cannot benull
.- Returns:
true
ifname
was successfully added,false
otherwise.
-
getName
Returns a Jython name associated with this Selector. Consider usinggetNames()
instead.- Specified by:
getName
in classLinearCombo.JythonThing
- Returns:
- Either a blank
String
if there are no associated names, or the "first" (iteration-order) name. - See Also:
-
setWaveNumber
Changes the "selected" wave number to the given value.WARNING:no bounds-checking is currently being performed, but this is expected to change in the near future.
- Parameters:
newWaveNumber
- New wave number to associate with the current Selector.
-
getWaveNumber
Returns the "selected" wave number associated with thisSelector
.- Returns:
- Wave number currently selected by this
Selector
.
-
getColor
Returns the color associated with thisSelector
.- Returns:
- "Color" for this
Selector
.
-
getData
Returns the data selected by the location of thisSelector
.- Specified by:
getData
in classLinearCombo.JythonThing
- Returns:
- Data selected by this
Selector
.
-
getId
Returns an identifier for thisSelector
.- Returns:
- ID for this
Selector
.
-
toString
Returns aString
representation of the relevant information "stored" by thisSelector
.
-