All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.JCChartLabel

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----jclass.bwt.JCComponent
                           |
                           +----jclass.chart.ChartCanvas
                                   |
                                   +----jclass.chart.JCTitle
                                           |
                                           +----jclass.chart.JCChartLabel

public class JCChartLabel
extends JCTitle
implements JCSerializable
A JCChartLabel object represents a floating label attached somewhere on the chart. Currently the labels are implemented by inheriting (indirectly) from java.awt.Canvas and are thus non-transparent. Hopefully, this will be changed in the future.

Properties

Specifies how the label is to be positioned relative to the specified point. Valid values are JCChartLabel.NORTHEAST, JCChartLabel.NORTHWEST, JCChartLabel.NORTH, JCChartLabel.EAST, JCChartLabel.WEST, JCChartLabel.SOUTHEAST, JCChartLabel.SOUTHWEST and JCChartLabel.SOUTH. Specified what type of point the label is attached to. Valid values are:

JCChartLabel.ATTACH_COORD - attach label to an absolute point anywhere on the chart

JCChartLabel.ATTACH_DATACOORD - attach label to a point in the data space on the chart area

JCChartLabel.ATTACH_DATAINDEX - attach the label to a specific point/bar/slice on the chart

The coordinate in the chart's space where the label is to be attached. The coordinate in the chart area's data space where the label is to be attached. A data index representing the point/bar/slice in the chart to which the label is to be attached. if IsDwellLabel is set to true the label is only displayed when the cursor is over the point/bar/slice that the label is attched to. This flag is only valid for for labels using ATTACH_DATAINDEX as their attachMethod. If IsDwellLabel is false (the default), the label will always be displayed. For labels using ATTACH_DATACOORD, this property specifies which ChartDataView's axes should be used. Offset specifies where the label should be positioned relative to the position the lables thinks it should be, depending on what the label's attachMethod is.
Name Method
IsShowing If true, the ChartCanvas will appear on the screen. If false, it will not appear on the screen. (Note that legend, header, footer and chart area are all ChartCanvas instances). Default value is true.
BorderType Determines the style of border drawn around the ChartCanvas. Valid values come from BWTEnum, and include SHADOW_NONE, SHADOW_ETCHED_IN, SHADOW_ETCHED_OUT, SHADOW_IN, SHADOW_OUT, SHADOW_PLAIN, SHADOW_FRAME_IN, SHADOW_FRAME_OUT. (Note that legend, header, footer and chart area are all ChartCanvas instances). Default value is BWTEnum.SHADOW_IN.
BorderWidth The BorderWidth property determines the width of the border drawn around the canvas. (Note that legend, header, footer and chart area are all ChartCanvas instances). Default value is 2.
Text The Text property controls the text displayed inside the title. The default value is " " (empty string).
Top The Top property determines the location of the top of the ChartCanvas. The default value is calculated.
TopIsDefault The TopIsDefault property determines whether the top position of the chart canvas is calculated by Chart (true) or taken from the Top property (false). Default value is true.
Left The Left property determines the location of the left of the ChartCanvas. Default value is generated.
LeftIsDefault The LeftIsDefault property determines whether the left position of the chart canvas is calculated by Chart (true) or taken from the Left property (false). Default value is true.
Width The Width property determines the width of the ChartCanvas. Default value is generated.
WidthIsDefault The WidthIsDefault property determines whether the width of the chart canvas is calculated by Chart (true) or taken from the Width property (false). Default value is true.
Height The Height property determines the height of the ChartCanvas. Default value is generated.
HeightIsDefault The HeightIsDefault property determines whether the height of the chart canvas is calculated by Chart (true) or taken from the Height property (false). Default value is true.
Adjust The Adjust property determines how text is justified or positioned in the title. Valid values include ChartText.LEFT, ChartText.CENTER and ChartText.RIGHT. Default value is ChartText.LEFT.
Anchor
AttachMethod
Coord
DataCoord
Data Index
IsDwellLabel
DataView
Offset


Variable Index

 o ATTACH_COORD
 o ATTACH_DATACOORD
 o ATTACH_DATAINDEX
 o ATTACH_NONE
 o AUTO
 o CENTER
 o EAST
 o NORTH
 o NORTHEAST
 o NORTHWEST
 o SOUTH
 o SOUTHEAST
 o SOUTHWEST
 o WEST

Constructor Index

 o JCChartLabel()
 o JCChartLabel(String, boolean)

Method Index

 o addNotify()
 o getAnchor()
 o getChart()
 o getDataView()
 o getIsDwellLabel()
 o paint(Graphics)
 o paintComponent(Graphics)
Local paint method for JCTitle.
 o recalc()
Recalculates the size and position of all elements inside the JCTitle instance.
 o setAnchor(int)
 o setAttachMethod(int)
 o setCoord(Point)
 o setDataCoord(JCDataCoord)
 o setDataIndex(JCDataIndex)
 o setDataView(ChartDataView)
 o setIsDwellLabel(boolean)
 o setOffset(int, int)

Variables

 o NORTHEAST
  public final static int NORTHEAST
 o NORTH
  public final static int NORTH
 o NORTHWEST
  public final static int NORTHWEST
 o EAST
  public final static int EAST
 o WEST
  public final static int WEST
 o SOUTHEAST
  public final static int SOUTHEAST
 o SOUTH
  public final static int SOUTH
 o SOUTHWEST
  public final static int SOUTHWEST
 o CENTER
  public final static int CENTER
 o AUTO
  public final static int AUTO
 o ATTACH_NONE
  public final static int ATTACH_NONE
 o ATTACH_COORD
  public final static int ATTACH_COORD
 o ATTACH_DATACOORD
  public final static int ATTACH_DATACOORD
 o ATTACH_DATAINDEX
  public final static int ATTACH_DATAINDEX

Constructors

 o JCChartLabel
  public JCChartLabel()
 o JCChartLabel
  public JCChartLabel(String contents,
                      boolean jcstring)

Methods

 o addNotify
  public void addNotify()
Overrides:
addNotify in class JCComponent
 o recalc
  public void recalc()
Recalculates the size and position of all elements inside the JCTitle instance.

Overrides:
recalc in class JCTitle
 o paint
  public void paint(Graphics g)
Overrides:
paint in class JCComponent
 o paintComponent
  public void paintComponent(Graphics g)
Local paint method for JCTitle.

Overrides:
paintComponent in class JCTitle
 o setAnchor
  public synchronized void setAnchor(int a)
 o getAnchor
  public int getAnchor()
 o setAttachMethod
  public void setAttachMethod(int newMethod)
 o setCoord
  public void setCoord(Point p)
 o setDataView
  public void setDataView(ChartDataView dv)
 o getDataView
  public ChartDataView getDataView()
 o setDataCoord
  public void setDataCoord(JCDataCoord p)
 o setDataIndex
  public void setDataIndex(JCDataIndex di)
 o setOffset
  public void setOffset(int x,
                        int y)
 o setIsDwellLabel
  public void setIsDwellLabel(boolean b)
 o getIsDwellLabel
  public boolean getIsDwellLabel()
 o getChart
  public JCChart getChart()

All Packages  Class Hierarchy  This Package  Previous  Next  Index