public static class LinearCombo.Selector extends LinearCombo.JythonThing
Modifier and Type | Field and Description |
---|---|
private ConstantMap[] |
color |
private Console |
console |
private HydraControl |
control |
private Data |
data |
private MultiSpectralDisplay |
display |
private java.lang.String |
ID |
private float |
waveNumber |
jythonNames
Constructor and Description |
---|
Selector(float waveNumber,
ConstantMap[] color,
HydraControl control,
Console console)
Create a new Selector.
|
Modifier and Type | Method and Description |
---|---|
boolean |
addName(java.lang.String name)
Attempts to associate a Jython "variable"/"name" with
this Selector.
|
void |
clearNames()
Resets the known names of a Selector.
|
ConstantMap[] |
getColor()
Returns the color associated with this
Selector . |
Data |
getData()
Returns the data selected by the location of this
Selector . |
java.lang.String |
getId()
Returns an identifier for this
Selector . |
java.lang.String |
getName()
Returns a Jython name associated with this Selector.
|
java.util.Collection<java.lang.String> |
getNames()
Returns the known Jython names associated with this Selector.
|
float |
getWaveNumber()
Returns the "selected" wave number associated with this
Selector . |
boolean |
removeName(java.lang.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.
|
java.lang.String |
toString()
Returns a
String representation of the relevant information
"stored" by this Selector . |
private final java.lang.String ID
private float waveNumber
private ConstantMap[] color
private HydraControl control
private MultiSpectralDisplay display
public Selector(float waveNumber, ConstantMap[] color, HydraControl control, Console console)
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.public boolean removeName(java.lang.String name)
removeName
in class LinearCombo.JythonThing
name
- Name (within Jython namespace) to remove.true
if removal was successful, false
otherwise.public java.util.Collection<java.lang.String> getNames()
getNames
in class LinearCombo.JythonThing
null
.public void clearNames()
public boolean addName(java.lang.String name)
addName
in class LinearCombo.JythonThing
name
- Name used within the Jython namespace. Cannot be
null
.true
if name
was successfully added,
false
otherwise.public java.lang.String getName()
getNames()
instead.getName
in class LinearCombo.JythonThing
String
if there are no associated
names, or the "first" (iteration-order) name.getNames()
public void setWaveNumber(float newWaveNumber)
WARNING:no bounds-checking is currently being performed, but this is expected to change in the near future.
newWaveNumber
- New wave number to associate with the current
Selector.public float getWaveNumber()
Selector
.Selector
.public ConstantMap[] getColor()
Selector
.Selector
.public Data getData()
Selector
.getData
in class LinearCombo.JythonThing
Selector
.public java.lang.String getId()
Selector
.Selector
.public java.lang.String toString()
String
representation of the relevant information
"stored" by this Selector
.toString
in class java.lang.Object
String
representation of this Selector
.