org.swtchart.internal
public class Title extends Canvas implements ITitle
Modifier and Type | Field and Description |
---|---|
protected Chart |
chart
the chart
|
protected boolean |
isVisible
the visibility state of axis
|
protected java.lang.String |
text
the title text
|
Constructor and Description |
---|
Title(Chart parent,
int style)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected java.lang.String |
getDefaultText()
Gets the default title text.
|
StyleRange[] |
getStyleRanges()
Gets the style ranges.
|
java.lang.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(PaintEvent e) |
void |
setFont(Font font)
Sets the font for title text.
|
void |
setForeground(Color color)
Sets the foreground color of title.
|
void |
setStyleRanges(StyleRange[] ranges)
Sets the style ranges.
|
void |
setText(java.lang.String text)
Sets the title text.
|
void |
setVisible(boolean isVisible)
Sets the visibility state of title.
|
void |
updateLayoutData()
Updates the title layout data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFont, getForeground
protected Chart chart
protected java.lang.String text
protected boolean isVisible
public Title(Chart parent, int style)
parent
- the parent compositestyle
- the stylepublic void setText(java.lang.String text)
ITitle
protected java.lang.String getDefaultText()
public java.lang.String getText()
ITitle
public void setFont(Font font)
ITitle
public void setForeground(Color color)
ITitle
setForeground
in interface ITitle
color
- the foreground color of titlepublic void setStyleRanges(StyleRange[] ranges)
ITitle
ITitle.setFont(Font)
and ITitle.setForeground(Color)
makes no effect. Instead, the font and background color in style ranges
are used.setStyleRanges
in interface ITitle
ranges
- the style ranges, or null to clear the currently set
style ranges.public StyleRange[] getStyleRanges()
ITitle
getStyleRanges
in interface ITitle
public void setVisible(boolean isVisible)
ITitle
setVisible
in interface ITitle
isVisible
- the visibility statepublic boolean isVisible()
ITitle
protected boolean isHorizontal()
public void updateLayoutData()
public void dispose()
public void paintControl(PaintEvent e)