Class Title
java.lang.Object
org.swtchart.internal.Title
- All Implemented Interfaces:
EventListener, org.eclipse.swt.events.PaintListener, org.eclipse.swt.internal.SWTEventListener, ITitle
- Direct Known Subclasses:
AxisTitle, ChartTitle
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Disposes the resources.org.eclipse.swt.graphics.RectangleGets the bounds on chart panel.protected StringGets the default title text.org.eclipse.swt.graphics.FontgetFont()Gets the font.org.eclipse.swt.graphics.ColorGets the foreground color.Gets the layout data.org.eclipse.swt.custom.StyleRange[]Gets the style ranges.getText()Gets the title text.protected booleanGets the state indicating if showing title horizontally.booleanGets the visibility state.voidpaintControl(org.eclipse.swt.events.PaintEvent e) voidsetBounds(int x, int y, int width, int height) Sets the bounds on chart panel.voidsetFont(org.eclipse.swt.graphics.Font font) Sets the font.voidsetForeground(org.eclipse.swt.graphics.Color color) Sets the foreground color.voidsetLayoutData(ChartLayoutData layoutData) Sets the layout data.voidsetStyleRanges(org.eclipse.swt.custom.StyleRange[] ranges) Sets the style ranges.voidSets the title text.voidsetVisible(boolean isVisible) Sets the visibility state of title.voidUpdates the title layout data.
-
Field Details
-
chart
the chart -
text
the title text -
isVisible
protected boolean isVisiblethe visibility state of axis
-
-
Constructor Details
-
Title
-
-
Method Details
-
setText
-
getDefaultText
-
getText
-
setFont
-
getFont
-
setForeground
public void setForeground(org.eclipse.swt.graphics.Color color) Sets the foreground color.- Specified by:
setForegroundin interfaceITitle- Parameters:
color- the foreground color
-
getForeground
public org.eclipse.swt.graphics.Color getForeground()Gets the foreground color.- Specified by:
getForegroundin interfaceITitle- Returns:
- the foreground color
-
setStyleRanges
public void setStyleRanges(org.eclipse.swt.custom.StyleRange[] ranges) Description copied from interface:ITitleSets the style ranges. When style ranges are set, the font and background color set byITitle.setFont(Font)andITitle.setForeground(Color)makes no effect. Instead, the font and background color in style ranges are used.- Specified by:
setStyleRangesin interfaceITitle- Parameters:
ranges- the style ranges, or null to clear the currently set style ranges.
-
getStyleRanges
public org.eclipse.swt.custom.StyleRange[] getStyleRanges()Description copied from interface:ITitleGets the style ranges.- Specified by:
getStyleRangesin interfaceITitle- Returns:
- the style ranges
-
setVisible
public void setVisible(boolean isVisible) Description copied from interface:ITitleSets the visibility state of title.- Specified by:
setVisiblein interfaceITitle- Parameters:
isVisible- the visibility state
-
isVisible
-
isHorizontal
protected boolean isHorizontal()Gets the state indicating if showing title horizontally.- Returns:
- the state indicating if showing title horizontally
-
updateLayoutData
public void updateLayoutData()Updates the title layout data. -
setLayoutData
Sets the layout data.- Parameters:
layoutData- the layout data
-
getLayoutData
-
dispose
public void dispose()Disposes the resources. -
paintControl
public void paintControl(org.eclipse.swt.events.PaintEvent e) - Specified by:
paintControlin interfaceorg.eclipse.swt.events.PaintListener
-
setBounds
public void setBounds(int x, int y, int width, int height) Sets the bounds on chart panel.- Parameters:
x- the x coordinatey- the y coordinatewidth- the widthheight- the height
-
getBounds
public org.eclipse.swt.graphics.Rectangle getBounds()Gets the bounds on chart panel.- Returns:
- the bounds on chart panel
-