org.swtchart.internal.Title Class Reference

A base class for title. More...

Inheritance diagram for org.swtchart.internal.Title:
Inheritance graph
[legend]
Collaboration diagram for org.swtchart.internal.Title:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Title (Chart parent)
 Constructor.
void setText (String text)
 Sets the title text.
String getText ()
 Gets the title text.
void setFont (Font font)
 Sets the font.
Font getFont ()
 Gets the font.
void setForeground (Color color)
 Sets the foreground color.
Color getForeground ()
 Gets the foreground color.
void setStyleRanges (StyleRange[] ranges)
 Sets the style ranges.
StyleRange[] getStyleRanges ()
 Gets the style ranges.
void setVisible (boolean isVisible)
 Sets the visibility state of title.
boolean isVisible ()
 Gets the visibility state.
void updateLayoutData ()
 Updates the title layout data.
void setLayoutData (ChartLayoutData layoutData)
 Sets the layout data.
ChartLayoutData getLayoutData ()
 Gets the layout data.
void dispose ()
 Disposes the resources.
void paintControl (PaintEvent e)
void setBounds (int x, int y, int width, int height)
 Sets the bounds on chart panel.
Rectangle getBounds ()
 Gets the bounds on chart panel.

Protected Member Functions

String getDefaultText ()
 Gets the default title text.
boolean isHorizontal ()
 Gets the state indicating if showing title horizontally.

Protected Attributes

Chart chart
 the chart
String text
 the title text
boolean isVisible
 the visibility state of axis

Private Member Functions

void drawHorizontalTitle (GC gc)
 Draws the horizontal title.
void drawVerticalTitle (GC gc)
 Draws the vertical title.

Private Attributes

Color foreground
 the foreground color
Font font
 the font
StyleRange[] styleRanges
 the style ranges
final TextLayout textLayout
 The text layout.
final Font defaultFont
 the default font
Rectangle bounds
 the bounds of title
ChartLayoutData layoutData
 the layout data

Static Private Attributes

static final int DEFAULT_FONT_SIZE = Constants.LARGE_FONT_SIZE
 the default font size
static final int DEFAULT_FOREGROUND = SWT.COLOR_BLUE
 the default color
static final String DEFAULT_TEXT = ""
 the default text

Detailed Description

A base class for title.

Definition at line 29 of file Title.java.


Constructor & Destructor Documentation

org.swtchart.internal.Title.Title ( Chart  parent  ) 

Member Function Documentation

void org.swtchart.internal.Title.dispose (  ) 

Disposes the resources.

Reimplemented in org.swtchart.internal.axis.AxisTitle.

Definition at line 281 of file Title.java.

References org.swtchart.internal.Title.chart, org.swtchart.internal.Title.defaultFont, and org.swtchart.internal.Title.textLayout.

Referenced by org.swtchart.Chart.dispose().

Here is the caller graph for this function:

void org.swtchart.internal.Title.drawHorizontalTitle ( GC  gc  )  [private]

Draws the horizontal title.

Parameters:
gc The graphics context

Definition at line 345 of file Title.java.

References org.swtchart.internal.Title.getBounds(), org.swtchart.internal.Title.styleRanges, org.swtchart.internal.Title.text, and org.swtchart.internal.Title.textLayout.

Referenced by org.swtchart.internal.Title.paintControl().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.swtchart.internal.Title.drawVerticalTitle ( GC  gc  )  [private]

Draws the vertical title.

Parameters:
gc The graphics context

Definition at line 364 of file Title.java.

References org.swtchart.internal.Title.chart, org.swtchart.internal.Title.getBounds(), org.swtchart.internal.Title.getFont(), org.swtchart.internal.Title.getForeground(), org.swtchart.internal.Title.styleRanges, org.swtchart.internal.Title.text, and org.swtchart.internal.Title.textLayout.

Referenced by org.swtchart.internal.Title.paintControl().

Here is the call graph for this function:

Here is the caller graph for this function:

Rectangle org.swtchart.internal.Title.getBounds (  ) 

Gets the bounds on chart panel.

Returns:
the bounds on chart panel

Definition at line 335 of file Title.java.

References org.swtchart.internal.Title.bounds.

Referenced by org.swtchart.internal.Title.drawHorizontalTitle(), and org.swtchart.internal.Title.drawVerticalTitle().

Here is the caller graph for this function:

String org.swtchart.internal.Title.getDefaultText (  )  [protected]

Gets the default title text.

Returns:
the default title text

Reimplemented in org.swtchart.internal.axis.AxisTitle, and org.swtchart.internal.ChartTitle.

Definition at line 114 of file Title.java.

References org.swtchart.internal.Title.DEFAULT_TEXT.

Referenced by org.swtchart.internal.Title.setText().

Here is the caller graph for this function:

Font org.swtchart.internal.Title.getFont (  ) 

Gets the font.

Returns:
the font

Implements org.swtchart.ITitle.

Definition at line 147 of file Title.java.

References org.swtchart.internal.Title.defaultFont, and org.swtchart.internal.Title.font.

Referenced by org.swtchart.internal.Title.drawVerticalTitle(), org.swtchart.internal.Title.paintControl(), and org.swtchart.internal.Title.updateLayoutData().

Here is the caller graph for this function:

Color org.swtchart.internal.Title.getForeground (  ) 

Gets the foreground color.

Returns:
the foreground color

Implements org.swtchart.ITitle.

Definition at line 176 of file Title.java.

References org.swtchart.internal.Title.foreground.

Referenced by org.swtchart.internal.Title.drawVerticalTitle(), and org.swtchart.internal.Title.paintControl().

Here is the caller graph for this function:

ChartLayoutData org.swtchart.internal.Title.getLayoutData (  ) 

Gets the layout data.

Returns:
the layout data

Definition at line 274 of file Title.java.

References org.swtchart.internal.Title.layoutData.

Referenced by org.swtchart.internal.ChartLayout.AxisLayoutData.AxisLayoutData(), and org.swtchart.internal.ChartLayout.initTitleAndLegendSize().

Here is the caller graph for this function:

StyleRange [] org.swtchart.internal.Title.getStyleRanges (  ) 

Gets the style ranges.

Returns:
the style ranges

Implements org.swtchart.ITitle.

Definition at line 199 of file Title.java.

References org.swtchart.internal.Title.styleRanges.

String org.swtchart.internal.Title.getText (  ) 

Gets the title text.

Returns:
the title text

Implements org.swtchart.ITitle.

Definition at line 121 of file Title.java.

References org.swtchart.internal.Title.text.

boolean org.swtchart.internal.Title.isHorizontal (  )  [protected]

Gets the state indicating if showing title horizontally.

Returns:
the state indicating if showing title horizontally

Reimplemented in org.swtchart.internal.axis.AxisTitle.

Definition at line 227 of file Title.java.

Referenced by org.swtchart.internal.Title.paintControl(), and org.swtchart.internal.Title.updateLayoutData().

Here is the caller graph for this function:

Gets the visibility state.

Returns:
true if title is visible

Implements org.swtchart.ITitle.

Definition at line 218 of file Title.java.

Referenced by org.swtchart.internal.Title.paintControl(), org.swtchart.internal.Title.Title(), and org.swtchart.internal.Title.updateLayoutData().

Here is the caller graph for this function:

void org.swtchart.internal.Title.paintControl ( PaintEvent  e  ) 
void org.swtchart.internal.Title.setBounds ( int  x,
int  y,
int  width,
int  height 
)

Sets the bounds on chart panel.

Parameters:
x the x coordinate
y the y coordinate
width the width
height the height

Definition at line 326 of file Title.java.

References org.swtchart.internal.Title.bounds.

Referenced by org.swtchart.internal.ChartLayout.layoutBottomAxis(), org.swtchart.internal.ChartLayout.layoutLeftAxis(), org.swtchart.internal.ChartLayout.layoutRightAxis(), org.swtchart.internal.ChartLayout.layoutTitle(), and org.swtchart.internal.ChartLayout.layoutTopAxis().

Here is the caller graph for this function:

void org.swtchart.internal.Title.setFont ( Font  font  ) 

Sets the font.

Parameters:
font the font

Implements org.swtchart.ITitle.

Definition at line 131 of file Title.java.

References org.swtchart.internal.Title.chart, org.swtchart.internal.Title.defaultFont, and org.swtchart.Chart.updateLayout().

Referenced by org.swtchart.internal.axis.AxisTitle.AxisTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.swtchart.internal.Title.setForeground ( Color  color  ) 

Sets the foreground color.

Parameters:
color the foreground color

Implements org.swtchart.ITitle.

Definition at line 160 of file Title.java.

References org.swtchart.internal.Title.DEFAULT_FOREGROUND, and org.swtchart.internal.Title.foreground.

Referenced by org.swtchart.internal.Title.Title().

Here is the caller graph for this function:

void org.swtchart.internal.Title.setLayoutData ( ChartLayoutData  layoutData  ) 

Sets the layout data.

Parameters:
layoutData the layout data

Definition at line 265 of file Title.java.

Referenced by org.swtchart.Chart.Chart(), and org.swtchart.internal.Title.updateLayoutData().

Here is the caller graph for this function:

void org.swtchart.internal.Title.setStyleRanges ( StyleRange[]  styleRanges  ) 

Sets the style ranges.

When style ranges are set, the font and background color set by setFont(Font) and setForeground(Color) makes no effect. Instead, the font and background color in style ranges are used.

Parameters:
styleRanges the style ranges, or null to clear the currently set style ranges.

Implements org.swtchart.ITitle.

Definition at line 183 of file Title.java.

References org.swtchart.internal.Title.chart, org.swtchart.internal.Title.styleRanges, org.swtchart.internal.Title.textLayout, and org.swtchart.Chart.updateLayout().

Here is the call graph for this function:

void org.swtchart.internal.Title.setText ( String  title  ) 

Sets the title text.

Parameters:
title the title text

Implements org.swtchart.ITitle.

Definition at line 95 of file Title.java.

References org.swtchart.internal.Title.chart, org.swtchart.internal.Title.getDefaultText(), org.swtchart.internal.Title.textLayout, and org.swtchart.Chart.updateLayout().

Referenced by org.swtchart.internal.axis.Axis.Axis(), org.swtchart.internal.axis.AxisTitle.AxisTitle(), and org.swtchart.internal.ChartTitle.ChartTitle().

Here is the call graph for this function:

Here is the caller graph for this function:

void org.swtchart.internal.Title.setVisible ( boolean  visible  ) 

Sets the visibility state of title.

Parameters:
visible the visibility state

Implements org.swtchart.ITitle.

Definition at line 206 of file Title.java.

References org.swtchart.internal.Title.chart, and org.swtchart.Chart.updateLayout().

Here is the call graph for this function:

void org.swtchart.internal.Title.updateLayoutData (  ) 

Member Data Documentation

the default font size

Reimplemented in org.swtchart.internal.axis.AxisTitle.

Definition at line 62 of file Title.java.

Referenced by org.swtchart.internal.Title.Title().

final int org.swtchart.internal.Title.DEFAULT_FOREGROUND = SWT.COLOR_BLUE [static, private]

the default color

Definition at line 65 of file Title.java.

Referenced by org.swtchart.internal.Title.setForeground(), and org.swtchart.internal.Title.Title().

final String org.swtchart.internal.Title.DEFAULT_TEXT = "" [static, private]

the default text

Reimplemented in org.swtchart.internal.ChartTitle.

Definition at line 68 of file Title.java.

Referenced by org.swtchart.internal.Title.getDefaultText(), and org.swtchart.internal.Title.Title().

the font

Definition at line 41 of file Title.java.

Referenced by org.swtchart.internal.Title.getFont(), and org.swtchart.internal.Title.Title().

the foreground color

Definition at line 38 of file Title.java.

Referenced by org.swtchart.internal.Title.getForeground(), and org.swtchart.internal.Title.setForeground().

the visibility state of axis

Definition at line 50 of file Title.java.

the layout data

Definition at line 59 of file Title.java.

Referenced by org.swtchart.internal.Title.getLayoutData().

StyleRange [] org.swtchart.internal.Title.styleRanges [private]
final TextLayout org.swtchart.internal.Title.textLayout [private]

The documentation for this class was generated from the following file:

Generated on 26 Oct 2015 for SWTChart.org by  doxygen 1.6.1