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)
ITitle
protected 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 ITitle
color
- the foreground colorpublic org.eclipse.swt.graphics.Color getForeground()
getForeground
in interface ITitle
public void setStyleRanges(org.eclipse.swt.custom.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 org.eclipse.swt.custom.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 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.PaintListener
public 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 © 2014. All Rights Reserved.