Class ReferenceArea
java.lang.Object
no.uib.jsparklines.renderers.util.ReferenceArea
public class ReferenceArea extends Object
Reference area that can be added to a chart.
- Author:
- Harald Barsnes.
-
Constructor Summary
Constructors Constructor Description ReferenceArea(String label, double start, double end, Color areaColor, float alpha)
Creates a new ReferenceArea. -
Method Summary
Modifier and Type Method Description float
getAlpha()
Get the alpha level.Color
getAreaColor()
Get the area color.double
getEnd()
Get the end value.String
getLabel()
Returns the label.double
getStart()
Get the start value.void
setAlpha(float alpha)
Set the alpha level.void
setAreaColor(Color areaColor)
Set the area color.void
setEnd(double end)
Set the end value.void
setLabel(String label)
Sets the label.void
setStart(double start)
Set the start value.
-
Constructor Details
-
ReferenceArea
public ReferenceArea(String label, double start, double end, Color areaColor, float alpha) throws IllegalArgumentExceptionCreates a new ReferenceArea.- Parameters:
label
- the reference labelstart
- the start of the reference areaend
- the end of the reference areaareaColor
- the color of the reference areaalpha
- the alpha level of the reference area, range: 0.0 to 1.0- Throws:
IllegalArgumentException
- alpha must be in the range 0.0 to 1.0
-
-
Method Details
-
getLabel
Returns the label.- Returns:
- the label
-
setLabel
Sets the label.- Parameters:
label
- the label to set
-
getStart
public double getStart()Get the start value.- Returns:
- the start
-
setStart
public void setStart(double start)Set the start value.- Parameters:
start
- the start to set
-
getEnd
public double getEnd()Get the end value.- Returns:
- the end
-
setEnd
public void setEnd(double end)Set the end value.- Parameters:
end
- the end to set
-
getAreaColor
Get the area color.- Returns:
- the areaColor
-
setAreaColor
Set the area color.- Parameters:
areaColor
- the areaColor to set
-
getAlpha
public float getAlpha()Get the alpha level.- Returns:
- the alpha level
-
setAlpha
public void setAlpha(float alpha)Set the alpha level.- Parameters:
alpha
- the alpha level to set
-