All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class jclass.chart.JCTitle

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

public class JCTitle
extends ChartCanvas
JCTitle manages and renders a title (ie a header or a footer). It relies heavily on ChartText.

Properties

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.


Constructor Index

 o JCTitle()
Simple JCTitle object constructor.

Method Index

 o getAdjust()
Gets the value of the Adjust property.
 o getChanged()
Gets the value of the Changed property.
 o getLabel()
Gets the label that appears inside JCTitle.
 o getText()
Gets the value of the Text property.
 o paintComponent(Graphics)
Local paint method for JCTitle.
 o preferredSize()
Returns the preferred size for the JCTitle instance.
 o recalc()
Recalculates the size and position of all elements inside the JCTitle instance.
 o setAdjust(int)
Sets the value of the Adjust property.
 o setText(String)
Sets the value of the Text property.

Constructors

 o JCTitle
  public JCTitle()
Simple JCTitle object constructor. Created a ChartText for use by JCTitle

Methods

 o getLabel
  public ChartText getLabel()
Gets the label that appears inside JCTitle.

Returns:
ChartText instance corresponding to the label that appears inside the header/footer.
 o getText
  public String getText()
Gets the value of the Text property. The Text property controls the text displayed inside the title.

Returns:
String representing the text inside the label. Could be an unparsed JCString.
 o setText
  public void setText(String t)
Sets the value of the Text property. The Text property controls the text displayed inside the title.

Parameters:
t - String representing the text inside the label. Could be an unparsed JCString.
 o getAdjust
  public int getAdjust()
Gets the value of the Adjust property. The Adjust property determines how text is justified or positioned in the title.

Returns:
one of LEFT, CENTER or RIGHT
 o setAdjust
  public synchronized void setAdjust(int justify)
Sets the value of the Adjust property. The Adjust property determines how text is justified or positioned in the title.

Parameters:
justify - one of LEFT, CENTER or RIGHT
Throws: IllegalArgumentException
If the text justification is not one of LEFT, CENTER or RIGHT.
 o paintComponent
  public void paintComponent(Graphics gc)
Local paint method for JCTitle. Since ChartCanvas inherits from BWT.JCComponent, painting is done in paintComponent() in order to take advantage of core BWT features.

Overrides:
paintComponent in class ChartCanvas
 o getChanged
  public boolean getChanged()
Gets the value of the Changed property. In JCTitle, the Changed property can be affected by the Changed property of the ChartText.

Returns:
true if the title has been changed and needs a recalc(), false otherwise.
Overrides:
getChanged in class ChartCanvas
 o recalc
  public void recalc()
Recalculates the size and position of all elements inside the JCTitle instance.

Overrides:
recalc in class ChartCanvas
 o preferredSize
  public Dimension preferredSize()
Returns the preferred size for the JCTitle instance.

Returns:
preferred size
Overrides:
preferredSize in class ChartCanvas

All Packages  Class Hierarchy  This Package  Previous  Next  Index