public class DrawGraphicsPane extends GraphicsPane
Draw
. The graphics will normally be created by an
instance of the DrawActions
class.
Also provides a listener mechanism for Figure changes (selection, dragging).
Draw
,
DrawActions
_backgroundEventLayer, _backgroundLayer, _foregroundEventLayer, _foregroundLayer, _layers, _overlayLayer
Constructor and Description |
---|
DrawGraphicsPane(FigureDecorator decorator)
Constructor accepts a FigureDecorator.
|
Modifier and Type | Method and Description |
---|---|
void |
addFigure(Figure figure)
Add an existing Figure.
|
void |
addFigureDraggerListener(FigureListener l)
Add a FigureListener to the DragRegion used for interacting
with figures.
|
void |
addSelectionListener(SelectionListener l)
Add a listener for any SelectionEvents.
|
void |
addZoomDraggerListener(FigureListener l)
Add a FigureListener to the DragRegion used for non-figure
selection work.
|
void |
clearSelection()
Clear the selection.
|
void |
disableFigureDraggerSelection()
Switch off selection using the drag box interactor.
|
void |
enableFigureDraggerSelection()
Switch selection using the drag box interactor back on.
|
DrawController |
getController()
Get the controller.
|
FigureLayer |
getFigureLayer()
Get the figure layer that we draw into.
|
FigureProps |
getFigureProps(Figure figure)
Return the current properties of a figure.
|
Object[] |
getSelectionAsArray()
Get a list of the currently selected Figures.
|
SelectionInteractor |
getSelectionInteractor()
Get the selection interactor.
|
int |
indexOf(Figure figure)
Get the index of a Figure in the Figure Layer.
|
void |
lowerFigure(Figure figure)
Lower a Figure to the bottom of the ZList.
|
void |
raiseFigure(Figure figure)
Raise a figure to the front of the ZList.
|
void |
removeFigure(Figure figure)
Remove a Figure.
|
void |
removeFigureDraggerListener(FigureListener l)
Remove a FigureListener to the DragRegion used for interacting
with figures.
|
void |
removeZoomDraggerListener(FigureListener l)
Remove a FigureListener from the DragRegion used for non-figure
selection work.
|
void |
select(Figure figure)
Select the given figure.
|
_rebuildLayerArray, getBackgroundEventLayer, getBackgroundLayer, getForegroundEventLayer, getForegroundLayer, getOverlayLayer, layersFromBack, layersFromFront, setBackgroundEventLayer, setBackgroundLayer, setForegroundEventLayer, setForegroundLayer, setOverlayLayer
_initNewLayer, _nullifyLayer, dispatchEvent, getCanvas, getParent, getSize, getToolTipText, getTransformContext, isAntialiasing, isEnabled, layers, paint, paint, processLayerEvent, repaint, repaint, scale, setAntialiasing, setCanvas, setEnabled, setParent, setSize, setSize, setTransform, translate
public DrawGraphicsPane(FigureDecorator decorator)
DrawActions
and the TypedDecorator it creates).public void addFigure(Figure figure)
public int indexOf(Figure figure)
public void lowerFigure(Figure figure)
public void raiseFigure(Figure figure)
public SelectionInteractor getSelectionInteractor()
public DrawController getController()
public void addSelectionListener(SelectionListener l)
public Object[] getSelectionAsArray()
public void clearSelection()
public void select(Figure figure)
public FigureLayer getFigureLayer()
public void addFigureDraggerListener(FigureListener l)
public void removeFigureDraggerListener(FigureListener l)
public void addZoomDraggerListener(FigureListener l)
public void removeZoomDraggerListener(FigureListener l)
public void removeFigure(Figure figure)
figure
- the figure to remove.public FigureProps getFigureProps(Figure figure)
public void disableFigureDraggerSelection()
public void enableFigureDraggerSelection()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.