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
Strategy
Connector implements the strategy to determine the connections points.
Factory Method
Connectors are created by the Figure's factory method connectorAt.
- See Also:
- connectorAt, ConnectionFigure
-
containsPoint(int, int)
- Tests if a point is contained in the connector.
-
displayBox()
- Gets the display box of the connector.
-
draw(Graphics)
- Draws this connector.
-
findEnd(ConnectionFigure)
- Finds the end point for the connection.
-
findStart(ConnectionFigure)
- Finds the start point for the connection.
-
owner()
- Gets the connector's owner.
findStart
public abstract Point findStart(ConnectionFigure connection)
- Finds the start point for the connection.
findEnd
public abstract Point findEnd(ConnectionFigure connection)
- Finds the end point for the connection.
owner
public abstract Figure owner()
- Gets the connector's owner.
displayBox
public abstract Rectangle displayBox()
- Gets the display box of the connector.
containsPoint
public abstract boolean containsPoint(int x,
int y)
- Tests if a point is contained in the connector.
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