Class LineSeries
java.lang.Object
org.swtchart.internal.series.Series
org.swtchart.internal.series.LineSeries
- All Implemented Interfaces:
ILineSeries, ISeries
Line series.
-
Nested Class Summary
Nested classes/interfaces inherited from interface ILineSeries
ILineSeries.PlotSymbolTypeNested classes/interfaces inherited from interface ISeries
ISeries.SeriesType -
Field Summary
Fields inherited from class 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDraws series.voiddrawSeriesSymbol(org.eclipse.swt.graphics.GC gc, int h, int v, org.eclipse.swt.graphics.Color color) Draws series symbol.voidenableArea(boolean enabled) Enables the area chart.voidenableStep(boolean enabled) Enables the step chart.getAdjustedRange(Axis axis, int length) Gets the adjusted range to show all series in screen.intGets the anti-aliasing value for drawing line.org.eclipse.swt.graphics.ColorGets the line color.Gets line style.intGets the line width.org.eclipse.swt.graphics.ColorGets the symbol color.org.eclipse.swt.graphics.Color[]Gets the symbol colors.intGets the symbol size in pixels.Gets the symbol type.booleanGets the state indicating if area chart is enabled.booleanGets the state indicating if step chart is enabled.voidsetAntialias(int antialias) Sets the anti-aliasing value for drawing line.protected voidSets the compressor.voidsetLineColor(org.eclipse.swt.graphics.Color color) Sets line color.voidsetLineStyle(LineStyle style) Sets line style.voidsetLineWidth(int width) Sets the width of line connecting data points and also line drawing symbol if applicable (i.e.voidsetSymbolColor(org.eclipse.swt.graphics.Color color) Sets the symbol color.voidsetSymbolColors(org.eclipse.swt.graphics.Color[] colors) Sets the symbol colors.voidsetSymbolSize(int size) Sets the symbol size in pixels.voidSets the symbol type.Methods inherited from class Series
addDisposeListener, dispose, draw, enableStack, getCompressor, getDescription, getId, getLabel, getPixelCoordinates, getRangeWithMargin, getType, getXAxisId, getXDateSeries, getXErrorBar, getXRange, getXSeries, getYAxisId, getYErrorBar, getYRange, getYSeries, isDateSeries, isStackEnabled, isValidStackSeries, isVisible, isVisibleInLegend, setDescription, setStackSeries, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeriesMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ISeries
addDisposeListener, enableStack, getDescription, getId, getLabel, getPixelCoordinates, getType, getXAxisId, getXDateSeries, getXErrorBar, getXSeries, getYAxisId, getYErrorBar, getYSeries, isStackEnabled, isVisible, isVisibleInLegend, setDescription, setVisible, setVisibleInLegend, setXAxisId, setXDateSeries, setXSeries, setYAxisId, setYSeries
-
Constructor Details
-
LineSeries
-
-
Method Details
-
getLineStyle
Description copied from interface:ILineSeriesGets line style.- Specified by:
getLineStylein interfaceILineSeries- Returns:
- line style.
-
setLineStyle
Description copied from interface:ILineSeriesSets line style. If null is given, default line style will be set.- Specified by:
setLineStylein interfaceILineSeries- Parameters:
style- line style
-
getLineColor
public org.eclipse.swt.graphics.Color getLineColor()Description copied from interface:ILineSeriesGets the line color.- Specified by:
getLineColorin interfaceILineSeries- Returns:
- the line color
-
setLineColor
public void setLineColor(org.eclipse.swt.graphics.Color color) Description copied from interface:ILineSeriesSets line color. If null is given, default color will be set.- Specified by:
setLineColorin interfaceILineSeries- Parameters:
color- the line color
-
getLineWidth
public int getLineWidth()Description copied from interface:ILineSeriesGets the line width.- Specified by:
getLineWidthin interfaceILineSeries- Returns:
- the line width
-
setLineWidth
public void setLineWidth(int width) Description copied from interface:ILineSeriesSets the width of line connecting data points and also line drawing symbol if applicable (i.e. PlotSymbolType.CROSS or PlotSymbolType.PLUS). The default width is 1.- Specified by:
setLineWidthin interfaceILineSeries- Parameters:
width- the line width
-
getSymbolType
Description copied from interface:ILineSeriesGets the symbol type.- Specified by:
getSymbolTypein interfaceILineSeries- Returns:
- the symbol type
-
setSymbolType
Description copied from interface:ILineSeriesSets the symbol type. If null is given, default type PlotSymbolType.CIRCLE will be set.- Specified by:
setSymbolTypein interfaceILineSeries- Parameters:
type- the symbol type
-
getSymbolSize
public int getSymbolSize()Description copied from interface:ILineSeriesGets the symbol size in pixels.- Specified by:
getSymbolSizein interfaceILineSeries- Returns:
- the symbol size
-
setSymbolSize
public void setSymbolSize(int size) Description copied from interface:ILineSeriesSets the symbol size in pixels. The default size is 4.- Specified by:
setSymbolSizein interfaceILineSeries- Parameters:
size- the symbol size
-
getSymbolColor
public org.eclipse.swt.graphics.Color getSymbolColor()Description copied from interface:ILineSeriesGets the symbol color.- Specified by:
getSymbolColorin interfaceILineSeries- Returns:
- the symbol color
-
setSymbolColor
public void setSymbolColor(org.eclipse.swt.graphics.Color color) Description copied from interface:ILineSeriesSets the symbol color. If null is given, default color will be set.- Specified by:
setSymbolColorin interfaceILineSeries- Parameters:
color- the symbol color
-
getSymbolColors
public org.eclipse.swt.graphics.Color[] getSymbolColors()Description copied from interface:ILineSeriesGets the symbol colors.- Specified by:
getSymbolColorsin interfaceILineSeries- Returns:
- the symbol colors, or empty array if no symbol colors are set.
-
setSymbolColors
public void setSymbolColors(org.eclipse.swt.graphics.Color[] colors) Description copied from interface:ILineSeriesSets the symbol colors. Typically, the number of symbol colors is the same as the number of plots. If the number of symbol colors is less than the number of plots, the rest of plots will have the common color which is set with setSymbolColor(Color).- Specified by:
setSymbolColorsin interfaceILineSeries- Parameters:
colors- the symbol colors. If null or empty array is given, the color which is set with setSymbolColor(Color) will be commonly used for all plots.
-
setCompressor
protected void setCompressor()Description copied from class:SeriesSets the compressor.- Specified by:
setCompressorin classSeries
-
enableArea
public void enableArea(boolean enabled) Description copied from interface:ILineSeriesEnables the area chart.- Specified by:
enableAreain interfaceILineSeries- Parameters:
enabled- true if enabling area chart
-
isAreaEnabled
public boolean isAreaEnabled()Description copied from interface:ILineSeriesGets the state indicating if area chart is enabled.- Specified by:
isAreaEnabledin interfaceILineSeries- Returns:
- true if area chart is enabled
-
enableStep
public void enableStep(boolean enabled) Description copied from interface:ILineSeriesEnables the step chart.- Specified by:
enableStepin interfaceILineSeries- Parameters:
enabled- true if enabling step chart
-
isStepEnabled
public boolean isStepEnabled()Description copied from interface:ILineSeriesGets the state indicating if step chart is enabled.- Specified by:
isStepEnabledin interfaceILineSeries- Returns:
- true if step chart is enabled
-
getAdjustedRange
Description copied from class:SeriesGets the adjusted range to show all series in screen. This range includes the size of plot like symbol or bar.- Specified by:
getAdjustedRangein classSeries- Parameters:
axis- the axislength- the axis length in pixels- Returns:
- the adjusted range
-
getAntialias
public int getAntialias()Description copied from interface:ILineSeriesGets the anti-aliasing value for drawing line. The default value is SWT.DEFAULT.- Specified by:
getAntialiasin interfaceILineSeries- Returns:
- the anti-aliasing value which can be SWT.DEFAULT, SWT.ON or SWT.OFF.
-
setAntialias
public void setAntialias(int antialias) Description copied from interface:ILineSeriesSets the anti-aliasing value for drawing line.If 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.
- Specified by:
setAntialiasin interfaceILineSeries- Parameters:
antialias- the anti-aliasing value which can be SWT.DEFAULT, SWT.ON or SWT.OFF.
-
draw
Description copied from class:SeriesDraws series. -
drawSeriesSymbol
public void drawSeriesSymbol(org.eclipse.swt.graphics.GC gc, int h, int v, org.eclipse.swt.graphics.Color color) Draws series symbol.- Parameters:
gc- the GC objecth- the horizontal coordinate to draw symbolv- the vertical coordinate to draw symbolcolor- the symbol color
-