public class PlotGridComposite
extends org.eclipse.swt.widgets.Composite
PlotGridComposite
is designed to display a grid of drawn
IPlot
s. It includes widgets to customize the grid-based layout of the
plots. The order of a plot in the grid is based on its add order, and the
same plot can be added to the grid more than once.Constructor and Description |
---|
PlotGridComposite(org.eclipse.swt.widgets.Composite parent,
int style)
The default constructor.
|
Modifier and Type | Method and Description |
---|---|
int |
addPlot(IPlot plot)
Adds a plot to be drawn inside the plot grid.
|
void |
clearPlots()
Removes all drawn plots from the grid.
|
void |
dispose() |
void |
removePlot(int index)
Removes the drawn plot at the specified index in the grid.
|
void |
removePlots(IPlot plot)
Removes all renderings of the specified plot from the grid.
|
changed, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, 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, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
public PlotGridComposite(org.eclipse.swt.widgets.Composite parent, int style)
Composite
designed to display
a grid of Composites
populated by IPlot
implementations.parent
- A widget that will be the parent of the new instance (cannot
be null).style
- The style of widget to construct.public int addPlot(IPlot plot) throws java.lang.Exception
plot
- The plot to draw inside the grid.java.lang.Exception
- An exception is thrown if the IPlot
implementation
cannot be rendered.public void removePlot(int index)
index
- The index of the drawn plot to remove. If invalid, nothing is
done.public void removePlots(IPlot plot)
plot
- The plot whose renderings should be removed from the grid. If
invalid or not rendered, nothing is done.public void clearPlots()
public void dispose()
dispose
in class org.eclipse.swt.widgets.Widget