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 String |
ID |
private float |
waveNumber |
jythonNames
Constructor and Description |
---|
LinearCombo.Selector(float waveNumber,
ConstantMap[] color,
HydraControl control,
Console console) |
Modifier and Type | Method and Description |
---|---|
boolean |
addName(String name)
Attempts to associate a Jython "variable"/"name" with
this Selector.
|
void |
clearNames()
Resets the known names of a Selector.
|
ConstantMap[] |
getColor() |
Data |
getData() |
String |
getId() |
String |
getName()
Returns a Jython name associated with this Selector.
|
Collection<String> |
getNames()
Returns the known Jython names associated with this Selector.
|
float |
getWaveNumber()
Returns the "selected" wave number associated with this
Selector.
|
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.
|
String |
toString() |
private float waveNumber
private ConstantMap[] color
private HydraControl control
private MultiSpectralDisplay display
public LinearCombo.Selector(float waveNumber, ConstantMap[] color, HydraControl control, Console console)
waveNumber
- color
- control
- console
- public boolean removeName(String name)
removeName
in class LinearCombo.JythonThing
name
- Name (within Jython namespace) to remove.true
if removal was successful, false
otherwise.public Collection<String> getNames()
getNames
in class LinearCombo.JythonThing
{@literal
- "Names"} (aka variables) in a Jython namespace that
refer to this Selector. Collection may be empty, but never
null
.public void clearNames()
public boolean addName(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 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()
public ConstantMap[] getColor()
public Data getData()
getData
in class LinearCombo.JythonThing