|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectCH.ifa.draw.standard.AbstractHandle
CH.ifa.draw.standard.LocatorHandle
CH.ifa.draw.standard.ConnectionHandle
public class ConnectionHandle
A handle to connect figures. The connection object to be created is specified by a prototype.
Prototype
ConnectionHandle creates the connection by cloning a prototype.
ConnectionFigure
,
Object.clone()
Field Summary |
---|
Fields inherited from class CH.ifa.draw.standard.AbstractHandle |
---|
HANDLESIZE |
Constructor Summary | |
---|---|
ConnectionHandle(Figure owner,
Locator l,
ConnectionFigure prototype)
Constructs a handle with the given owner, locator, and connection prototype |
Method Summary | |
---|---|
protected ConnectionFigure |
createConnection()
Creates the ConnectionFigure. |
void |
draw(java.awt.Graphics g)
Draws the connection handle, by default the outline of a blue circle. |
protected Connector |
findConnectionTarget(int x,
int y,
Drawing drawing)
Finds a connection end figure. |
protected Connector |
findConnector(int x,
int y,
Figure f)
|
void |
invokeEnd(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
Connects the figures if the mouse is released over another figure. |
void |
invokeStart(int x,
int y,
DrawingView view)
Creates the connection |
void |
invokeStep(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
Tracks the connection. |
Methods inherited from class CH.ifa.draw.standard.LocatorHandle |
---|
locate |
Methods inherited from class CH.ifa.draw.standard.AbstractHandle |
---|
containsPoint, displayBox, invokeEnd, invokeStart, invokeStep, owner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConnectionHandle(Figure owner, Locator l, ConnectionFigure prototype)
Method Detail |
---|
public void invokeStart(int x, int y, DrawingView view)
invokeStart
in interface Handle
invokeStart
in class AbstractHandle
x
- the x position where the interaction startedy
- the y position where the interaction startedview
- the handles containerpublic void invokeStep(int x, int y, int anchorX, int anchorY, DrawingView view)
invokeStep
in interface Handle
invokeStep
in class AbstractHandle
x
- the current x positiony
- the current y positionanchorX
- the x position where the interaction startedanchorY
- the y position where the interaction startedpublic void invokeEnd(int x, int y, int anchorX, int anchorY, DrawingView view)
invokeEnd
in interface Handle
invokeEnd
in class AbstractHandle
x
- the current x positiony
- the current y positionanchorX
- the x position where the interaction startedanchorY
- the y position where the interaction startedprotected ConnectionFigure createConnection()
protected Connector findConnectionTarget(int x, int y, Drawing drawing)
protected Connector findConnector(int x, int y, Figure f)
public void draw(java.awt.Graphics g)
draw
in interface Handle
draw
in class AbstractHandle
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |