Package org.zkoss.zul
Class DialModelRange
java.lang.Object
org.zkoss.zul.DialModelRange
- All Implemented Interfaces:
Serializable
Color range to be marked in
DialModelScale.- Author:
- henrichen
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturn the inner radius percentage(0 ~ 1) of the dial range; default to 0.7.doubleReturns the lower bound in scale of this colored range.doubleReturn the outer radius percentage(0 ~ 1) of the dial range; default to 0.8.Get the background color of the dial frame (in string as #RRGGBB).int[]Get the background color of the dial frame in int array (0: red, 1: green, 2:blue).doubleReturns the upper bound in scale of this colored range.voidsetInnerRadius(double radius) Sets the inner radius percentage(0 ~ 1) of the dial range; default to 0.7.voidsetLowerBound(double lower) Sets the lower bound in scale of this colored range.voidsetOuterRadius(double radius) Sets the outer radius percentage(0 ~ 1) of the dial range; default to 0.8.voidSetup the DailModel range.voidsetRangeColor(String color) Set the range color of the dial range.voidsetUpperBound(double upper) Sets the upper bound in scale of this colored range.
-
Method Details
-
setRange
public void setRange(double lower, double upper, String color, double innerRadius, double outerRadius) Setup the DailModel range.- Parameters:
lower- the lower bound of the range in the scale.upper- the upper bound of the range in the scale.color- the color in #RRGGBB format (hexadecimal); default to blue.innerRadius- the inner radius percentage(0 ~ 1) of the range; default to 0.7.outerRadius- the outer radius percentage(0 ~ 1) of the range; default to 0.8;
-
setRangeColor
Set the range color of the dial range.- Parameters:
color- in #RRGGBB format (hexadecimal).
-
getRangeColor
Get the background color of the dial frame (in string as #RRGGBB). null means default. -
getRangeRGB
public int[] getRangeRGB()Get the background color of the dial frame in int array (0: red, 1: green, 2:blue). null means default. -
setInnerRadius
public void setInnerRadius(double radius) Sets the inner radius percentage(0 ~ 1) of the dial range; default to 0.7.- Parameters:
radius- the inner radius percentage(0 ~ 1) of the dial range; default to 0.7.
-
getInnerRadius
public double getInnerRadius()Return the inner radius percentage(0 ~ 1) of the dial range; default to 0.7.- Returns:
- the inner radius percentage(0 ~ 1) of the dial range; default to 0.7.
-
setOuterRadius
public void setOuterRadius(double radius) Sets the outer radius percentage(0 ~ 1) of the dial range; default to 0.8.- Parameters:
radius- the outer radius percentage(0 ~ 1) of the dial range; default to 0.8.
-
getOuterRadius
public double getOuterRadius()Return the outer radius percentage(0 ~ 1) of the dial range; default to 0.8.- Returns:
- the outer radius percentage(0 ~ 1) of the dial range; default to 0.8.
-
getLowerBound
public double getLowerBound()Returns the lower bound in scale of this colored range.- Returns:
- the lower bound in scale of this colored range.
-
setLowerBound
public void setLowerBound(double lower) Sets the lower bound in scale of this colored range.- Parameters:
lower- the specified lower bound in the scale.
-
getUpperBound
public double getUpperBound()Returns the upper bound in scale of this colored range.- Returns:
- the upper bound in scale of this colored range.
-
setUpperBound
public void setUpperBound(double upper) Sets the upper bound in scale of this colored range.- Parameters:
upper- the upper bound
-