| Constructor | Description |
|---|---|
Legend(Chart chart,
int style) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
dispose() |
|
protected void |
drawSymbol(org.eclipse.swt.graphics.GC gc,
Series series,
org.eclipse.swt.graphics.Rectangle r) |
Draws the symbol of series.
|
org.eclipse.swt.graphics.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(org.eclipse.swt.events.PaintEvent e) |
|
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 value) |
Sets the position of legend.
|
void |
setVisible(boolean visible) |
Sets legend visible.
|
void |
updateLayoutData() |
Update the layout data.
|
changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getClientArea, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabListaddControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updategetBackground, getFont, getForegroundclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic Legend(Chart chart, int style)
chart - the chartstyle - the stylepublic void setVisible(boolean visible)
ILegendsetVisible in interface ILegendsetVisible in class org.eclipse.swt.widgets.Controlvisible - the visibility statepublic boolean isVisible()
ILegendpublic void setFont(org.eclipse.swt.graphics.Font font)
ILegendpublic void setForeground(org.eclipse.swt.graphics.Color color)
ILegendsetForeground in interface ILegendsetForeground in class org.eclipse.swt.widgets.Controlcolor - the foreground colorpublic void setBackground(org.eclipse.swt.graphics.Color color)
ILegendsetBackground in interface ILegendsetBackground in class org.eclipse.swt.widgets.Controlcolor - the background colorpublic int getPosition()
ILegendgetPosition in interface ILegendpublic void setPosition(int value)
ILegendsetPosition in interface ILegendvalue - the position of legend that can be SWT.LEFT,
SWT.RIGHT, SWT.TOP or SWT.BOTTOM.public org.eclipse.swt.graphics.Rectangle getBounds(java.lang.String seriesId)
ILegendMouse listener can be added by casting ILegend to Control.
Control legend = (Control) chart.getLegend(); legend.addMouseListener(...);
public void dispose()
dispose in class org.eclipse.swt.widgets.Widgetpublic void updateLayoutData()
protected void drawSymbol(org.eclipse.swt.graphics.GC gc,
Series series,
org.eclipse.swt.graphics.Rectangle r)
gc - the graphics contextseries - the seriesr - the rectangle to draw the symbol of seriespublic void paintControl(org.eclipse.swt.events.PaintEvent e)
paintControl in interface org.eclipse.swt.events.PaintListener