public class ReferenceArea extends Object
Constructor and Description |
---|
ReferenceArea(String identifier,
String label,
double start,
double end,
Color areaColor,
float alpha,
boolean drawOnTop,
boolean drawLabel,
boolean aboveXAxis)
Creates a new ReferenceArea.
|
ReferenceArea(String identifier,
String label,
double start,
double end,
Color areaColor,
float alpha,
boolean drawOnTop,
boolean drawLabel,
Color labelColor,
boolean boldFont,
Color borderColor,
float borderWidth,
double percentLength,
boolean aboveXAxis)
Creates a new ReferenceArea.
|
Modifier and Type | Method and Description |
---|---|
boolean |
drawLabel()
Returns true if the label is to be drawn, false otherwise.
|
boolean |
drawOnTop()
Returns true if the area is to be drawn in front of the data, false
otherwise.
|
float |
getAlpha()
Get the alpha level (transparency).
|
Color |
getAreaColor()
Get the area color.
|
Color |
getBorderColor()
Returns the border color.
|
float |
getBorderWidth()
Returns the border width.
|
double |
getEnd()
Get the end value.
|
String |
getIdentifier()
Returns the reference identifier.
|
String |
getLabel()
Returns the label.
|
Color |
getLabelColor()
Returns the label color.
|
double |
getPercentLength()
Returns the length of the reference area in percent.
|
double |
getStart()
Get the start value.
|
boolean |
isAboveXAxis()
Returns true if the reference area is added above the x-axis, false adds
the reference are below the x-axis
|
void |
setAboveXAxis(boolean aboveXAxis)
Set if the reference area is to be added above the x-axis, false adds the
reference are below the x-axis
|
void |
setAlpha(float alpha)
Set the alpha level (transparency).
|
void |
setAreaColor(Color areaColor)
Set the area color.
|
void |
setBoldFont(boolean boldFont)
Set if the label is to be in bold.
|
void |
setBorderColor(Color borderColor)
Set the border color.
|
void |
setBorderWidth(float borderWidth)
Set the border width.
|
void |
setDrawLabel(boolean drawLabel)
Set to true if the label is to be drawn, false otherwise.
|
void |
setDrawOnTop(boolean drawOnTop)
Set to true if the area is to be drawn in front of the data, false
otherwise.
|
void |
setEnd(double end)
Set the end value.
|
void |
setIdentifier(String identifier)
Sets the references identifier.
|
void |
setLabel(String label)
Sets the label.
|
void |
setLabelColor(Color labelColor)
Set the label color.
|
void |
setPercentLength(double percentLength)
Set the length of the reference area in percent.
|
void |
setStart(double start)
Set the start value.
|
boolean |
useBoldFont()
Returns true of the label should be in bold.
|
public ReferenceArea(String identifier, String label, double start, double end, Color areaColor, float alpha, boolean drawOnTop, boolean drawLabel, boolean aboveXAxis) throws IllegalArgumentException
identifier
- the reference identifier, has to be uniquelabel
- the reference label, i.e., what is shown on the screenstart
- the start of the reference areaend
- the end of the reference areaareaColor
- the color of the reference areaalpha
- the alpha level (transparency) of the reference areadrawOnTop
- if the area is to be drawn on top of or behind the datadrawLabel
- if the label is to be drawn or notaboveXAxis
- if true the reference area is added above the x-axis,
false adds the reference are below the x-axisIllegalArgumentException
- alpha must be in the range 0.0f to 1.0fpublic ReferenceArea(String identifier, String label, double start, double end, Color areaColor, float alpha, boolean drawOnTop, boolean drawLabel, Color labelColor, boolean boldFont, Color borderColor, float borderWidth, double percentLength, boolean aboveXAxis) throws IllegalArgumentException
identifier
- the reference identifier, has to be uniquelabel
- the reference label, i.e., what is shown on the screenstart
- the start of the reference areaend
- the end of the reference areaareaColor
- the color of the reference areaalpha
- the alpha level (transparency) of the reference areadrawOnTop
- if the area is to be drawn on top of or behind the datadrawLabel
- if the label is to be drawn or notlabelColor
- the color to use for the labelboldFont
- if the label is to be in bold fontborderColor
- the border colorborderWidth
- the border widthpercentLength
- the length in percent, [0.0 - 1.0].aboveXAxis
- if true the reference area is added above the x-axis,
false adds the reference are below the x-axisIllegalArgumentException
- alpha must be in the range 0.0f to 1.0fpublic String getLabel()
public void setLabel(String label)
label
- the label to setpublic double getStart()
public void setStart(double start)
start
- the start to setpublic double getEnd()
public void setEnd(double end)
end
- the end to setpublic Color getAreaColor()
public void setAreaColor(Color areaColor)
areaColor
- the areaColor to setpublic float getAlpha()
public void setAlpha(float alpha)
alpha
- the alpha level to setpublic boolean drawOnTop()
public void setDrawOnTop(boolean drawOnTop)
drawOnTop
- if the area is to be drawn in front of the datapublic boolean drawLabel()
public void setDrawLabel(boolean drawLabel)
drawLabel
- if the label is to be drawnpublic Color getLabelColor()
public void setLabelColor(Color labelColor)
labelColor
- the labelColor to setpublic boolean useBoldFont()
public void setBoldFont(boolean boldFont)
boldFont
- the boldFont to setpublic Color getBorderColor()
public void setBorderColor(Color borderColor)
borderColor
- the borderColor to setpublic float getBorderWidth()
public void setBorderWidth(float borderWidth)
borderWidth
- the borderWidth to setpublic double getPercentLength()
public void setPercentLength(double percentLength)
percentLength
- the percentLength to setpublic String getIdentifier()
public void setIdentifier(String identifier)
identifier
- the identifier to setpublic boolean isAboveXAxis()
public void setAboveXAxis(boolean aboveXAxis)
aboveXAxis
- if the reference area is to be added above the x-axisCopyright © 2016. All rights reserved.