com.jinsight.jetchart
Class ScrollingLabel

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

public class ScrollingLabel
extends java.lang.Object

A scrolling label is a text that slides horizontally or vertically across a vertical or horizontal chart, respectively, displaying the chart labels. When the vertical or horizontal coordinate of the mouse cursor is equal to the coordinate of a label mark placed next to the vertical or horizontal axis, the scrolling label is displayed.
The scrolling label is useful when a chart is displaying a large number of data points and most part of the labels are automatically hidden to prevent them from overlapping each other. The scrolling label shows the content of hidden labels by simply moving mouse cursor over the corresponding data points.
Vertical charts can have the scrolling label displayed at two different positions, above the starting point of the vertical axis or above the horizontal axis. Horizontal charts always have the scrolling label displayed at the rightmost coordinate of the horizontal axis, sliding vertically from top to bottom and from bottom to top.
If a label has more than one line the scrolling label displays the widest line.

The scrolling label is only displayed if chart is 2D. It has no public constructor and can only be accessed through a 'get' method implemented in the Graph class.

See Also:
Graph.getScrollingLabel()

Field Summary
static int ABOVE_XAXIS
          Constant used to display the scrolling label above the x axis in vertical charts.
static int TOP_YAXIS
          Constant used to display the scrolling label at the top of the y axis in vertical charts.
 
Method Summary
protected  void finalize()
           
 void setColor(java.awt.Color color)
          Sets the color of the scrolling label.
 void setDescription(java.lang.String description)
          Sets a single line of text to be prefixed to the scrolling label.
 void setEnabled(boolean isEnabled)
          Enables/disables the scrolling label.
 void setFont(java.awt.Font font)
          Sets the font of the scrolling label.
 void setPosition(int position)
          Sets the scrolling label position.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOP_YAXIS

public static final int TOP_YAXIS
Constant used to display the scrolling label at the top of the y axis in vertical charts.

See Also:
Constant Field Values

ABOVE_XAXIS

public static final int ABOVE_XAXIS
Constant used to display the scrolling label above the x axis in vertical charts.

See Also:
Constant Field Values
Method Detail

setDescription

public void setDescription(java.lang.String description)
Sets a single line of text to be prefixed to the scrolling label. It gives a description of the label content.

Parameters:
description - A String object.

setEnabled

public void setEnabled(boolean isEnabled)
Enables/disables the scrolling label. The scrolling label is only displayed if chart is 2D.

Parameters:
isEnabled - A boolean value(true/false).
See Also:
Graph.setHorizontalGraphEnabled(boolean), GenericGraph.set3DEnabled(boolean)

setColor

public void setColor(java.awt.Color color)
Sets the color of the scrolling label.

Parameters:
color - A Color object.

setPosition

public void setPosition(int position)
Sets the scrolling label position. This method only has effect with vertical charts.
The scrolling label can be positioned above the starting point of the vertical axis or right above the x axis. The scrolling label is by default positioned above the starting point of the vertical axis.

Parameters:
position - One of the constants used to set the scrolling label position.
See Also:
TOP_YAXIS, ABOVE_XAXIS

setFont

public void setFont(java.awt.Font font)
Sets the font of the scrolling label.

Parameters:
font - A Font object.

finalize

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