|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.interactor.AbstractInteractor
diva.canvas.interactor.DragInteractor
diva.canvas.interactor.SelectionDragger
uk.ac.starlink.diva.DragRegion
public class DragRegion
A class that implements rubber-banding on a canvas. It contains references to one or more instances of SelectionInteractor, which it notifies whenever dragging includes or excludes a figure in the given layers (which can be from a GraphicsPane) and additionally (which is the reason for this class to be used instead of SelectionDragger) informs any FigureListeners when the region is released (uses of this are expected to be when creating figures and zooming the plot).
SelectionDragger
Field Summary | |
---|---|
protected EventListenerList |
listeners
|
Fields inherited from class diva.canvas.interactor.SelectionDragger |
---|
_rubberBand |
Constructor Summary | |
---|---|
DragRegion()
Create a new DragRegion. |
|
DragRegion(GraphicsPane gpane)
Create a new DragRegion attached to the given graphics pane. |
Method Summary | |
---|---|
void |
addListener(FigureListener l)
Registers a listener for to be informed when figure changes occur. |
protected void |
fireCompleted(LayerEvent le)
Send an event to all FigureListeners that this pseudo-figure has completed its work. |
Rectangle2D |
getFinalShape()
Get shape of rectangle when released. |
void |
mouseReleased(LayerEvent event)
Delete the rubber-band. |
void |
removeListener(FigureListener l)
Remove a listener. |
Methods inherited from class diva.canvas.interactor.SelectionDragger |
---|
addSelectionInteractor, clearSelection, contractSelection, expandSelection, getEventLayer, getFigureLayer, getOverlayLayer, getSelectionFilter, getToggleFilter, mouseDragged, mousePressed, removeSelectionInteractor, selectionInteractors, setEventLayer, setFigureLayer, setOverlayLayer, setSelectionFilter, setToggleFilter, terminateDragSelection |
Methods inherited from class diva.canvas.interactor.DragInteractor |
---|
addLayerListener, appendConstraint, constrainPoint, fireLayerEvent, getSelectiveEnabled, getTargetArray, getX, getY, prependConstraint, removeLayerListener, setSelectiveEnabled, setTargetArray, setup, targets, translate |
Methods inherited from class diva.canvas.interactor.AbstractInteractor |
---|
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseEntered, mouseExited, mouseMoved, setConsuming, setEnabled, setMotionEnabled, setMouseFilter |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected EventListenerList listeners
Constructor Detail |
---|
public DragRegion()
public DragRegion(GraphicsPane gpane)
Method Detail |
---|
public void mouseReleased(LayerEvent event)
mouseReleased
in interface LayerListener
mouseReleased
in class SelectionDragger
public Rectangle2D getFinalShape()
public void addListener(FigureListener l)
l
- the FigureListenerpublic void removeListener(FigureListener l)
l
- the FigureListenerprotected void fireCompleted(LayerEvent le)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |