Package org.swtchart
Interface IErrorBar
- All Known Implementing Classes:
ErrorBar
public interface IErrorBar
An error bar.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionColorgetColor()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(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.
-
Method Details
-
getType
IErrorBar.ErrorBarType getType()Gets the error type.- Returns:
- the error type
-
setType
Sets the error type.- Parameters:
type- the error type
-
getColor
Color getColor()Gets the error bar color. The default color is dark gray.- Returns:
- the error bar color
-
setColor
void setColor(Color color) Sets the error bar color. If null is given, default color will be set.- Parameters:
color- the error bar color
-
getLineWidth
int getLineWidth()Gets the line width to draw error bar.- Returns:
- the line width to draw error bar
-
setLineWidth
void setLineWidth(int width) Sets the line width to draw error bar. The default line width is 1.- Parameters:
width- line width to draw error bar
-
getError
double getError()Gets the error.- Returns:
- the error
-
setError
void setError(double error) Sets the error.If errors have been set with
getPlusErrors()orgetMinusErrors(), the value set with this method won't be used.- Parameters:
error- the error
-
getPlusErrors
double[] getPlusErrors()Gets the plus errors.- Returns:
- the plus errors, or empty array if errors are not set.
-
setPlusErrors
void setPlusErrors(double[] errors) Sets the plus errors.- Parameters:
errors- the plus errors
-
getMinusErrors
double[] getMinusErrors()Gets the minus errors.- Returns:
- the minus errors, or empty array if errors are not set.
-
setMinusErrors
void setMinusErrors(double[] errors) Sets the minus errors.- Parameters:
errors- the minus errors
-
setVisible
void setVisible(boolean visible) Sets the visibility state.- Parameters:
visible- the visibility state
-
isVisible
boolean isVisible()Gets the visibility state.- Returns:
- true if error bar is visible
-