public class LineState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.awt.Color[] |
COLORS
The array of colors we cycle through
|
static java.lang.String[] |
HPOS_LABELS
vertical position labels
|
static int |
HPOS_LEFT
horizontal position value
|
static int |
HPOS_MIDDLE
horizontal position value
|
static int |
HPOS_NONE
horizontal position value
|
static int |
HPOS_RIGHT
horizontal position value
|
static int[] |
HPOS_VALUES
horizontal positions
|
protected int |
index
index
|
static int |
LINETYPE_AREA
Useful constant for specifying the type of rendering (area only).
|
static int |
LINETYPE_AREA_AND_SHAPES
Useful constant for specifying the type of rendering (area and shapes).
|
static int |
LINETYPE_BAR
line type
|
static int[] |
LINETYPE_IDS
line types
|
static java.lang.String[] |
LINETYPE_LABELS
line type labels
|
static int |
LINETYPE_LINES
Useful constant for specifying the type of rendering (lines only).
|
static int |
LINETYPE_SHAPES
line type
|
static int |
LINETYPE_SHAPES_AND_LINES
Useful constant for specifying the type of rendering (shapes and lines).
|
static int |
SHAPE_HLINE
shape type
|
static int |
SHAPE_LARGEPOINT
shape type
|
static java.lang.String[] |
SHAPE_NAMES
shape names
|
static int |
SHAPE_PLUS
shape type
|
static int |
SHAPE_POINT
shape type
|
static int |
SHAPE_RECTANGLE
shape type
|
static int |
SHAPE_VLINE
shape type
|
static int |
SHAPE_X
shape type
|
static int[] |
SHAPES
shape types
|
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
|
static int |
STROKE_DASH
Stroke type
|
static int |
STROKE_DOT
Stroke type
|
static int |
STROKE_DOTDASH
Stroke type
|
static int[] |
STROKE_IDS
Stroke types
|
static java.lang.String[] |
STROKE_LABELS
Stroke type labels
|
static int |
STROKE_SOLID
Stroke type
|
protected visad.Unit |
unit
display unit
|
static int |
VPOS_BOTTOM
vertical position value
|
static java.lang.String[] |
VPOS_LABELS
horizontal position labels
|
static int |
VPOS_MIDDLE
vertical position value
|
static int |
VPOS_NONE
vertical position value
|
static int |
VPOS_TOP
vertical position value
|
static int[] |
VPOS_VALUES
vertical positions
|
Constructor and Description |
---|
LineState()
Default ctor
|
LineState(java.awt.Color color,
float width,
int strokeType)
Constructor
|
LineState(java.awt.Color color,
float width,
int strokeType,
int lineType,
int shapeType)
Constructor
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
applyProperties()
Apply properties
|
java.lang.String |
getAxisLabel()
Get the AxisLabel property.
|
boolean |
getAxisVisible()
Get the AxisVisible property.
|
java.lang.String |
getChartName()
Get the ChartName property.
|
java.awt.Color |
getColor()
Get the Color property.
|
java.awt.Color |
getColor(int index)
if we have a color then return it.
|
static java.awt.Color |
getFixedColor(int index)
Utility to get a color in the static list of colors
|
int |
getHorizontalPosition()
Get the HorizontalPosition property.
|
int |
getLineType()
Get the LineType property.
|
java.lang.String |
getName()
Get the Name property.
|
java.lang.String |
getNameMacro()
Get the NameMacro property.
|
java.awt.Shape |
getPaintShape()
get the shape we use to paint
|
protected javax.swing.JComponent |
getPropertyContents()
Create the properties contents
|
protected javax.swing.JComponent |
getPropertyContents(boolean full,
java.util.List chartNames,
java.util.List sampleRanges)
Create the properties contents
|
Range |
getRange()
Get the Range property.
|
boolean |
getRangeIncludesZero()
Get the RangeIncludesZero property.
|
int |
getShape()
Get the Shape property.
|
int |
getSide()
Get the Side property.
|
java.awt.BasicStroke |
getStroke()
Create a stroke
|
int |
getStrokeType()
Get the StrokeType property.
|
java.util.List<visad.DateTime> |
getTimes()
Get the list of times
|
visad.Unit |
getUnit()
Get the unit.
|
boolean |
getUseLogarithmicRange()
Get the UseLogarithmicRange property.
|
boolean |
getUseVerticalPosition()
Get the UseVertical property.
|
boolean |
getValid()
Get the Valid property.
|
java.util.List<visad.Real> |
getValues()
Get the list of values
|
int |
getVerticalPosition()
Get the VerticalPosition property.
|
boolean |
getVisible()
Get the Visible property.
|
boolean |
getVisibleInLegend()
Get the VisibleInLegend property.
|
float |
getWidth()
Get the Width property.
|
boolean |
hasName()
Does this linestate have a name defined
|
static java.awt.BasicStroke |
makeStroke(float width,
int type)
create a stroke
|
void |
setAxisLabel(java.lang.String value)
Set the AxisLabel property.
|
void |
setAxisVisible(boolean value)
Set the AxisVisible property.
|
void |
setChartName(java.lang.String value)
Set the chart name property.
|
void |
setColor(java.awt.Color value)
Set the Color property.
|
void |
setHorizontalPosition(int value)
Set the HorizontalPosition property.
|
void |
setLineType(int value)
Set the LineType property.
|
void |
setName(java.lang.String value)
Set the Name property.
|
void |
setNameIfNeeded(java.lang.String value)
Set the name if needed
|
void |
setNameMacro(java.lang.String value)
Set the NameMacro property.
|
void |
setRange(Range value)
Set the Range property.
|
void |
setRangeIncludesZero(boolean value)
Set the RangeIncludesZero property.
|
void |
setRangeInProperties(Range r)
apply range to gui
|
void |
setShape(int value)
Set the Shape property.
|
void |
setSide(int value)
Set the Side property.
|
void |
setStrokeType(int value)
Set the StrokeType property.
|
void |
setStrokeType(java.lang.Integer value)
set stroke
|
void |
setTrack(java.util.List<visad.DateTime> times,
java.util.List<visad.Real> values)
Set the track with a list of times and values
|
void |
setUseLogarithmicRange(boolean value)
Set the UseLogarithmicRange property.
|
void |
setUseVerticalPosition(boolean value)
Set the UseVertical property.
|
void |
setValid(boolean value)
Set the Valid property.
|
void |
setVerticalPosition(int value)
Set the VerticalPosition property.
|
void |
setVisible(boolean value)
Set the Visible property.
|
void |
setVisibleInLegend(boolean value)
Set the VisibleInLegend property.
|
void |
setWidth(float value)
Set the Width property.
|
boolean |
showPropertiesDialog(java.beans.PropertyChangeListener propListener,
boolean doVisible,
boolean doRange,
java.util.List chartNames,
java.util.List sampleRanges)
show dialog
|
boolean |
showPropertiesDialog(java.beans.PropertyChangeListener listener,
java.util.List chartNames,
java.util.List ranges)
show dialog
|
void |
showRangePopup(java.util.List ranges)
popup range menu
|
public static final int VPOS_TOP
public static final int VPOS_MIDDLE
public static final int VPOS_BOTTOM
public static final int VPOS_NONE
public static final int HPOS_LEFT
public static final int HPOS_MIDDLE
public static final int HPOS_RIGHT
public static final int HPOS_NONE
public static int[] VPOS_VALUES
public static java.lang.String[] VPOS_LABELS
public static int[] HPOS_VALUES
public static java.lang.String[] HPOS_LABELS
public static final int LINETYPE_SHAPES
public static final int LINETYPE_LINES
public static final int LINETYPE_SHAPES_AND_LINES
public static final int LINETYPE_AREA
public static final int LINETYPE_AREA_AND_SHAPES
public static final int LINETYPE_BAR
public static final int[] LINETYPE_IDS
public static final java.lang.String[] LINETYPE_LABELS
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 static final int STROKE_SOLID
public static final int STROKE_DOT
public static final int STROKE_DASH
public static final int STROKE_DOTDASH
public static final int[] STROKE_IDS
public static final java.lang.String[] STROKE_LABELS
public static final int SHAPE_PLUS
public static final int SHAPE_X
public static final int SHAPE_RECTANGLE
public static final int SHAPE_POINT
public static final int SHAPE_LARGEPOINT
public static final int SHAPE_VLINE
public static final int SHAPE_HLINE
public static int[] SHAPES
public static java.lang.String[] SHAPE_NAMES
public static java.awt.Color[] COLORS
protected int index
protected visad.Unit unit
public LineState()
public LineState(java.awt.Color color, float width, int strokeType)
color
- colorwidth
- line widthstrokeType
- strokepublic LineState(java.awt.Color color, float width, int strokeType, int lineType, int shapeType)
color
- colorwidth
- line widthstrokeType
- strokelineType
- line typeshapeType
- shape typeprotected javax.swing.JComponent getPropertyContents()
public boolean showPropertiesDialog(java.beans.PropertyChangeListener listener, java.util.List chartNames, java.util.List ranges)
listener
- listens for changeschartNames
- all chart names. We use this to show a combo box of chartsranges
- All ranges. Some candy for the user so they can set the range values to use on multiple line statespublic boolean showPropertiesDialog(java.beans.PropertyChangeListener propListener, boolean doVisible, boolean doRange, java.util.List chartNames, java.util.List sampleRanges)
propListener
- listens for changesdoVisible
- show visible cbxdoRange
- show rangeschartNames
- all chart names. We use this to show a combo box of chartssampleRanges
- All ranges. Some candy for the user so they can set the range values to use on multiple line statespublic java.util.List<visad.DateTime> getTimes()
public java.util.List<visad.Real> getValues()
public void setTrack(java.util.List<visad.DateTime> times, java.util.List<visad.Real> values)
times
- the timesvalues
- the valuesprotected javax.swing.JComponent getPropertyContents(boolean full, java.util.List chartNames, java.util.List sampleRanges)
full
- show fill dialogchartNames
- chart namessampleRanges
- rangespublic void showRangePopup(java.util.List ranges)
ranges
- rangespublic void setRangeInProperties(Range r)
r
- rangeprotected boolean applyProperties()
public static java.awt.Color getFixedColor(int index)
index
- which colorpublic java.awt.BasicStroke getStroke()
public static java.awt.BasicStroke makeStroke(float width, int type)
width
- line widthtype
- stroke typepublic java.awt.Shape getPaintShape()
public void setVisible(boolean value)
value
- The new value for Visiblepublic boolean getVisible()
public void setColor(java.awt.Color value)
value
- The new value for Colorpublic java.awt.Color getColor()
public java.awt.Color getColor(int index)
index
- indexpublic void setWidth(float value)
value
- The new value for Widthpublic float getWidth()
public void setStrokeType(java.lang.Integer value)
value
- valuepublic void setStrokeType(int value)
value
- The new value for StrokeTypepublic int getStrokeType()
public void setShape(int value)
value
- The new value for Shapepublic int getShape()
public void setRangeIncludesZero(boolean value)
value
- The new value for RangeIncludesZeropublic boolean getRangeIncludesZero()
public void setRange(Range value)
value
- The new value for Rangepublic Range getRange()
public void setUseLogarithmicRange(boolean value)
value
- The new value for UseLogarithmicRangepublic boolean getUseLogarithmicRange()
public void setLineType(int value)
value
- The new value for LineTypepublic int getLineType()
public void setChartName(java.lang.String value)
value
- The new value for chart namepublic java.lang.String getChartName()
public void setNameIfNeeded(java.lang.String value)
value
- true to set the namepublic boolean hasName()
public void setName(java.lang.String value)
value
- The new value for Namepublic java.lang.String getName()
public void setNameMacro(java.lang.String value)
value
- The new value for NameMacropublic java.lang.String getNameMacro()
public void setVerticalPosition(int value)
value
- The new value for VerticalPositionpublic int getVerticalPosition()
public void setHorizontalPosition(int value)
value
- The new value for HorizontalPositionpublic int getHorizontalPosition()
public void setSide(int value)
value
- The new value for Sidepublic int getSide()
public void setAxisVisible(boolean value)
value
- The new value for AxisVisiblepublic boolean getAxisVisible()
public void setValid(boolean value)
value
- The new value for Validpublic boolean getValid()
public void setAxisLabel(java.lang.String value)
value
- The new value for AxisLabelpublic java.lang.String getAxisLabel()
public void setVisibleInLegend(boolean value)
value
- The new value for VisibleInLegendpublic boolean getVisibleInLegend()
public void setUseVerticalPosition(boolean value)
value
- The new value for UseVerticalpublic boolean getUseVerticalPosition()
public visad.Unit getUnit()