public interface ILegend
Modifier and Type | Method and Description |
---|---|
Color |
getBackground()
Gets the background color of legend.
|
Rectangle |
getBounds(java.lang.String seriesId)
Gets the rectangle associated with the given series id on legend.
|
Font |
getFont()
Gets the font.
|
Color |
getForeground()
Gets the foreground color of legend.
|
int |
getPosition()
Gets the position of legend.
|
boolean |
isVisible()
Gets the visibility state.
|
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 position)
Sets the position of legend.
|
void |
setVisible(boolean visible)
Sets legend visible.
|
void setVisible(boolean visible)
visible
- the visibility stateboolean isVisible()
void setBackground(Color color)
color
- the background colorColor getBackground()
void setForeground(Color color)
color
- the foreground colorColor getForeground()
Font getFont()
void setFont(Font font)
font
- the fontint getPosition()
void setPosition(int position)
position
- the position of legend that can be SWT.LEFT,
SWT.RIGHT, SWT.TOP or SWT.BOTTOM.Rectangle getBounds(java.lang.String seriesId)
Mouse listener can be added by casting ILegend to Control.
Control legend = (Control) chart.getLegend(); legend.addMouseListener(...);
seriesId
- the series id