|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectCH.ifa.draw.standard.AbstractTool
CH.ifa.draw.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()| Field Summary |
|---|
| Fields inherited from class CH.ifa.draw.standard.AbstractTool |
|---|
fAnchorX, fAnchorY, fView |
| Constructor Summary | |
|---|---|
ConnectionTool(DrawingView view,
ConnectionFigure prototype)
|
|
| Method Summary | |
|---|---|
protected ConnectionFigure |
createConnection()
Creates the ConnectionFigure. |
protected ConnectionFigure |
createdFigure()
Gets the currently created figure |
void |
deactivate()
Deactivates the tool. |
protected ConnectionFigure |
findConnection(int x,
int y,
Drawing drawing)
Finds an existing connection figure. |
protected Figure |
findConnectionStart(int x,
int y,
Drawing drawing)
Finds a connection start figure. |
protected Figure |
findSource(int x,
int y,
Drawing drawing)
Finds a connectable figure target. |
protected Figure |
findTarget(int x,
int y,
Drawing drawing)
Finds a connectable figure target. |
protected Connector |
getEndConnector()
|
protected Connector |
getStartConnector()
|
protected Connector |
getTarget()
|
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. |
protected void |
trackConnectors(java.awt.event.MouseEvent e,
int x,
int y)
|
| Methods inherited from class CH.ifa.draw.standard.AbstractTool |
|---|
activate, drawing, editor, keyDown, view |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConnectionTool(DrawingView view,
ConnectionFigure prototype)
| Method Detail |
|---|
public void mouseMove(java.awt.event.MouseEvent e,
int x,
int y)
mouseMove in interface ToolmouseMove in class AbstractTool
public void mouseDown(java.awt.event.MouseEvent e,
int x,
int y)
mouseDown in interface ToolmouseDown in class AbstractTool
public void mouseDrag(java.awt.event.MouseEvent e,
int x,
int y)
mouseDrag in interface ToolmouseDrag in class AbstractTool
public void mouseUp(java.awt.event.MouseEvent e,
int x,
int y)
mouseUp in interface ToolmouseUp in class AbstractToolpublic void deactivate()
AbstractTool
deactivate in interface Tooldeactivate in class AbstractToolprotected ConnectionFigure createConnection()
protected Figure findSource(int x,
int y,
Drawing drawing)
protected Figure findTarget(int x,
int y,
Drawing drawing)
protected ConnectionFigure findConnection(int x,
int y,
Drawing drawing)
protected ConnectionFigure createdFigure()
protected void trackConnectors(java.awt.event.MouseEvent e,
int x,
int y)
protected Figure findConnectionStart(int x,
int y,
Drawing drawing)
protected Connector getStartConnector()
protected Connector getEndConnector()
protected Connector getTarget()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||