|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.swtchart.internal.series.Series
org.swtchart.internal.series.LineSeries
public class LineSeries
Line series.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.swtchart.ILineSeries |
|---|
ILineSeries.PlotSymbolType |
| Nested classes/interfaces inherited from interface org.swtchart.ISeries |
|---|
ISeries.SeriesType |
| Field Summary |
|---|
| Fields inherited from class org.swtchart.internal.series.Series |
|---|
chart, compressor, DEFAULT_SERIES_TYPE, id, isXMonotoneIncreasing, maxX, maxY, minX, minY, seriesLabel, stackEnabled, stackSeries, type, visible, xAxisId, xErrorBar, xSeries, yAxisId, yErrorBar, ySeries |
| Constructor Summary | |
|---|---|
protected |
LineSeries(Chart chart,
java.lang.String id)
Constructor. |
| Method Summary | |
|---|---|
protected void |
draw(GC gc,
int width,
int height,
Axis xAxis,
Axis yAxis)
Draws series. |
void |
drawSeriesSymbol(GC gc,
int h,
int v,
Color color)
Draws series symbol. |
void |
enableArea(boolean enabled)
Enables the area chart. |
void |
enableStep(boolean enabled)
Enables the step chart. |
Range |
getAdjustedRange(Axis axis,
int length)
Gets the adjusted range to show all series in screen. |
int |
getAntialias()
Gets the anti-aliasing value for drawing line. |
Color |
getLineColor()
Gets the line color. |
LineStyle |
getLineStyle()
Gets line style. |
int |
getLineWidth()
Gets the line width. |
Color |
getSymbolColor()
Gets the symbol color. |
Color[] |
getSymbolColors()
Gets the symbol colors. |
int |
getSymbolSize()
Gets the symbol size in pixels. |
ILineSeries.PlotSymbolType |
getSymbolType()
Gets the symbol type. |
boolean |
isAreaEnabled()
Gets the state indicating if area chart is enabled. |
boolean |
isStepEnabled()
Gets the state indicating if step chart is enabled. |
void |
setAntialias(int antialias)
Sets the anti-aliasing value for drawing line. |
protected void |
setCompressor()
Sets the compressor. |
void |
setLineColor(Color color)
Sets line color. |
void |
setLineStyle(LineStyle style)
Sets line style. |
void |
setLineWidth(int width)
Sets the width of line connecting data points and also line drawing symbol if applicable (i.e. |
void |
setSymbolColor(Color color)
Sets the symbol color. |
void |
setSymbolColors(Color[] colors)
Sets the symbol colors. |
void |
setSymbolSize(int size)
Sets the symbol size in pixels. |
void |
setSymbolType(ILineSeries.PlotSymbolType type)
Sets the symbol type. |
| Methods inherited from class org.swtchart.internal.series.Series |
|---|
addDisposeListener, dispose, draw, enableStack, getCompressor, getId, getLabel, getPixelCoordinates, getRangeWithMargin, getType, getXAxisId, getXDateSeries, getXErrorBar, getXRange, getXSeries, getYAxisId, getYErrorBar, getYRange, getYSeries, isDateSeries, isStackEnabled, isValidStackSeries, isVisible, isVisibleInLegend, setStackSeries, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeries |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.swtchart.ISeries |
|---|
addDisposeListener, enableStack, getId, getLabel, getPixelCoordinates, getType, getXAxisId, getXDateSeries, getXErrorBar, getXSeries, getYAxisId, getYErrorBar, getYSeries, isStackEnabled, isVisible, isVisibleInLegend, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeries |
| Constructor Detail |
|---|
protected LineSeries(Chart chart,
java.lang.String id)
chart - the chartid - the series id| Method Detail |
|---|
public LineStyle getLineStyle()
ILineSeries
getLineStyle in interface ILineSeriespublic void setLineStyle(LineStyle style)
ILineSeries
setLineStyle in interface ILineSeriesstyle - line stylepublic Color getLineColor()
ILineSeries
getLineColor in interface ILineSeriespublic void setLineColor(Color color)
ILineSeries
setLineColor in interface ILineSeriescolor - the line colorpublic int getLineWidth()
ILineSeries
getLineWidth in interface ILineSeriespublic void setLineWidth(int width)
ILineSeries
setLineWidth in interface ILineSerieswidth - the line widthpublic ILineSeries.PlotSymbolType getSymbolType()
ILineSeries
getSymbolType in interface ILineSeriespublic void setSymbolType(ILineSeries.PlotSymbolType type)
ILineSeries
setSymbolType in interface ILineSeriestype - the symbol typepublic int getSymbolSize()
ILineSeries
getSymbolSize in interface ILineSeriespublic void setSymbolSize(int size)
ILineSeries
setSymbolSize in interface ILineSeriessize - the symbol sizepublic Color getSymbolColor()
ILineSeries
getSymbolColor in interface ILineSeriespublic void setSymbolColor(Color color)
ILineSeries
setSymbolColor in interface ILineSeriescolor - the symbol colorpublic Color[] getSymbolColors()
ILineSeries
getSymbolColors in interface ILineSeriespublic void setSymbolColors(Color[] colors)
ILineSeriesBy default, null is set.
setSymbolColors in interface ILineSeriescolors - the symbol colors. If null is given, the color which
is set with setSymbolColor(Color) will be commonly
used for all plots.protected void setCompressor()
Series
setCompressor in class Seriespublic void enableArea(boolean enabled)
ILineSeries
enableArea in interface ILineSeriesenabled - true if enabling area chartpublic boolean isAreaEnabled()
ILineSeries
isAreaEnabled in interface ILineSeriespublic void enableStep(boolean enabled)
ILineSeries
enableStep in interface ILineSeriesenabled - true if enabling step chartpublic boolean isStepEnabled()
ILineSeries
isStepEnabled in interface ILineSeries
public Range getAdjustedRange(Axis axis,
int length)
Series
getAdjustedRange in class Seriesaxis - the axislength - the axis length in pixels
public int getAntialias()
ILineSeries
getAntialias in interface ILineSeriespublic void setAntialias(int antialias)
ILineSeriesIf number of data points is too large, the series is drawn as a collection of dots rather than lines. In this case, the anti-alias doesn't really make effect, and just causes performance degradation. Therefore, client code may automatically enable/disable the anti-alias for each series depending on the number of data points, or alternatively may let end-user configure it.
setAntialias in interface ILineSeriesantialias - the anti-aliasing value which can be SWT.DEFAULT,
SWT.ON or SWT.OFF.
protected void draw(GC gc,
int width,
int height,
Axis xAxis,
Axis yAxis)
Series
draw in class Seriesgc - the graphics contextwidth - the width to draw seriesheight - the height to draw seriesxAxis - the x axisyAxis - the y axis
public void drawSeriesSymbol(GC gc,
int h,
int v,
Color color)
gc - the GC objecth - the horizontal coordinate to draw symbolv - the vertical coordinate to draw symbolcolor - the symbol color
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||