public class DelegationSelectionTool extends SelectionTool
By default, this Tool delegates mouse events to a specific Tool if the figure which has been double clicked, provides a specialized tool.
SELECT_BEHIND_ENABLED_PROPERTY
anchor, editor, isWorking, listenerList
propertySupport
Constructor and Description |
---|
DelegationSelectionTool()
Creates a new instance.
|
DelegationSelectionTool(java.util.Collection<javax.swing.Action> drawingActions,
java.util.Collection<javax.swing.Action> selectionActions)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getToolTipText(DrawingView view,
java.awt.event.MouseEvent evt)
Returns the tooltip text for a mouse event on a drawing view.
|
protected void |
handleDoubleClick(java.awt.event.MouseEvent evt)
Hook method which can be overriden by subclasses to provide
specialised behaviour in the event of a double click.
|
protected void |
handleMultiClick(java.awt.event.MouseEvent evt)
Hook method which can be overriden by subclasses to provide
specialised behaviour in the event of a multi-click.
|
protected void |
handlePopupMenu(java.awt.event.MouseEvent evt)
Hook method which can be overriden by subclasses to provide
specialised behaviour in the event of a popup trigger.
|
void |
mouseClicked(java.awt.event.MouseEvent evt) |
void |
mouseDragged(java.awt.event.MouseEvent evt) |
void |
mousePressed(java.awt.event.MouseEvent evt)
MouseListener method for mousePressed events.
|
void |
mouseReleased(java.awt.event.MouseEvent evt)
MouseListener method for mouseReleased events.
|
void |
setDrawingActions(java.util.Collection<javax.swing.Action> drawingActions) |
void |
setFigureActions(java.util.Collection<javax.swing.Action> selectionActions) |
protected void |
showPopupMenu(Figure figure,
java.awt.Point p,
java.awt.Component c) |
activate, deactivate, draw, getDragTracker, getHandleTracker, getSelectAreaTracker, isSelectBehindEnabled, keyPressed, keyReleased, keyTyped, mouseEntered, mouseExited, mouseMoved, setDragTracker, setHandleTracker, setSelectAreaTracker, setSelectBehindEnabled, setTracker, supportsHandleInteraction
addToolListener, addUndoableEditListener, constrainPoint, constrainPoint, createActionMap, createInputMap, editCopy, editCut, editDelete, editDuplicate, editPaste, fireAreaInvalidated, fireAreaInvalidated, fireBoundsInvalidated, fireToolDone, fireToolStarted, getActionMap, getDrawing, getEditor, getInputMap, getView, isActive, maybeFireBoundsInvalidated, removeToolListener, removeUndoableEditListener, setActionMap, setInputMap, updateCursor, viewToDrawing
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener
public DelegationSelectionTool()
public DelegationSelectionTool(java.util.Collection<javax.swing.Action> drawingActions, java.util.Collection<javax.swing.Action> selectionActions)
public void setDrawingActions(java.util.Collection<javax.swing.Action> drawingActions)
public void setFigureActions(java.util.Collection<javax.swing.Action> selectionActions)
public void mousePressed(java.awt.event.MouseEvent evt)
mousePressed
in interface java.awt.event.MouseListener
mousePressed
in class SelectionTool
public void mouseReleased(java.awt.event.MouseEvent evt)
mouseReleased
in interface java.awt.event.MouseListener
mouseReleased
in class SelectionTool
public void mouseDragged(java.awt.event.MouseEvent evt)
mouseDragged
in interface java.awt.event.MouseMotionListener
mouseDragged
in class SelectionTool
public void mouseClicked(java.awt.event.MouseEvent evt)
mouseClicked
in interface java.awt.event.MouseListener
mouseClicked
in class SelectionTool
protected void handlePopupMenu(java.awt.event.MouseEvent evt)
protected void showPopupMenu(Figure figure, java.awt.Point p, java.awt.Component c)
protected void handleDoubleClick(java.awt.event.MouseEvent evt)
protected void handleMultiClick(java.awt.event.MouseEvent evt)
public java.lang.String getToolTipText(DrawingView view, java.awt.event.MouseEvent evt)
Tool
getToolTipText
in interface Tool
getToolTipText
in class AbstractTool
view
- A drawing view.evt
- A mouse event.