Package ucar.unidata.idv.control.chart
Class DataChoiceWrapper
java.lang.Object
ucar.unidata.idv.control.chart.DataChoiceWrapper
Wraps a data choice. Holds extra chart state.
- Version:
- $Revision: 1.10 $
- Author:
- IDV Development Team
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
which side in legendstatic final int
which side in legendstatic final int
which side in legendstatic final String[]
which side in legendstatic final int[]
which side in legend -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetColor()
Get the color from the line stategetColor
(int index) Either get the color defined for this wrapper or, if null, return the index'ed colorGet the DataChoice property.Get the description either from me or from the data choiceA utility to format the description with the given unit.Get the LineState property.Get the MyDescription property.getName()
Get the name from the data choiceint
getSide()
Get the Side property.void
setDataChoice
(DataChoice value) Set the DataChoice property.void
setLineState
(LineState value) Set the LineState property.void
setMyDescription
(String value) Set the MyDescription property.void
setSide
(int value) Set the Side property.toString()
to string
-
Field Details
-
SIDE_UNDEFINED
public static final int SIDE_UNDEFINEDwhich side in legend- See Also:
-
SIDE_LEFT
public static final int SIDE_LEFTwhich side in legend- See Also:
-
SIDE_RIGHT
public static final int SIDE_RIGHTwhich side in legend- See Also:
-
SIDES
public static final int[] SIDESwhich side in legend -
SIDELABELS
which side in legend
-
-
Constructor Details
-
DataChoiceWrapper
public DataChoiceWrapper()ctor -
DataChoiceWrapper
ctor- Parameters:
dataChoice
- The data choice to wrap
-
-
Method Details
-
setDataChoice
Set the DataChoice property.- Parameters:
value
- The new value for DataChoice
-
getDataChoice
Get the DataChoice property.- Returns:
- The DataChoice
-
getColor
Either get the color defined for this wrapper or, if null, return the index'ed color- Parameters:
index
- color index- Returns:
- color
-
getColor
Get the color from the line state- Returns:
- the color
-
getName
Get the name from the data choice- Returns:
- the name
-
getDescription
Get the description either from me or from the data choice- Returns:
- the description
-
getLabel
A utility to format the description with the given unit.- Parameters:
unit
- The unit. May be null.- Returns:
- The label
-
toString
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
Set the MyDescription property.- Parameters:
value
- The new value for MyDescription
-
getMyDescription
Get the MyDescription property.- Returns:
- The MyDescription
-
setLineState
Set the LineState property.- Parameters:
value
- The new value for LineState
-
getLineState
Get the LineState property.- Returns:
- The LineState
-