|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.CanvasPane
diva.canvas.GraphicsPane
uk.ac.starlink.diva.DrawGraphicsPane
public class DrawGraphicsPane
The pane for displaying any interactive graphic Figures associated
with a 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
Field Summary |
---|
Fields inherited from class diva.canvas.GraphicsPane |
---|
_backgroundEventLayer, _backgroundLayer, _foregroundEventLayer, _foregroundLayer, _layers, _overlayLayer |
Constructor Summary | |
---|---|
DrawGraphicsPane(FigureDecorator decorator)
Constructor accepts a FigureDecorator. |
Method Summary | |
---|---|
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. |
Methods inherited from class diva.canvas.GraphicsPane |
---|
_rebuildLayerArray, getBackgroundEventLayer, getBackgroundLayer, getForegroundEventLayer, getForegroundLayer, getOverlayLayer, layersFromBack, layersFromFront, setBackgroundEventLayer, setBackgroundLayer, setForegroundEventLayer, setForegroundLayer, setOverlayLayer |
Methods inherited from class diva.canvas.CanvasPane |
---|
_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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DrawGraphicsPane(FigureDecorator decorator)
DrawActions
and the TypedDecorator it creates).
Method Detail |
---|
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()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |