JHotDraw 6.0b1

org.jhotdraw.standard
Class ChangeConnectionEndHandle

java.lang.Object
  extended by org.jhotdraw.standard.AbstractHandle
      extended by org.jhotdraw.standard.ChangeConnectionHandle
          extended by org.jhotdraw.standard.ChangeConnectionEndHandle
All Implemented Interfaces:
Handle

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
HANDLESIZE
 
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

ChangeConnectionEndHandle

public ChangeConnectionEndHandle(ConnectionFigure owner)
Constructs the connection handle.

Method Detail

target

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

Specified by:
target in class ChangeConnectionHandle

disconnect

protected void disconnect()
Disconnects the end figure.

Specified by:
disconnect in class ChangeConnectionHandle

connect

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

Specified by:
connect in class ChangeConnectionHandle

setPoint

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

Specified by:
setPoint in class ChangeConnectionHandle

locate

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


draw

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

Specified by:
draw in interface Handle
Overrides:
draw in class ChangeConnectionHandle
See Also:
Handle.draw(java.awt.Graphics)

createUndoActivity

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

Specified by:
createUndoActivity in class ChangeConnectionHandle

canConnectTo

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