com.jinsight.jetchart
Class GaugeZone

java.lang.Object
  extended bycom.jinsight.jetchart.GaugeZone

public class GaugeZone
extends java.lang.Object

Areas within the tracking zone of a gauge series' needle can be delimited to indicate the state of a gauge series' value. The GaugeZone class takes a start and end values representing the position of both sides of an arc and fills the arc with a given color. The values are taken with respect to the GaugeScale object a GaugeZone is associated with.

See Also:
GaugeScale, GaugeSerie

Field Summary
static int GAUGE_AREA
          Constant used to set the radius of the gauge zone arc to the same size of the gauge frame radius.
static int NEEDLE_AREA
          Constant used to set the radius of the gauge zone arc to the same size of the needles painted against the GaugeScale object this TargetZone is associated with.
 
Constructor Summary
GaugeZone()
          Creates a GaugeZone object.
GaugeZone(double startValue, double endValue)
          Creates a GaugeZone object.
 
Method Summary
protected  void finalize()
           
 void setArea(int area)
          Sets the area within which a GaugeZone object is painted.
 void setColor(java.awt.Color color)
          Sets the color of a GaugeZone object.
 void setFont(java.awt.Font font)
          Sets the font of a GaugeZone text.
 void setScale(GaugeScale scale)
          Sets the GaugeScale object a GaugeZone is associated with.
 void setText(java.lang.String text)
          Sets a GaugeZone description text.
 void setTextColor(java.awt.Color textColor)
          Sets the color of a GaugeZone text.
 void setTextPosition(double textPosition)
          Sets the distance of the gauge zone text to the gauge zone vertex.
 void setValues(double startValue, double endValue)
          Sets the start and end values of a GaugeZone object.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GAUGE_AREA

public static final int GAUGE_AREA
Constant used to set the radius of the gauge zone arc to the same size of the gauge frame radius. The gauge zone covers the full area from the gauge center to the gauge frame border.

See Also:
Constant Field Values

NEEDLE_AREA

public static final int NEEDLE_AREA
Constant used to set the radius of the gauge zone arc to the same size of the needles painted against the GaugeScale object this TargetZone is associated with.

See Also:
Constant Field Values
Constructor Detail

GaugeZone

public GaugeZone()
Creates a GaugeZone object. Default constructor.


GaugeZone

public GaugeZone(double startValue,
                 double endValue)
Creates a GaugeZone object. This constructor takes the start and end values specifying the limits of a gauge zone. The limits are calculated with respect to the GaugeScale object a gauge zone is associated with.

Parameters:
startValue - A double precision number.
endValue - A double precision number.
See Also:
GaugeScale
Method Detail

setValues

public void setValues(double startValue,
                      double endValue)
Sets the start and end values of a GaugeZone object. The start and end values specify the limits of a gauge zone. The limits are calculated with respect to the GaugeScale object a gauge zone is associated with.

Parameters:
startValue - A double precision number
endValue - A double precision number
See Also:
GaugeScale

setColor

public void setColor(java.awt.Color color)
Sets the color of a GaugeZone object. Default color is Color.gray.

Parameters:
color - A Color object.

setArea

public void setArea(int area)
Sets the area within which a GaugeZone object is painted. This method takes one of the constants used to set the area of a gauge zone. Default area is GAUGE_AREA.

Parameters:
area - An integer number.
See Also:
GAUGE_AREA, NEEDLE_AREA

setFont

public void setFont(java.awt.Font font)
Sets the font of a GaugeZone text. By default, the font is SansSerif,BOLD,10.

Parameters:
font - A Font object.

setText

public void setText(java.lang.String text)
Sets a GaugeZone description text. The text is placed along the radius that divides the gauge zone arc in two equal parts.

Parameters:
text - A String object.
See Also:
setTextColor(java.awt.Color), setTextPosition(double)

setTextColor

public void setTextColor(java.awt.Color textColor)
Sets the color of a GaugeZone text. Default color is Color.black.

Parameters:
textColor - A Color object.
See Also:
setText(java.lang.String), setTextPosition(double)

setTextPosition

public void setTextPosition(double textPosition)
Sets the distance of the gauge zone text to the gauge zone vertex. By default it is 0.7, the text center is located in a point about 7/10 of the arc radius, measured from the gauge zone vertex.

Parameters:
textPosition - A double precision number. It can vary from 0 to 1.
See Also:
setText(java.lang.String), setTextColor(java.awt.Color)

setScale

public void setScale(GaugeScale scale)
Sets the GaugeScale object a GaugeZone is associated with. By default, a gauge zone is associated with the primary scale of the GaugeGraph class.

Parameters:
scale - A GaugeScale object.
See Also:
GaugeScale, GaugeGraph

finalize

protected void finalize()
                 throws java.lang.Throwable
Throws:
java.lang.Throwable