All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface CH.ifa.draw.framework.Connector

public interface interface Connector
extends Serializable, Storable
Connectors know how to locate a connection point on a figure. A Connector knows its owning figure and can determine either the start or the endpoint of a given connection figure. A connector has a display box that describes the area of a figure it is responsible for. A connector can be visible but it doesn't have to be.

Design Patterns

 o Strategy
Connector implements the strategy to determine the connections points.
 o Factory Method
Connectors are created by the Figure's factory method connectorAt.


See Also:
connectorAt, ConnectionFigure

Method Index

 o containsPoint(int, int)
Tests if a point is contained in the connector.
 o displayBox()
Gets the display box of the connector.
 o draw(Graphics)
Draws this connector.
 o findEnd(ConnectionFigure)
Finds the end point for the connection.
 o findStart(ConnectionFigure)
Finds the start point for the connection.
 o owner()
Gets the connector's owner.

Methods

 o findStart
 public abstract Point findStart(ConnectionFigure connection)
Finds the start point for the connection.

 o findEnd
 public abstract Point findEnd(ConnectionFigure connection)
Finds the end point for the connection.

 o owner
 public abstract Figure owner()
Gets the connector's owner.

 o displayBox
 public abstract Rectangle displayBox()
Gets the display box of the connector.

 o containsPoint
 public abstract boolean containsPoint(int x,
                                       int y)
Tests if a point is contained in the connector.

 o draw
 public abstract void draw(Graphics g)
Draws this connector. Connectors don't have to be visible and it is OK leave this method empty.


All Packages  Class Hierarchy  This Package  Previous  Next  Index