JHotDraw 7.1

org.jhotdraw.draw
Class ChopRectangleConnector

java.lang.Object
  extended by org.jhotdraw.draw.AbstractConnector
      extended by org.jhotdraw.draw.ChopRectangleConnector
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, Connector, DOMStorable
Direct Known Subclasses:
ChopBezierConnector, ChopDiamondConnector, ChopEllipseConnector, ChopRoundRectangleConnector, ChopTriangleConnector, StickyRectangleConnector

public class ChopRectangleConnector
extends AbstractConnector

A ChopRectangleConnector locates connection points by choping the connection between the centers of the two figures at the display box.

XXX - Replace all Chop...Connectors by a single ChopToCenterConnector and move method chop(Point2D.Double) into Figure interface.

Version:
2.2.2 2007-05-14 Fixed strange layout behavior while manipulating a connection.
2.2.1 2007-02-01 Added support for self-connecting connections.
2.2 2006-12-23 Renamed from ChopBoxConnector to ChopRectangleConnector.
2.1 2006-03-22 Support for total stroke width added.
2.0 2006-01-14 Changed to support double precision coordinates.
1.0 2003-12-01 Derived from JHotDraw 5.4b1.
Author:
Werner Randelshofer
See Also:
Connector, Serialized Form

Constructor Summary
ChopRectangleConnector()
          Creates a new instance.
ChopRectangleConnector(Figure owner)
           
 
Method Summary
protected  java.awt.geom.Point2D.Double chop(Figure target, java.awt.geom.Point2D.Double from)
           
 java.awt.geom.Point2D.Double findEnd(ConnectionFigure connection)
          Finds the end point for the connection.
 java.awt.geom.Point2D.Double findStart(ConnectionFigure connection)
          Finds the start point for the connection.
 
Methods inherited from class org.jhotdraw.draw.AbstractConnector
clone, contains, draw, findPoint, getAnchor, getBounds, getConnectorTarget, getDrawingArea, getOwner, isConnectToDecorator, read, setConnectToDecorator, setOwner, updateAnchor, updateEndLocation, updateStartLocation, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChopRectangleConnector

public ChopRectangleConnector()
Creates a new instance. Only used for storable.


ChopRectangleConnector

public ChopRectangleConnector(Figure owner)
Method Detail

findStart

public java.awt.geom.Point2D.Double findStart(ConnectionFigure connection)
Description copied from interface: Connector
Finds the start point for the connection.

Specified by:
findStart in interface Connector
Overrides:
findStart in class AbstractConnector

findEnd

public java.awt.geom.Point2D.Double findEnd(ConnectionFigure connection)
Description copied from interface: Connector
Finds the end point for the connection.

Specified by:
findEnd in interface Connector
Overrides:
findEnd in class AbstractConnector

chop

protected java.awt.geom.Point2D.Double chop(Figure target,
                                            java.awt.geom.Point2D.Double from)

Copyright 1996-2007 (c) JHotDraw.org.
Some rights reserved.