|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectComposite
org.swtchart.internal.Legend
public class Legend
A legend for chart.
| Constructor Summary | |
|---|---|
Legend(Chart chart,
int style)
Constructor. |
|
| Method Summary | |
|---|---|
void |
dispose()
|
protected void |
drawSymbol(GC gc,
Series series,
Rectangle r)
Draws the symbol of series. |
Rectangle |
getBounds(java.lang.String seriesId)
Gets the rectangle associated with the given series id on legend. |
int |
getPosition()
Gets the position of legend. |
boolean |
isVisible()
Gets the visibility state. |
void |
paintControl(PaintEvent e)
|
void |
setBackground(Color color)
Sets the background color of legend. |
void |
setFont(Font font)
Sets the font. |
void |
setForeground(Color color)
Sets the foreground color of legend. |
void |
setPosition(int value)
Sets the position of legend. |
void |
setVisible(boolean visible)
Sets legend visible. |
void |
updateLayoutData()
Update the layout data. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.swtchart.ILegend |
|---|
getBackground, getFont, getForeground |
| Constructor Detail |
|---|
public Legend(Chart chart,
int style)
chart - the chartstyle - the style| Method Detail |
|---|
public void setVisible(boolean visible)
ILegend
setVisible in interface ILegendvisible - the visibility statepublic boolean isVisible()
ILegend
isVisible in interface ILegendpublic void setFont(Font font)
ILegend
setFont in interface ILegendfont - the fontpublic void setForeground(Color color)
ILegend
setForeground in interface ILegendcolor - the foreground colorpublic void setBackground(Color color)
ILegend
setBackground in interface ILegendcolor - the background colorpublic int getPosition()
ILegend
getPosition in interface ILegendpublic void setPosition(int value)
ILegend
setPosition in interface ILegendvalue - the position of legend that can be SWT.LEFT,
SWT.RIGHT, SWT.TOP or SWT.BOTTOM.public Rectangle getBounds(java.lang.String seriesId)
ILegendMouse listener can be added by casting ILegend to Control.
Control legend = (Control) chart.getLegend(); legend.addMouseListener(...);
getBounds in interface ILegendseriesId - the series id
public void dispose()
public void updateLayoutData()
protected void drawSymbol(GC gc,
Series series,
Rectangle r)
gc - the graphics contextseries - the seriesr - the rectangle to draw the symbol of seriespublic void paintControl(PaintEvent e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||