public class DataChoiceWrapper
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
SIDE_LEFT
which side in legend
|
static int |
SIDE_RIGHT
which side in legend
|
static int |
SIDE_UNDEFINED
which side in legend
|
static java.lang.String[] |
SIDELABELS
which side in legend
|
static int[] |
SIDES
which side in legend
|
Constructor and Description |
---|
DataChoiceWrapper()
ctor
|
DataChoiceWrapper(DataChoice dataChoice)
ctor
|
Modifier and Type | Method and Description |
---|---|
java.awt.Color |
getColor()
Get the color from the line state
|
java.awt.Color |
getColor(int index)
Either get the color defined for this wrapper or,
if null, return the index'ed color
|
DataChoice |
getDataChoice()
Get the DataChoice property.
|
java.lang.String |
getDescription()
Get the description either from me or from the data choice
|
java.lang.String |
getLabel(visad.Unit unit)
A utility to format the description with the given unit.
|
LineState |
getLineState()
Get the LineState property.
|
java.lang.String |
getMyDescription()
Get the MyDescription property.
|
java.lang.String |
getName()
Get the name from the data choice
|
int |
getSide()
Get the Side property.
|
void |
setDataChoice(DataChoice value)
Set the DataChoice property.
|
void |
setLineState(LineState value)
Set the LineState property.
|
void |
setMyDescription(java.lang.String value)
Set the MyDescription property.
|
void |
setSide(int value)
Set the Side property.
|
java.lang.String |
toString()
to string
|
public static final int SIDE_UNDEFINED
public static final int SIDE_LEFT
public static final int SIDE_RIGHT
public static final int[] SIDES
public static final java.lang.String[] SIDELABELS
public DataChoiceWrapper()
public DataChoiceWrapper(DataChoice dataChoice)
dataChoice
- The data choice to wrappublic void setDataChoice(DataChoice value)
value
- The new value for DataChoicepublic DataChoice getDataChoice()
public java.awt.Color getColor(int index)
index
- color indexpublic java.awt.Color getColor()
public java.lang.String getName()
public java.lang.String getDescription()
public java.lang.String getLabel(visad.Unit unit)
unit
- The unit. May be null.public java.lang.String toString()
toString
in class java.lang.Object
public void setSide(int value)
value
- The new value for Sidepublic int getSide()
public void setMyDescription(java.lang.String value)
value
- The new value for MyDescriptionpublic java.lang.String getMyDescription()
public void setLineState(LineState value)
value
- The new value for LineStatepublic LineState getLineState()