public class Title extends Object implements ITitle, org.eclipse.swt.events.PaintListener
| Modifier and Type | Field and Description |
|---|---|
protected Chart |
chart
the chart
|
protected boolean |
isVisible
the visibility state of axis
|
protected String |
text
the title text
|
| Modifier and Type | Method and Description |
|---|---|
void |
dispose()
Disposes the resources.
|
org.eclipse.swt.graphics.Rectangle |
getBounds()
Gets the bounds on chart panel.
|
protected String |
getDefaultText()
Gets the default title text.
|
org.eclipse.swt.graphics.Font |
getFont()
Gets the font.
|
org.eclipse.swt.graphics.Color |
getForeground()
Gets the foreground color.
|
ChartLayoutData |
getLayoutData()
Gets the layout data.
|
org.eclipse.swt.custom.StyleRange[] |
getStyleRanges()
Gets the style ranges.
|
String |
getText()
Gets the title text.
|
protected boolean |
isHorizontal()
Gets the state indicating if showing title horizontally.
|
boolean |
isVisible()
Gets the visibility state.
|
void |
paintControl(org.eclipse.swt.events.PaintEvent e) |
void |
setBounds(int x,
int y,
int width,
int height)
Sets the bounds on chart panel.
|
void |
setFont(org.eclipse.swt.graphics.Font font)
Sets the font.
|
void |
setForeground(org.eclipse.swt.graphics.Color color)
Sets the foreground color.
|
void |
setLayoutData(ChartLayoutData layoutData)
Sets the layout data.
|
void |
setStyleRanges(org.eclipse.swt.custom.StyleRange[] ranges)
Sets the style ranges.
|
void |
setText(String text)
Sets the title text.
|
void |
setVisible(boolean isVisible)
Sets the visibility state of title.
|
void |
updateLayoutData()
Updates the title layout data.
|
protected Chart chart
protected String text
protected boolean isVisible
public Title(Chart parent)
parent - the parent compositepublic void setText(String text)
ITitleprotected String getDefaultText()
public void setFont(org.eclipse.swt.graphics.Font font)
public org.eclipse.swt.graphics.Font getFont()
public void setForeground(org.eclipse.swt.graphics.Color color)
setForeground in interface ITitlecolor - the foreground colorpublic org.eclipse.swt.graphics.Color getForeground()
getForeground in interface ITitlepublic void setStyleRanges(org.eclipse.swt.custom.StyleRange[] ranges)
ITitleITitle.setFont(Font) and ITitle.setForeground(Color)
makes no effect. Instead, the font and background color in style ranges
are used.setStyleRanges in interface ITitleranges - the style ranges, or null to clear the currently set
style ranges.public org.eclipse.swt.custom.StyleRange[] getStyleRanges()
ITitlegetStyleRanges in interface ITitlepublic void setVisible(boolean isVisible)
ITitlesetVisible in interface ITitleisVisible - the visibility statepublic boolean isVisible()
ITitleprotected boolean isHorizontal()
public void updateLayoutData()
public void setLayoutData(ChartLayoutData layoutData)
layoutData - the layout datapublic ChartLayoutData getLayoutData()
public void dispose()
public void paintControl(org.eclipse.swt.events.PaintEvent e)
paintControl in interface org.eclipse.swt.events.PaintListenerpublic void setBounds(int x,
int y,
int width,
int height)
x - the x coordinatey - the y coordinatewidth - the widthheight - the heightpublic org.eclipse.swt.graphics.Rectangle getBounds()
Copyright © 2016. All Rights Reserved.