JHotDraw 6.0b1

Class ChangeConnectionEndHandle

  extended by org.jhotdraw.standard.AbstractHandle
      extended by org.jhotdraw.standard.ChangeConnectionHandle
          extended by org.jhotdraw.standard.ChangeConnectionEndHandle
All Implemented Interfaces:

public class ChangeConnectionEndHandle
extends ChangeConnectionHandle

A handle to reconnect the end point of a connection to another figure.

Nested Class Summary
static class ChangeConnectionEndHandle.UndoActivity
Field Summary
Fields inherited from class org.jhotdraw.standard.AbstractHandle
Constructor Summary
ChangeConnectionEndHandle(ConnectionFigure owner)
          Constructs the connection handle.
Method Summary
protected  boolean canConnectTo(Figure figure)
          Called to check whether this end of the connection can connect to the given target figure.
protected  void connect(Connector c)
          Sets the end of the connection.
protected  Undoable createUndoActivity(DrawingView newView)
          Factory method for undo activity
protected  void disconnect()
          Disconnects the end figure.
 void draw(java.awt.Graphics g)
          Draws this handle.
 java.awt.Point locate()
          Returns the end point of the connection.
protected  void setPoint(int x, int y)
          Sets the end point of the connection.
protected  Connector target()
          Gets the end figure of a connection.
Methods inherited from class org.jhotdraw.standard.ChangeConnectionHandle
findConnector, getConnection, getTargetFigure, invokeEnd, invokeStart, invokeStep, setConnection, setTargetFigure, source
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

Constructor Detail


public ChangeConnectionEndHandle(ConnectionFigure owner)
Constructs the connection handle.

Method Detail


protected Connector target()
Gets the end figure of a connection.

Specified by:
target in class ChangeConnectionHandle


protected void disconnect()
Disconnects the end figure.

Specified by:
disconnect in class ChangeConnectionHandle


protected void connect(Connector c)
Sets the end of the connection.

Specified by:
connect in class ChangeConnectionHandle


protected void setPoint(int x,
                        int y)
Sets the end point of the connection.

Specified by:
setPoint in class ChangeConnectionHandle


public java.awt.Point locate()
Returns the end point of the connection.


public void draw(java.awt.Graphics g)
Draws this handle.

Specified by:
draw in interface Handle
draw in class ChangeConnectionHandle
See Also:


protected Undoable createUndoActivity(DrawingView newView)
Factory method for undo activity

Specified by:
createUndoActivity in class ChangeConnectionHandle


protected boolean canConnectTo(Figure figure)
Description copied from class: ChangeConnectionHandle
Called to check whether this end of the connection can connect to the given target figure. Needs to be overriden by the start and end changers to take the connection's direction into account during the check. JHD 5.4 beta and before did not do this.

Specified by:
canConnectTo in class ChangeConnectionHandle

JHotDraw 6.0b1