|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractTool
org.jhotdraw.standard.ConnectionTool
public class ConnectionTool
A tool that can be used to connect figures, to split connections, and to join two segments of a connection. ConnectionTools turns the visibility of the Connectors on when it enters a figure. The connection object to be created is specified by a prototype.
Prototype
ConnectionTools creates the connection by cloning a prototype.
ConnectionFigure
,
Object.clone()
Nested Class Summary | |
---|---|
static class |
ConnectionTool.UndoActivity
|
Nested classes/interfaces inherited from class org.jhotdraw.standard.AbstractTool |
---|
AbstractTool.EventDispatcher |
Constructor Summary | |
---|---|
ConnectionTool(DrawingEditor newDrawingEditor,
ConnectionFigure newPrototype)
|
Method Summary | |
---|---|
void |
deactivate()
Deactivates the tool. |
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.AbstractTool |
---|
activate, addToolListener, drawing, editor, getActiveDrawing, getActiveView, getUndoActivity, isActive, isEnabled, isUsable, keyDown, removeToolListener, setEnabled, setUndoActivity, setUsable, view |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionTool(DrawingEditor newDrawingEditor, ConnectionFigure newPrototype)
Method Detail |
---|
public void mouseMove(java.awt.event.MouseEvent e, int x, int y)
mouseMove
in interface Tool
mouseMove
in class AbstractTool
public void mouseDown(java.awt.event.MouseEvent e, int x, int y)
mouseDown
in interface Tool
mouseDown
in class AbstractTool
public void mouseDrag(java.awt.event.MouseEvent e, int x, int y)
mouseDrag
in interface Tool
mouseDrag
in class AbstractTool
public void mouseUp(java.awt.event.MouseEvent e, int x, int y)
mouseUp
in interface Tool
mouseUp
in class AbstractTool
public void deactivate()
AbstractTool
deactivate
in interface Tool
deactivate
in class AbstractTool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |