A base class for title. More...
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 |
A base class for title.
Definition at line 29 of file Title.java.
org.swtchart.internal.Title.Title | ( | Chart | parent | ) |
Constructor.
parent | the parent composite |
Definition at line 76 of file Title.java.
References org.swtchart.internal.Title.bounds, org.swtchart.internal.Title.chart, org.swtchart.internal.Title.DEFAULT_FONT_SIZE, org.swtchart.internal.Title.DEFAULT_FOREGROUND, org.swtchart.internal.Title.DEFAULT_TEXT, org.swtchart.internal.Title.defaultFont, org.swtchart.internal.Title.font, org.swtchart.internal.Title.isVisible(), org.swtchart.internal.Title.setForeground(), org.swtchart.internal.Title.text, and org.swtchart.internal.Title.textLayout.
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().
void org.swtchart.internal.Title.drawHorizontalTitle | ( | GC | gc | ) | [private] |
Draws the horizontal title.
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().
void org.swtchart.internal.Title.drawVerticalTitle | ( | GC | gc | ) | [private] |
Draws the vertical title.
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().
Rectangle org.swtchart.internal.Title.getBounds | ( | ) |
Gets 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().
String org.swtchart.internal.Title.getDefaultText | ( | ) | [protected] |
Gets 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().
Font org.swtchart.internal.Title.getFont | ( | ) |
Gets 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().
Color org.swtchart.internal.Title.getForeground | ( | ) |
Gets 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().
ChartLayoutData org.swtchart.internal.Title.getLayoutData | ( | ) |
Gets 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().
StyleRange [] org.swtchart.internal.Title.getStyleRanges | ( | ) |
Gets 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.
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.
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().
boolean org.swtchart.internal.Title.isVisible | ( | ) |
Gets the visibility state.
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().
void org.swtchart.internal.Title.paintControl | ( | PaintEvent | e | ) |
Definition at line 294 of file Title.java.
References org.swtchart.internal.Title.drawHorizontalTitle(), org.swtchart.internal.Title.drawVerticalTitle(), org.swtchart.internal.Title.getFont(), org.swtchart.internal.Title.getForeground(), org.swtchart.internal.Title.isHorizontal(), org.swtchart.internal.Title.isVisible(), and org.swtchart.internal.Title.text.
void org.swtchart.internal.Title.setBounds | ( | int | x, | |
int | y, | |||
int | width, | |||
int | height | |||
) |
Sets the bounds on chart panel.
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().
void org.swtchart.internal.Title.setFont | ( | Font | font | ) |
Sets the font.
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().
void org.swtchart.internal.Title.setForeground | ( | Color | color | ) |
Sets the foreground color.
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().
void org.swtchart.internal.Title.setLayoutData | ( | ChartLayoutData | layoutData | ) |
Sets the layout data.
layoutData | the layout data |
Definition at line 265 of file Title.java.
Referenced by org.swtchart.Chart.Chart(), and org.swtchart.internal.Title.updateLayoutData().
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.
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().
void org.swtchart.internal.Title.setText | ( | String | title | ) |
Sets the title text.
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().
void org.swtchart.internal.Title.setVisible | ( | boolean | visible | ) |
Sets the visibility state of title.
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().
void org.swtchart.internal.Title.updateLayoutData | ( | ) |
Updates the title layout data.
Definition at line 234 of file Title.java.
References org.swtchart.internal.Title.getFont(), org.swtchart.internal.Title.isHorizontal(), org.swtchart.internal.Title.isVisible(), org.swtchart.internal.Title.setLayoutData(), org.swtchart.internal.Title.styleRanges, org.swtchart.internal.Title.text, and org.swtchart.internal.Title.textLayout.
Referenced by org.swtchart.Chart.updateLayout(), and org.swtchart.internal.axis.Axis.updateLayoutData().
Rectangle org.swtchart.internal.Title.bounds [private] |
the bounds of title
Definition at line 56 of file Title.java.
Referenced by org.swtchart.internal.Title.getBounds(), org.swtchart.internal.Title.setBounds(), and org.swtchart.internal.Title.Title().
Chart org.swtchart.internal.Title.chart [protected] |
the chart
Definition at line 32 of file Title.java.
Referenced by org.swtchart.internal.Title.dispose(), org.swtchart.internal.Title.drawVerticalTitle(), org.swtchart.internal.Title.setFont(), org.swtchart.internal.Title.setStyleRanges(), org.swtchart.internal.Title.setText(), org.swtchart.internal.Title.setVisible(), and org.swtchart.internal.Title.Title().
final int org.swtchart.internal.Title.DEFAULT_FONT_SIZE = Constants.LARGE_FONT_SIZE [static, private] |
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().
final Font org.swtchart.internal.Title.defaultFont [private] |
the default font
Reimplemented in org.swtchart.internal.axis.AxisTitle.
Definition at line 53 of file Title.java.
Referenced by org.swtchart.internal.Title.dispose(), org.swtchart.internal.Title.getFont(), org.swtchart.internal.Title.setFont(), and org.swtchart.internal.Title.Title().
Font org.swtchart.internal.Title.font [private] |
the font
Definition at line 41 of file Title.java.
Referenced by org.swtchart.internal.Title.getFont(), and org.swtchart.internal.Title.Title().
Color org.swtchart.internal.Title.foreground [private] |
the foreground color
Definition at line 38 of file Title.java.
Referenced by org.swtchart.internal.Title.getForeground(), and org.swtchart.internal.Title.setForeground().
boolean org.swtchart.internal.Title.isVisible [protected] |
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] |
the style ranges
Definition at line 44 of file Title.java.
Referenced by org.swtchart.internal.Title.drawHorizontalTitle(), org.swtchart.internal.Title.drawVerticalTitle(), org.swtchart.internal.Title.getStyleRanges(), org.swtchart.internal.Title.setStyleRanges(), and org.swtchart.internal.Title.updateLayoutData().
String org.swtchart.internal.Title.text [protected] |
the title text
Definition at line 35 of file Title.java.
Referenced by org.swtchart.internal.Title.drawHorizontalTitle(), org.swtchart.internal.Title.drawVerticalTitle(), org.swtchart.internal.Title.getText(), org.swtchart.internal.Title.paintControl(), org.swtchart.internal.Title.Title(), and org.swtchart.internal.Title.updateLayoutData().
final TextLayout org.swtchart.internal.Title.textLayout [private] |
The text layout.
Definition at line 47 of file Title.java.
Referenced by org.swtchart.internal.Title.dispose(), org.swtchart.internal.Title.drawHorizontalTitle(), org.swtchart.internal.Title.drawVerticalTitle(), org.swtchart.internal.Title.setStyleRanges(), org.swtchart.internal.Title.setText(), org.swtchart.internal.Title.Title(), and org.swtchart.internal.Title.updateLayoutData().