|
||||||||||
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.ChangeConnectionHandle
ChangeConnectionHandle factors the common code for handles that can be used to reconnect connections.
ChangeConnectionEndHandle
,
ChangeConnectionStartHandle
Nested Class Summary | |
static class |
ChangeConnectionHandle.UndoActivity
|
Field Summary |
Fields inherited from class org.jhotdraw.standard.AbstractHandle |
HANDLESIZE |
Constructor Summary | |
protected |
ChangeConnectionHandle(ConnectionFigure owner)
Initializes the change connection handle. |
Method Summary | |
protected abstract boolean |
canConnectTo(Figure figure)
Called to check whether this end of the connection can connect to the given target figure. |
protected abstract void |
connect(Connector c)
Connect the connection with the given figure. |
protected abstract Undoable |
createUndoActivity(DrawingView newView)
Factory method for undo activity. |
protected abstract void |
disconnect()
Disconnects the connection. |
void |
draw(java.awt.Graphics g)
Draws this handle. |
protected Connector |
findConnector(int x,
int y,
Figure f)
|
protected ConnectionFigure |
getConnection()
|
protected Figure |
getTargetFigure()
|
void |
invokeEnd(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
Connects the figure to the new target. |
void |
invokeStart(int x,
int y,
DrawingView view)
Disconnects the connection. |
void |
invokeStep(int x,
int y,
int anchorX,
int anchorY,
DrawingView view)
Finds a new target of the connection. |
protected void |
setConnection(ConnectionFigure newConnection)
|
protected abstract void |
setPoint(int x,
int y)
Sets the location of the target point. |
protected void |
setTargetFigure(Figure newTarget)
|
protected Connector |
source()
Gets the side of the connection that is unaffected by the change. |
protected abstract Connector |
target()
Returns the target connector of the change. |
Methods inherited from class org.jhotdraw.standard.AbstractHandle |
containsPoint, displayBox, getCursor, getUndoActivity, invokeEnd, invokeStart, invokeStep, owner, setUndoActivity |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jhotdraw.framework.Handle |
locate |
Constructor Detail |
protected ChangeConnectionHandle(ConnectionFigure owner)
Method Detail |
protected abstract Connector target()
protected abstract void disconnect()
protected abstract void connect(Connector c)
protected abstract void setPoint(int x, int y)
protected Connector source()
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)
protected abstract boolean canConnectTo(Figure figure)
protected Connector findConnector(int x, int y, Figure f)
public void draw(java.awt.Graphics g)
draw
in interface Handle
draw
in class AbstractHandle
Handle.draw(java.awt.Graphics)
protected void setConnection(ConnectionFigure newConnection)
protected ConnectionFigure getConnection()
protected void setTargetFigure(Figure newTarget)
protected Figure getTargetFigure()
protected abstract Undoable createUndoActivity(DrawingView newView)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |