public interface ILegend
Modifier and Type | Method and Description |
---|---|
org.eclipse.swt.graphics.Color |
getBackground()
Gets the background color of legend.
|
org.eclipse.swt.graphics.Rectangle |
getBounds(String seriesId)
Gets the rectangle associated with the given series id on legend.
|
org.eclipse.swt.graphics.Font |
getFont()
Gets the font.
|
org.eclipse.swt.graphics.Color |
getForeground()
Gets the foreground color of legend.
|
int |
getPosition()
Gets the position of legend.
|
boolean |
isVisible()
Gets the visibility state.
|
void |
setBackground(org.eclipse.swt.graphics.Color color)
Sets the background color of legend.
|
void |
setFont(org.eclipse.swt.graphics.Font font)
Sets the font.
|
void |
setForeground(org.eclipse.swt.graphics.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(org.eclipse.swt.graphics.Color color)
color
- the background colororg.eclipse.swt.graphics.Color getBackground()
void setForeground(org.eclipse.swt.graphics.Color color)
color
- the foreground colororg.eclipse.swt.graphics.Color getForeground()
org.eclipse.swt.graphics.Font getFont()
void setFont(org.eclipse.swt.graphics.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.org.eclipse.swt.graphics.Rectangle getBounds(String seriesId)
Mouse listener can be added by casting ILegend to Control.
Control legend = (Control) chart.getLegend(); legend.addMouseListener(...);
seriesId
- the series idCopyright © 2016. All Rights Reserved.