Class ErrorBar
java.lang.Object
org.swtchart.internal.series.ErrorBar
- All Implemented Interfaces:
IErrorBar
-
Nested Class Summary
Nested classes/interfaces inherited from interface IErrorBar
IErrorBar.ErrorBarType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDraws error bar.org.eclipse.swt.graphics.ColorgetColor()Gets the error bar color.doublegetError()Gets the error.intGets the line width to draw error bar.double[]Gets the minus errors.double[]Gets the plus errors.getType()Gets the error type.booleanGets the visibility state.voidsetColor(org.eclipse.swt.graphics.Color color) Sets the error bar color.voidsetError(double error) Sets the error.voidsetLineWidth(int width) Sets the line width to draw error bar.voidsetMinusErrors(double[] errors) Sets the minus errors.voidsetPlusErrors(double[] errors) Sets the plus errors.voidSets the error type.voidsetVisible(boolean visible) Sets the visibility state.
-
Constructor Details
-
ErrorBar
public ErrorBar()The constructor.
-
-
Method Details
-
getType
Description copied from interface:IErrorBarGets the error type. -
setType
Description copied from interface:IErrorBarSets the error type. -
getColor
-
setColor
-
getLineWidth
public int getLineWidth()Description copied from interface:IErrorBarGets the line width to draw error bar.- Specified by:
getLineWidthin interfaceIErrorBar- Returns:
- the line width to draw error bar
-
setLineWidth
public void setLineWidth(int width) Description copied from interface:IErrorBarSets the line width to draw error bar. The default line width is 1.- Specified by:
setLineWidthin interfaceIErrorBar- Parameters:
width- line width to draw error bar
-
getError
-
setError
public void setError(double error) Description copied from interface:IErrorBarSets the error.If errors have been set with
IErrorBar.getPlusErrors()orIErrorBar.getMinusErrors(), the value set with this method won't be used. -
getPlusErrors
public double[] getPlusErrors()Description copied from interface:IErrorBarGets the plus errors.- Specified by:
getPlusErrorsin interfaceIErrorBar- Returns:
- the plus errors, or empty array if errors are not set.
-
setPlusErrors
public void setPlusErrors(double[] errors) Description copied from interface:IErrorBarSets the plus errors.- Specified by:
setPlusErrorsin interfaceIErrorBar- Parameters:
errors- the plus errors
-
getMinusErrors
public double[] getMinusErrors()Description copied from interface:IErrorBarGets the minus errors.- Specified by:
getMinusErrorsin interfaceIErrorBar- Returns:
- the minus errors, or empty array if errors are not set.
-
setMinusErrors
public void setMinusErrors(double[] errors) Description copied from interface:IErrorBarSets the minus errors.- Specified by:
setMinusErrorsin interfaceIErrorBar- Parameters:
errors- the minus errors
-
isVisible
-
setVisible
public void setVisible(boolean visible) Description copied from interface:IErrorBarSets the visibility state.- Specified by:
setVisiblein interfaceIErrorBar- Parameters:
visible- the visibility state
-
draw
Draws error bar.- Parameters:
gc- the graphics contexth- the horizontal coordinate to draw error barv- the vertical coordinate to draw error baraxis- the x axisseriesIndex- the series index
-