JHotDraw 6.0b1

org.jhotdraw.contrib
Class SplitConnectionTool

java.lang.Object
  extended by org.jhotdraw.standard.AbstractTool
      extended by org.jhotdraw.standard.ConnectionTool
          extended by org.jhotdraw.contrib.SplitConnectionTool
All Implemented Interfaces:
Tool

public class SplitConnectionTool
extends ConnectionTool


Nested Class Summary
 
Nested classes/interfaces inherited from class org.jhotdraw.standard.ConnectionTool
ConnectionTool.UndoActivity
 
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractTool
AbstractTool.EventDispatcher
 
Constructor Summary
SplitConnectionTool(DrawingEditor newDrawingEditor, ConnectionFigure newPrototype)
           
 
Method Summary
 void deactivate()
          Deactivates the tool.
protected  void init()
           
 void mouseDown(java.awt.event.MouseEvent e, int x, int y)
          Manipulates connections in a context dependent way.
 void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
          Adjust the created connection or split segment.
 void mouseMove(java.awt.event.MouseEvent e, int x, int y)
          Handles mouse move events in the drawing view.
 void mouseUp(java.awt.event.MouseEvent e, int x, int y)
          Connects the figures if the mouse is released over another figure.
 
Methods inherited from class org.jhotdraw.standard.ConnectionTool
createConnection, createUndoActivity, findConnectableFigure, findConnection, findConnectionStart, findConnector, findSource, findTarget, getAddedFigure, getConnection, getEndConnector, getStartConnector, getTargetConnector, getTargetFigure, setAddedFigure, setConnection, setEndConnector, setStartConnector, setTargetConnector, setTargetFigure, trackConnectors
 
Methods inherited from class org.jhotdraw.standard.AbstractTool
activate, addToolListener, checkUsable, createEventDispatcher, createViewChangeListener, drawing, editor, getActiveDrawing, getActiveView, getAnchorX, getAnchorY, getEventDispatcher, getUndoActivity, isActive, isEnabled, isUsable, keyDown, removeToolListener, setAnchorX, setAnchorY, setEditor, setEnabled, setUndoActivity, setUsable, setView, view, viewCreated, viewDestroying, viewSelectionChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SplitConnectionTool

public SplitConnectionTool(DrawingEditor newDrawingEditor,
                           ConnectionFigure newPrototype)
Method Detail

mouseDown

public void mouseDown(java.awt.event.MouseEvent e,
                      int x,
                      int y)
Description copied from class: ConnectionTool
Manipulates connections in a context dependent way. If the mouse down hits a figure start a new connection. If the mousedown hits a connection split a segment or join two segments.

Specified by:
mouseDown in interface Tool
Overrides:
mouseDown in class ConnectionTool

mouseUp

public void mouseUp(java.awt.event.MouseEvent e,
                    int x,
                    int y)
Description copied from class: ConnectionTool
Connects the figures if the mouse is released over another figure.

Specified by:
mouseUp in interface Tool
Overrides:
mouseUp in class ConnectionTool

mouseMove

public void mouseMove(java.awt.event.MouseEvent e,
                      int x,
                      int y)
Description copied from class: ConnectionTool
Handles mouse move events in the drawing view.

Specified by:
mouseMove in interface Tool
Overrides:
mouseMove in class ConnectionTool

mouseDrag

public void mouseDrag(java.awt.event.MouseEvent e,
                      int x,
                      int y)
Description copied from class: ConnectionTool
Adjust the created connection or split segment.

Specified by:
mouseDrag in interface Tool
Overrides:
mouseDrag in class ConnectionTool

deactivate

public void deactivate()
Description copied from class: AbstractTool
Deactivates the tool. This method is called whenever the user switches to another tool. Use this method to do some clean-up when the tool is switched. Subclassers should always call super.deactivate. An inactive tool should never be deactivated

Specified by:
deactivate in interface Tool
Overrides:
deactivate in class ConnectionTool

init

protected void init()

JHotDraw 6.0b1