JHotDraw 7.5.1

org.jhotdraw.draw.connector
Class ChopRectangleConnector

java.lang.Object
  extended by org.jhotdraw.draw.connector.AbstractConnector
      extended by org.jhotdraw.draw.connector.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.

Version:
$Id: ChopRectangleConnector.java 647 2010-01-24 22:52:59Z 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.connector.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-2010 (c) by the authors and contributors of the JHotDraw project.
Some rights reserved.