|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jhotdraw.standard.AbstractHandle
org.jhotdraw.standard.LocatorHandle
org.jhotdraw.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 org.jhotdraw.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 | |
---|---|
void |
draw(java.awt.Graphics g)
Draws the connection handle, by default the outline of a blue circle. |
Cursor |
getCursor()
Returns the preferred Cursor for this Handle. |
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 org.jhotdraw.standard.LocatorHandle |
---|
getLocator, locate |
Methods inherited from class org.jhotdraw.standard.AbstractHandle |
---|
containsPoint, displayBox, getUndoActivity, invokeEnd, invokeStart, invokeStep, owner, setUndoActivity |
Methods inherited from class java.lang.Object |
---|
equals, 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 containerHandle.invokeStart(int, int, org.jhotdraw.framework.DrawingView)
public 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 startedHandle.invokeStep(int, int, int, int, org.jhotdraw.framework.DrawingView)
public 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 startedHandle.invokeEnd(int, int, int, int, org.jhotdraw.framework.DrawingView)
public void draw(java.awt.Graphics g)
draw
in interface Handle
draw
in class AbstractHandle
Handle.draw(java.awt.Graphics)
public Cursor getCursor()
Handle
getCursor
in interface Handle
getCursor
in class LocatorHandle
Handle.getCursor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |