|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.zkoss.zul.AbstractChartModel
org.zkoss.zul.DialModel
public class DialModel
A data model to be used with dial chart.
| Field Summary |
|---|
| Fields inherited from class org.zkoss.zul.AbstractChartModel |
|---|
_listeners |
| Constructor Summary | |
|---|---|
DialModel()
|
|
| Method Summary | |
|---|---|
void |
clear()
clear the model. |
java.lang.Object |
clone()
|
protected void |
fireEvent(int type,
java.lang.String propertyKey,
java.lang.Object data)
Fire the chart data event with the given property key. |
double |
getCapRadius()
Return the radius percentage(0 ~ 1) of the meter's cap; default to 0.07. |
int |
getFrameBgAlpha()
Get the background alpha of the dial frame (transparency, 0 ~ 255, opacue). |
java.lang.String |
getFrameBgColor()
Get the background color of the dial frame (in string as #RRGGBB). |
java.lang.String |
getFrameBgColor1()
Get the 1st background color of the dial frame (in string as #RRGGBB) for gradient starting color. |
java.lang.String |
getFrameBgColor2()
Get the 2nd background color of the dial frame (in string as #RRGGBB) for gradient ending color. |
int[] |
getFrameBgRGB()
Get the background color of the dial frame in int array (0: red, 1: green, 2:blue). |
int[] |
getFrameBgRGB1()
Get the 1st background color of the dial frame in int array (0: red, 1: green, 2:blue) for gradient starting color. |
int[] |
getFrameBgRGB2()
Get the 2nd background color of the dial frame in int array (0: red, 1: green, 2:blue) for gradient ending color. |
java.lang.String |
getFrameFgColor()
Get the foreground color of the dial frame (in string as #RRGGBB). |
int[] |
getFrameFgRGB()
Get the foreground color of the dial frame in int array (0: red, 1: green, 2:blue). |
java.lang.String |
getGradientDirection()
Returns the Frame background gradient color direction (from bgColor1 to bgColor2); center_horizontal, center_vertical, horizontal, vertical. |
DialModelScale |
getScale(int index)
Returns the DialModelScale of the specified index. |
double |
getValue(int index)
Get value of the scale per the specified index. |
int |
indexOf(DialModelScale entry)
Return the index of the specified model entry. |
DialModelScale |
newScale()
new an instance of scale in this DialModel. |
DialModelScale |
newScale(double lowerBound,
double upperBound,
double startAngle,
double extent,
double majorTickInterval,
int minorTickCount)
new an instance of scale in this DialModel. |
void |
removeScale(DialModelScale scale)
Remove the specified DialModelScale from this DialModel. |
void |
setCapRadius(double radius)
Sets the radius percentage(0 ~ 1) of the meter's cap; default to 0.07. |
void |
setFrameBgAlpha(int alpha)
Set the background alpha of the dial frame (transparency, 0 ~ 255). |
void |
setFrameBgColor(java.lang.String color)
Set the background color of the dial frame. |
void |
setFrameBgColor1(java.lang.String color)
Set the 1st background color of the dial frame (for gradient starting color). |
void |
setFrameBgColor2(java.lang.String color)
Set the 2nd background color of the dial frame (for gradient ending color). |
void |
setFrameFgColor(java.lang.String color)
Set the foreground color of the dial frame. |
void |
setGradientDirection(java.lang.String direction)
Set the Frame background gradient color direction (from bgColor1 to bgColor2); center_horizontal, center_vertical, horizontal, vertical. |
void |
setValue(int index,
double value)
add or update the value of a specified scale index. |
int |
size()
Returns the number of DialModelScales. |
| Methods inherited from class org.zkoss.zul.AbstractChartModel |
|---|
addChartDataListener, fireEvent, fireEvent, removeChartDataListener |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DialModel()
| Method Detail |
|---|
public int size()
DialModelScales.
public DialModelScale newScale()
public DialModelScale newScale(double lowerBound,
double upperBound,
double startAngle,
double extent,
double majorTickInterval,
int minorTickCount)
lowerBound - lower bound of this scale.upperBound - upper bound of this scale.startAngle - starting angle in degree associated to the sclae's lower bound(0 degree point to east, counter-clockwise is positive).extent - angles in degree extended from the starting angle (counter clockwise is positive).majorTickInterval - the interval between major tick (in lower bound and upper bound).minorTickCount - the number of minor ticks between major tick.public int indexOf(DialModelScale entry)
entry - the DialModelScale
public DialModelScale getScale(int index)
DialModelScale of the specified index.
index - the index of the entry.
public void removeScale(DialModelScale scale)
scale - public double getValue(int index)
index - the scale index.
public void setValue(int index,
double value)
index - the index of the Scalevalue - the valuepublic void clear()
public void setFrameBgAlpha(int alpha)
alpha - the transparency of background color (0 ~ 255, default to 255 opaque).public int getFrameBgAlpha()
public void setFrameBgColor(java.lang.String color)
color - in #RRGGBB format (hexadecimal).public java.lang.String getFrameBgColor()
public int[] getFrameBgRGB()
public void setFrameFgColor(java.lang.String color)
color - in #RRGGBB format (hexadecimal).public java.lang.String getFrameFgColor()
public int[] getFrameFgRGB()
public void setFrameBgColor1(java.lang.String color)
color - in #RRGGBB format (hexadecimal).public java.lang.String getFrameBgColor1()
public int[] getFrameBgRGB1()
public void setFrameBgColor2(java.lang.String color)
color - in #RRGGBB format (hexadecimal).public java.lang.String getFrameBgColor2()
public int[] getFrameBgRGB2()
public void setGradientDirection(java.lang.String direction)
public java.lang.String getGradientDirection()
public void setCapRadius(double radius)
radius - the radius percentage(0 ~ 1) of the meter's cap.public double getCapRadius()
protected void fireEvent(int type,
java.lang.String propertyKey,
java.lang.Object data)
type - propertyKey - data - public java.lang.Object clone()
clone in class AbstractChartModel
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||