public class SelectionDragger extends DragInteractor
Constructor and Description |
---|
SelectionDragger()
Create a new SelectionDragger
|
SelectionDragger(GraphicsPane gpane)
Create a new SelectionDragger attached to the given graphics
pane.
|
Modifier and Type | Method and Description |
---|---|
void |
addSelectionInteractor(SelectionInteractor interactor)
Add the selection model of the given selection interactor to the
set of selection models selected by this dragger.
|
void |
addSelectionModel(SelectionModel model)
Add the given selection model to the set of selection models
selected by this dragger.
|
void |
clearSelection()
Clear the selection in all the relevant selection interactors.
|
void |
contractSelection(SelectionInteractor i,
Figure figure)
Contract the selection by removing an item from it and
removing highlight rendering.
|
void |
expandSelection(SelectionInteractor i,
Figure figure)
Expand the selection by adding an item to it and adding
highlight rendering to it.
|
EventLayer |
getEventLayer()
Get the layer that drag events are listened on
|
FigureLayer |
getFigureLayer()
Get the layer that figures are selected on
|
OverlayLayer |
getOverlayLayer()
Get the layer that drag rectangles are drawn on
|
MouseFilter |
getSelectionFilter()
Get the mouse filter that controls when this selection
filter is activated.
|
MouseFilter |
getToggleFilter()
Get the mouse filter that controls the toggling of
selections
|
void |
mouseDragged(LayerEvent event)
Reshape the rubber-band, swapping coordinates if necessary.
|
void |
mousePressed(LayerEvent event)
Clear the selection, and create the rubber-band
|
void |
mouseReleased(LayerEvent event)
Delete the rubber-band
|
void |
removeSelectionModel(SelectionModel model)
Remove a selection model from the list of models selected by
this dragger.
|
java.util.Iterator |
selectionModels()
Get the selection interactors
|
void |
setEventLayer(EventLayer l)
Set the layer that drag events are listened on
|
void |
setFigureLayer(FigureLayer l)
Set the layer that figures are selected on
|
void |
setOverlayLayer(OverlayLayer l)
Set the layer that drag rectangles are drawn on
|
void |
setSelectionFilter(MouseFilter f)
Set the mouse filter that controls when this selection
filter is activated.
|
void |
setToggleFilter(MouseFilter f)
Set the mouse filter that controls the toggling of
selections.
|
void |
terminateDragSelection()
Terminate drag-selection operation.
|
addLayerListener, appendConstraint, constrainPoint, fireLayerEvent, getSelectiveEnabled, getTargetArray, getX, getY, prependConstraint, removeLayerListener, setSelectiveEnabled, setTargetArray, setup, targets, translate
accept, getMouseFilter, isConsuming, isEnabled, isMotionEnabled, mouseClicked, mouseEntered, mouseExited, mouseMoved, setConsuming, setEnabled, setMotionEnabled, setMouseFilter
public SelectionDragger()
public SelectionDragger(GraphicsPane gpane)
public void addSelectionModel(SelectionModel model)
public void addSelectionInteractor(SelectionInteractor interactor)
public void clearSelection()
public void contractSelection(SelectionInteractor i, Figure figure)
public void expandSelection(SelectionInteractor i, Figure figure)
public OverlayLayer getOverlayLayer()
public EventLayer getEventLayer()
public FigureLayer getFigureLayer()
public MouseFilter getSelectionFilter()
public MouseFilter getToggleFilter()
public void mouseDragged(LayerEvent event)
mouseDragged
in interface LayerListener
mouseDragged
in class DragInteractor
public void mousePressed(LayerEvent event)
mousePressed
in interface LayerListener
mousePressed
in class DragInteractor
public void mouseReleased(LayerEvent event)
mouseReleased
in interface LayerListener
mouseReleased
in class DragInteractor
public void removeSelectionModel(SelectionModel model)
public java.util.Iterator selectionModels()
public void setOverlayLayer(OverlayLayer l)
public void setEventLayer(EventLayer l)
public void setFigureLayer(FigureLayer l)
public void setSelectionFilter(MouseFilter f)
public void setToggleFilter(MouseFilter f)
public void terminateDragSelection()