JHotDraw 7.3.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 Connector which locates a connection point at the bounds of any figure which has a rectangular shape, such as RectangleFigure.

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

Version:
$Id: ChopRectangleConnector.java 564 2009-10-10 10:21:01Z rawcoder $
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-2009 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.