|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.jinsight.jetchart.GaugeScale
The numerical scale of a gauge chart is placed along the border of the
gauge frame. It is comprised of major and minor ticks marks to help
user identify the current value of a gauge series within a range varying
from a minimum to a maximum value.
An unlimited number of GaugeScale objects can be added to the context of
a gauge chart, each of them associated with different objects, as GaugeSerie
and GaugeZone instances.
Objects not associated with any scales are automatically painted with
respect to a primary scale kept by the GaugeGraph class.
By adjusting the start and end points of a gauge scale, it is possible to
place scales sequentially along the border of the gauge frame, without
overlapping. The direction a gauge scale is painted can also be changed
modifying the start and end points values.
GaugeGraph,
GaugeFrame,
GaugeSerie,
GaugeZone,
setStartPoint(double),
setEndPoint(double)| Field Summary | |
static int |
INSIDE
Constant used to set the position of scale labels and scale ticks to inside the gauge area. |
static int |
OUTSIDE
Constant used to set the position of scale labels and scale ticks to outside the gauge area. |
| Constructor Summary | |
GaugeScale()
Creates a GaugeScale object. |
|
GaugeScale(double minValue,
double maxValue)
Creates a GaugeScale object. |
|
| Method Summary | |
protected void |
finalize()
|
void |
setColor(java.awt.Color color)
Sets the color of this GaugeScale labels. |
void |
setEndPoint(double endPoint)
Sets the end point of a GaugeScale object, as a fraction of the gauge frame border. |
void |
setFont(java.awt.Font font)
Sets the font of a GaugeScale labels. |
void |
setImage(java.awt.Image img,
double value,
double position)
Sets an image to be associated with a gauge scale. |
void |
setLabels(java.lang.String[] labels)
Sets the scale labels to be displayed, replacing the scale values, which are automatically calculated. |
void |
setLabelsGap(int labelsGap)
Sets the gap between the scale labels and the tip of the major ticks. |
void |
setLabelsPosition(int labelsPosition)
Sets the position where the scale labels are painted. |
void |
setMinorTicksColor(java.awt.Color minorTicksColor)
Sets the color of the minor ticks. |
void |
setMinorTicksCount(int minorTicksCount)
Sets the number of minor ticks. |
void |
setMinorTicksLength(int minorTicksLength)
Sets the length of the minor ticks. |
void |
setRange(double minValue,
double maxValue)
Sets the range of a GaugeScale object. |
void |
setStartPoint(double startPoint)
Sets the start point of a GaugeScale object, as a fraction of the gauge frame border. |
void |
setTicksColor(java.awt.Color ticksColor)
Sets the color of the major ticks. |
void |
setTicksCount(int ticksCount)
Sets the number of major ticks. |
void |
setTicksLength(int ticksLength)
Sets the length of all major ticks. |
void |
setTicksPosition(int ticksPosition)
Sets the position where the major and minor ticks are painted. |
void |
setValueFormat(java.lang.String valueFormat)
Sets the format of a GaugeScale values. |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int INSIDE
public static final int OUTSIDE
| Constructor Detail |
public GaugeScale()
public GaugeScale(double minValue,
double maxValue)
minValue - A double precision number.maxValue - A double precision number.setRange(double, double)| Method Detail |
public void setColor(java.awt.Color color)
color - A Color object.public void setTicksColor(java.awt.Color ticksColor)
ticksColor - A Color object.public void setTicksLength(int ticksLength)
ticksLength - An integer value.public void setMinorTicksColor(java.awt.Color minorTicksColor)
minorTicksColor - A Color object.public void setMinorTicksLength(int minorTicksLength)
minorTicksLength - An integer value.
public void setRange(double minValue,
double maxValue)
minValue - A double precision number.maxValue - A double precision number.public void setLabelsGap(int labelsGap)
labelsGap - An integer value.public void setTicksCount(int ticksCount)
ticksCount - An integer value.public void setMinorTicksCount(int minorTicksCount)
minorTicksCount - An integer value.public void setFont(java.awt.Font font)
font - A Font object.
public void setImage(java.awt.Image img,
double value,
double position)
img - The Image object.value - A double precision number.position - A double precision number ranging from 0 to 1,
corresponding to the center and the border of the gauge,
respectively.public void setValueFormat(java.lang.String valueFormat)
valueFormat - A String object.public void setStartPoint(double startPoint)
startPoint - A double precision number, ranging from 0 to 1.setEndPoint(double)public void setEndPoint(double endPoint)
endPoint - A double precision number, ranging from 0 to 1.setStartPoint(double)public void setTicksPosition(int ticksPosition)
ticksPosition - One of the constants used to set ticks position.INSIDE,
OUTSIDEpublic void setLabelsPosition(int labelsPosition)
labelsPosition - One of the constants used to set labels position.INSIDE,
OUTSIDEpublic void setLabels(java.lang.String[] labels)
labels - An array of strings.
protected void finalize()
throws java.lang.Throwable
java.lang.Throwable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||