|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Strategy
Connector implements the strategy to determine the connections points.
Factory Method
Connectors are created by the Figure's factory method connectorAt.
Figure.connectorAt(int, int)
,
ConnectionFigure
Method Summary | |
void |
connectorVisibility(boolean isVisible,
ConnectionFigure courtingConnection)
Requests that the connector should show itself or hide itself. |
boolean |
containsPoint(int x,
int y)
Tests if a point is contained in the connector. |
java.awt.Rectangle |
displayBox()
Gets the display box of the connector. |
void |
draw(java.awt.Graphics g)
Draws this connector. |
java.awt.Point |
findEnd(ConnectionFigure connection)
Finds the end point for the connection. |
java.awt.Point |
findStart(ConnectionFigure connection)
Finds the start point for the connection. |
Figure |
owner()
Gets the connector's owner. |
Methods inherited from interface org.jhotdraw.util.Storable |
read, write |
Method Detail |
public java.awt.Point findStart(ConnectionFigure connection)
public java.awt.Point findEnd(ConnectionFigure connection)
public Figure owner()
public java.awt.Rectangle displayBox()
public boolean containsPoint(int x, int y)
public void draw(java.awt.Graphics g)
public void connectorVisibility(boolean isVisible, ConnectionFigure courtingConnection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |