Class DataChoiceWrapper

java.lang.Object
ucar.unidata.idv.control.chart.DataChoiceWrapper

public class DataChoiceWrapper extends Object
Wraps a data choice. Holds extra chart state.
Version:
$Revision: 1.10 $
Author:
IDV Development Team
  • Field Details

    • SIDE_UNDEFINED

      public static final int SIDE_UNDEFINED
      which side in legend
      See Also:
    • SIDE_LEFT

      public static final int SIDE_LEFT
      which side in legend
      See Also:
    • SIDE_RIGHT

      public static final int SIDE_RIGHT
      which side in legend
      See Also:
    • SIDES

      public static final int[] SIDES
      which side in legend
    • SIDELABELS

      public static final String[] SIDELABELS
      which side in legend
  • Constructor Details

    • DataChoiceWrapper

      public DataChoiceWrapper()
      ctor
    • DataChoiceWrapper

      public DataChoiceWrapper(DataChoice dataChoice)
      ctor
      Parameters:
      dataChoice - The data choice to wrap
  • Method Details

    • setDataChoice

      public void setDataChoice(DataChoice value)
      Set the DataChoice property.
      Parameters:
      value - The new value for DataChoice
    • getDataChoice

      public DataChoice getDataChoice()
      Get the DataChoice property.
      Returns:
      The DataChoice
    • getColor

      public Color getColor(int index)
      Either get the color defined for this wrapper or, if null, return the index'ed color
      Parameters:
      index - color index
      Returns:
      color
    • getColor

      public Color getColor()
      Get the color from the line state
      Returns:
      the color
    • getName

      public String getName()
      Get the name from the data choice
      Returns:
      the name
    • getDescription

      public String getDescription()
      Get the description either from me or from the data choice
      Returns:
      the description
    • getLabel

      public String getLabel(Unit unit)
      A utility to format the description with the given unit.
      Parameters:
      unit - The unit. May be null.
      Returns:
      The label
    • toString

      public String toString()
      to string
      Overrides:
      toString in class Object
      Returns:
      to string
    • setSide

      public void setSide(int value)
      Set the Side property.
      Parameters:
      value - The new value for Side
    • getSide

      public int getSide()
      Get the Side property.
      Returns:
      The Side
    • setMyDescription

      public void setMyDescription(String value)
      Set the MyDescription property.
      Parameters:
      value - The new value for MyDescription
    • getMyDescription

      public String getMyDescription()
      Get the MyDescription property.
      Returns:
      The MyDescription
    • setLineState

      public void setLineState(LineState value)
      Set the LineState property.
      Parameters:
      value - The new value for LineState
    • getLineState

      public LineState getLineState()
      Get the LineState property.
      Returns:
      The LineState