Class LinearCombo.Selector

java.lang.Object
edu.wisc.ssec.mcidasv.control.LinearCombo.JythonThing
edu.wisc.ssec.mcidasv.control.LinearCombo.Selector
Enclosing class:
LinearCombo

public static class LinearCombo.Selector extends LinearCombo.JythonThing
Selectors are objects that allow users to select a given wavenumber/band by simply dragging within the GUI.
  • Field Details

  • Constructor Details

    • Selector

      public Selector(float waveNumber, ConstantMap[] color, HydraControl control, Console console)
      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

      public boolean removeName(String name)
      Attempts removal of a known name for the current Selector.
      Specified by:
      removeName in class LinearCombo.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 class LinearCombo.JythonThing
      Returns:
      "Names" (aka variables) in a Jython namespace that refer to this Selector. Collection may be empty, but never null.
    • clearNames

      public void clearNames()
      Resets the known names of a Selector.
    • addName

      public boolean addName(String name)
      Attempts to associate a Jython "variable"/"name" with this Selector.
      Specified by:
      addName in class LinearCombo.JythonThing
      Parameters:
      name - Name used within the Jython namespace. Cannot be null.
      Returns:
      true if name was successfully added, false otherwise.
    • getName

      public String getName()
      Returns a Jython name associated with this Selector. Consider using getNames() instead.
      Specified by:
      getName in class LinearCombo.JythonThing
      Returns:
      Either a blank String if there are no associated names, or the "first" (iteration-order) name.
      See Also:
    • setWaveNumber

      public void setWaveNumber(float newWaveNumber)
      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

      public float getWaveNumber()
      Returns the "selected" wave number associated with this Selector.
      Returns:
      Wave number currently selected by this Selector.
    • getColor

      public ConstantMap[] getColor()
      Returns the color associated with this Selector.
      Returns:
      "Color" for this Selector.
    • getData

      public Data getData()
      Returns the data selected by the location of this Selector.
      Specified by:
      getData in class LinearCombo.JythonThing
      Returns:
      Data selected by this Selector.
    • getId

      public String getId()
      Returns an identifier for this Selector.
      Returns:
      ID for this Selector.
    • toString

      public String toString()
      Returns a String representation of the relevant information "stored" by this Selector.
      Overrides:
      toString in class Object
      Returns:
      String representation of this Selector.