All Packages Class Hierarchy This Package Previous Next Index
Class CH.ifa.draw.standard.ConnectionHandle
java.lang.Object
|
+----CH.ifa.draw.standard.AbstractHandle
|
+----CH.ifa.draw.standard.LocatorHandle
|
+----CH.ifa.draw.standard.ConnectionHandle
- public class ConnectionHandle
- extends LocatorHandle
A handle to connect figures.
The connection object to be created is specified by a prototype.
Design Patterns
Prototype
ConnectionHandle creates the connection by cloning a prototype.
- See Also:
- ConnectionFigure, clone
-
ConnectionHandle(Figure, Locator, ConnectionFigure)
- Constructs a handle with the given owner, locator, and connection prototype
-
createConnection()
- Creates the ConnectionFigure.
-
draw(Graphics)
- Draws the connection handle, by default the outline of a
blue circle.
-
findConnectionTarget(int, int, Drawing)
- Finds a connection end figure.
-
findConnector(int, int, Figure)
-
-
invokeEnd(int, int, int, int, DrawingView)
- Connects the figures if the mouse is released over another
figure.
-
invokeStart(int, int, DrawingView)
- Creates the connection
-
invokeStep(int, int, int, int, DrawingView)
- Tracks the connection.
ConnectionHandle
public ConnectionHandle(Figure owner,
Locator l,
ConnectionFigure prototype)
- Constructs a handle with the given owner, locator, and connection prototype
invokeStart
public void invokeStart(int x,
int y,
DrawingView view)
- Creates the connection
- Overrides:
- invokeStart in class AbstractHandle
invokeStep
public void invokeStep(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
- Tracks the connection.
- Overrides:
- invokeStep in class AbstractHandle
invokeEnd
public void invokeEnd(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
- Connects the figures if the mouse is released over another
figure.
- Overrides:
- invokeEnd in class AbstractHandle
createConnection
protected ConnectionFigure createConnection()
- Creates the ConnectionFigure. By default the figure prototype is
cloned.
findConnectionTarget
protected Connector findConnectionTarget(int x,
int y,
Drawing drawing)
- Finds a connection end figure.
findConnector
protected Connector findConnector(int x,
int y,
Figure f)
draw
public void draw(Graphics g)
- Draws the connection handle, by default the outline of a
blue circle.
- Overrides:
- draw in class AbstractHandle
All Packages Class Hierarchy This Package Previous Next Index