com.jinsight.jetchart
Class GaugeSerie

java.lang.Object
  extended bycom.jinsight.jetchart.AbstractSerie
      extended bycom.jinsight.jetchart.GaugeSerie

public class GaugeSerie
extends AbstractSerie

A gauge chart indicates the current value using a needle that points to the corresponding position within a scale range. The class GaugeSerie implements properties to provide the functionality of a needle, as color, style, arrow width and length, etc.
An unlimited number of GaugeSerie objects can be added to the context of a gauge chart, using a single scale or multiple scales. It is also possible to associate a gauge led with a gauge series, to indicate data state with respect to a threshold value.

See Also:
GaugeLed, GaugeScale

Field Summary
static int ARROW
          Constant used to set the style of a gauge series' needle to an arrow.
static int EMPTY_ARC
          Constant used to set the style of a gauge series' needle to an empty arc.
static int FILLED_ARC
          Constant used to set the style of a gauge series' needle to a filled arc.
static int LINE
          Constant used to set the style of a gauge series' needle to a line.
 
Fields inherited from class com.jinsight.jetchart.AbstractSerie
CLIENT_SIDE, SERVER_SIDE_CERN, SERVER_SIDE_NCSA
 
Constructor Summary
GaugeSerie()
          Default constructor of the GaugeSerie class.
GaugeSerie(double value)
          Constructor of the GaugeSerie class.
GaugeSerie(double value, java.lang.String title)
          Constructor of the GaugeSerie class.
 
Method Summary
protected  void finalize()
           
 java.lang.String getSerieMap(java.lang.String[] urls, int type, java.lang.String target)
          This method is part of the abstract implementation of class AbstractSerie, and is only implemented here to make GaugeSerie a concrete class.
 java.lang.String getSerieMap(java.lang.String url, int type, java.lang.String target)
          Creates a chart image map.
 java.lang.String getTitle()
          Returns the series title.
 void setArrowColor(java.awt.Color arrowColor)
          Sets the arrow color of a gauge series with the needle style set to ARROW.
 void setArrowLength(int arrowLength)
          Sets the length of a needle's arrow.
 void setArrowWidth(int arrowWidth)
          Sets the width of a needle's arrow.
 void setColor(java.awt.Color color)
          Sets the needle color.
 void setGaugeLed(GaugeLed gl)
          Sets the GaugeLed object a GaugeSerie is associated with.
 void setNeedleStyle(int needleStyle)
          Sets the needle style.
 void setScale(GaugeScale scale)
          Sets the GaugeScale object a GaugeSerie is associated with.
 void setSVGURL(java.lang.String svgURL)
          Specifies a URL to be associated with a gauge series' data point of an SVG encoded gauge chart.
 void setSVGURLs(java.lang.String[] svgURLs)
          This method is implemented in class AbstractSerie and has no effect with the GaugeSerie class.
 void setTitle(java.lang.String title)
          Sets the title of a GaugeSerie object.
 void setToolTipContent(java.lang.String toolTipContent)
          Customizes tooltip content.
 void setToolTipContent(java.lang.String[] toolTipContent)
          This method is implemented in class AbstractSerie and has no effect with the GaugeSerie class.
 void setValue(double value)
          Sets the needle value of a GaugeSerie object.
 void setValues(double[] values)
          Sets series values.
 
Methods inherited from class com.jinsight.jetchart.AbstractSerie
addMultipleValues, addValue, getId, getMultipleValues, getValues, setHighlightColor, setHighlightEnabled, setId, setLegendEnabled, setMultipleValues, setMultipleValues, setToolTipEnabled, setValueFormat, setValues, setValuesQuery
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARROW

public static final int ARROW
Constant used to set the style of a gauge series' needle to an arrow.

See Also:
Constant Field Values

LINE

public static final int LINE
Constant used to set the style of a gauge series' needle to a line.

See Also:
Constant Field Values

FILLED_ARC

public static final int FILLED_ARC
Constant used to set the style of a gauge series' needle to a filled arc.

See Also:
Constant Field Values

EMPTY_ARC

public static final int EMPTY_ARC
Constant used to set the style of a gauge series' needle to an empty arc.

See Also:
Constant Field Values
Constructor Detail

GaugeSerie

public GaugeSerie()
Default constructor of the GaugeSerie class.


GaugeSerie

public GaugeSerie(double value)
Constructor of the GaugeSerie class. The value parameter corresponds to the needle position within the scale range of a GaugeSerie object.

Parameters:
value - A double precision number.

GaugeSerie

public GaugeSerie(double value,
                  java.lang.String title)
Constructor of the GaugeSerie class. The value parameter corresponds to the needle position within the scale range of a GaugeSerie object, and the title parameter is the text to be displayed inside the legend box.

Parameters:
value - A double precision number.
title - A String object.
See Also:
setValue(double)
Method Detail

setValue

public void setValue(double value)
Sets the needle value of a GaugeSerie object. The value parameter corresponds to the needle position within the scale range of a GaugeSerie object.

Parameters:
value - A double precision number.

setValues

public void setValues(double[] values)
Description copied from class: AbstractSerie
Sets series values. Values are passed as an array of double precision numbers.

Overrides:
setValues in class AbstractSerie
Parameters:
values - An array of double precision numbers.

setSVGURL

public void setSVGURL(java.lang.String svgURL)
Specifies a URL to be associated with a gauge series' data point of an SVG encoded gauge chart. If a data point is clicked the associated URL is loaded.
The data point area that answers to click events is the tip of a gauge series' needle.
No URL is assigned to a data point if the svgURL string is null.
This method has no effect if the SVG image is generated as a base64 encoded sequence of characters to be passed to the SVG <image> tag.

Parameters:
svgURL - A String object.
See Also:
ChartEncoder.svgEncode(java.io.File, boolean, int)

setSVGURLs

public void setSVGURLs(java.lang.String[] svgURLs)
This method is implemented in class AbstractSerie and has no effect with the GaugeSerie class. The overloaded form that takes a String must be used instead.

Overrides:
setSVGURLs in class AbstractSerie
Parameters:
svgURLs - An array of strings.
See Also:
AbstractSerie, setSVGURL(String)

setToolTipContent

public void setToolTipContent(java.lang.String toolTipContent)
Customizes tooltip content. Tooltips usually display series values and optionally a prefixed text. Default tooltip is overriden by a customized tooltip.

Parameters:
toolTipContent - A String object.
See Also:
ToolTip, ToolTip.setLabel(java.lang.String)

setToolTipContent

public void setToolTipContent(java.lang.String[] toolTipContent)
This method is implemented in class AbstractSerie and has no effect with the GaugeSerie class. The overloaded form that takes a String must be used instead.

Overrides:
setToolTipContent in class AbstractSerie
Parameters:
toolTipContent - An array of strings.
See Also:
AbstractSerie, setToolTipContent(String)

setTitle

public void setTitle(java.lang.String title)
Sets the title of a GaugeSerie object. The title is displayed inside the legend box.

Parameters:
title - A String object.

getTitle

public java.lang.String getTitle()
Returns the series title.

Returns:
A String object.
See Also:
setTitle(java.lang.String)

setColor

public void setColor(java.awt.Color color)
Sets the needle color. Default color is Color.black.

Parameters:
color - A Color object.

setNeedleStyle

public void setNeedleStyle(int needleStyle)
Sets the needle style. Default needle style is ARROW.

Parameters:
needleStyle - One of the constants used to set the needle style.
See Also:
ARROW, LINE, FILLED_ARC, EMPTY_ARC

setArrowColor

public void setArrowColor(java.awt.Color arrowColor)
Sets the arrow color of a gauge series with the needle style set to ARROW. Default color is Color.black.

Parameters:
arrowColor - A Color object.
See Also:
setNeedleStyle(int)

setArrowWidth

public void setArrowWidth(int arrowWidth)
Sets the width of a needle's arrow. Default value is 10 pixels. This method only has effect if the needle style is set to ARROW.

Parameters:
arrowWidth - An integer value, greater than 1.
See Also:
setNeedleStyle(int)

setArrowLength

public void setArrowLength(int arrowLength)
Sets the length of a needle's arrow. Default value is 10 pixels. This method only has effect if the needle style is set to ARROW.

Parameters:
arrowLength - An integer value, greater than 1.
See Also:
setNeedleStyle(int)

setScale

public void setScale(GaugeScale scale)
Sets the GaugeScale object a GaugeSerie is associated with. If no scale is informed, a GaugeSerie object is automatically associated with the primary GaugeScale object kept by the class GaugeGraph.

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

setGaugeLed

public void setGaugeLed(GaugeLed gl)
Sets the GaugeLed object a GaugeSerie is associated with.

Parameters:
gl - A GaugeLed object.
See Also:
GaugeLed

getSerieMap

public java.lang.String getSerieMap(java.lang.String url,
                                    int type,
                                    java.lang.String target)
Creates a chart image map. A image map is used in an HTML document to allow regions of an image to be linked to other HTML documents. The web browser will bring up a different document depending on the image map link the user clicks on. The map itself is either a separate file (server-side maps) or part of the HTML document (client-side maps).
A client-side map can be inserted into html text to be returned by a servlet that also generates the chart image.
If the 'url' parameter is informed, data point coordinates are associated with the given url. If no hyperlink shall be placed, set the 'url' parameter to null.
The second parameter sets the map format type. Image map can be generated in three different formats. A client-side map and an NCSA server or CERN server formatted map. The client-side map is the most used format.
The third parameter sets a target. The target is the name of an html frame used to display the page associated with the image map. This parameter is only related to client-side image mapping. If a target frame is not required set the 'target' parameter to null.

Parameters:
url - The url to be associated with the data point.
type - An integer representing the format type.
target - A string object.
See Also:
AbstractSerie.CLIENT_SIDE, AbstractSerie.SERVER_SIDE_NCSA, AbstractSerie.SERVER_SIDE_CERN

getSerieMap

public java.lang.String getSerieMap(java.lang.String[] urls,
                                    int type,
                                    java.lang.String target)
This method is part of the abstract implementation of class AbstractSerie, and is only implemented here to make GaugeSerie a concrete class. The overloaded form of this method that takes a single url string must be used instead.

Specified by:
getSerieMap in class AbstractSerie
Parameters:
urls - An array of strings containing valid urls.
type - An integer representing the format type.
target - A string object.
See Also:
AbstractSerie, getSerieMap(String,int,String)

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class AbstractSerie
Throws:
java.lang.Throwable