|
JHotDraw 7.1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.beans.AbstractBean
org.jhotdraw.draw.AbstractTool
org.jhotdraw.draw.SelectionTool
org.jhotdraw.draw.DelegationSelectionTool
public class DelegationSelectionTool
A SelectionTool, which recognizes double clicks and popup menu triggers. If a double click or popup trigger is encountered a hook method is called, which handles the event. This methods can be overriden in subclasse to provide customized behaviour.
By default, this Tool delegates mouse events to a specific Tool if the figure which has been double clicked, provides a specialized tool.
Field Summary |
---|
Fields inherited from class org.jhotdraw.draw.SelectionTool |
---|
SELECT_BEHIND_ENABLED_PROPERTY |
Fields inherited from class org.jhotdraw.draw.AbstractTool |
---|
anchor, editor, isWorking, listenerList |
Fields inherited from class org.jhotdraw.beans.AbstractBean |
---|
propertySupport |
Constructor Summary | |
---|---|
DelegationSelectionTool()
Creates a new instance. |
|
DelegationSelectionTool(java.util.Collection<javax.swing.Action> drawingActions,
java.util.Collection<javax.swing.Action> selectionActions)
Creates a new instance. |
Method Summary | |
---|---|
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)
|
Methods inherited from class org.jhotdraw.draw.SelectionTool |
---|
activate, areaInvalidated, createAreaTracker, createDragTracker, createHandleTracker, deactivate, draw, isSelectBehindEnabled, keyPressed, keyReleased, keyTyped, mouseEntered, mouseExited, mouseMoved, setSelectBehindEnabled, setTracker, toolDone, toolStarted |
Methods inherited from class org.jhotdraw.draw.AbstractTool |
---|
addToolListener, addUndoableEditListener, constrainPoint, constrainPoint, createActionMap, createInputMap, editCopy, editCut, editDelete, editDuplicate, editPaste, fireAreaInvalidated, fireAreaInvalidated, fireToolDone, fireToolStarted, getActionMap, getDrawing, getEditor, getInputMap, getView, isActive, removeToolListener, removeUndoableEditListener, setActionMap, setInputMap, updateCursor, viewToDrawing |
Methods inherited from class org.jhotdraw.beans.AbstractBean |
---|
addPropertyChangeListener, addPropertyChangeListener, clone, firePropertyChange, firePropertyChange, firePropertyChange, removePropertyChangeListener, removePropertyChangeListener |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DelegationSelectionTool()
public DelegationSelectionTool(java.util.Collection<javax.swing.Action> drawingActions, java.util.Collection<javax.swing.Action> selectionActions)
Method Detail |
---|
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)
|
Copyright 1996-2007 (c) JHotDraw.org. Some rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |