public class SelectionDragger extends DragInteractor
Modifier and Type | Field and Description |
---|---|
protected Rectangle2D |
_rubberBand |
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 i)
Add a selection interactor to the list of valid interactor.
|
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 |
removeSelectionInteractor(SelectionInteractor i)
Remove a selection interactor from the list of valid interactors.
|
Iterator |
selectionInteractors()
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
protected Rectangle2D _rubberBand
public SelectionDragger()
public SelectionDragger(GraphicsPane gpane)
public void addSelectionInteractor(SelectionInteractor i)
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 removeSelectionInteractor(SelectionInteractor i)
public Iterator selectionInteractors()
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()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.