|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ConnectionFigure
Figures to connect Connectors provided by Figures. A ConnectionFigure knows its start and end Connector. It uses the Connectors to locate its connection points.
A ConnectionFigure can have multiple segments. It provides operations to split and join segments.
Strategy
Strategy is used encapsulate the algorithm to locate the connection point.
ConnectionFigure is the Strategy context and Connector is the Strategy.
Observer
Observer is used to track changes of the connected figures. A connection
figure registers itself as listeners or observers of the source and
target connector.
Connector
Field Summary |
---|
Fields inherited from interface CH.ifa.draw.framework.Figure |
---|
POPUP_MENU |
Method Summary | |
---|---|
boolean |
canConnect(Figure start,
Figure end)
Checks if two figures can be connected. |
void |
connectEnd(Connector end)
Sets the end Connector of the connection. |
boolean |
connectsSame(ConnectionFigure other)
Checks if the ConnectionFigure connects the same figures. |
void |
connectStart(Connector start)
Sets the start Connector of the connection. |
void |
disconnectEnd()
Disconnects the end figure from the dependent figure |
void |
disconnectStart()
Disconnects the start figure from the dependent figure |
Connector |
end()
Gets the end Connector. |
java.awt.Point |
endPoint()
Gets the end point. |
void |
endPoint(int x,
int y)
Sets the end point. |
boolean |
joinSegments(int x,
int y)
Joins the hit segments. |
java.awt.Point |
pointAt(int index)
Gets the Point at the given position |
int |
pointCount()
Gets the number of points or nodes of the connection |
void |
setPointAt(java.awt.Point p,
int index)
Sets the position of the point at the given position |
int |
splitSegment(int x,
int y)
Splits the hit segment. |
Connector |
start()
Gets the start Connector |
java.awt.Point |
startPoint()
Gets the start point. |
void |
startPoint(int x,
int y)
Sets the start point. |
void |
updateConnection()
Updates the connection |
Methods inherited from interface CH.ifa.draw.framework.Figure |
---|
addFigureChangeListener, addToContainer, basicDisplayBox, canConnect, center, changed, clone, connectedTextLocator, connectionInsets, connectorAt, connectorVisibility, containsPoint, decompose, displayBox, displayBox, displayBox, draw, figures, findFigureInside, getAttribute, handles, includes, invalidate, isEmpty, listener, moveBy, release, removeFigureChangeListener, removeFromContainer, setAttribute, size, willChange |
Methods inherited from interface CH.ifa.draw.util.Storable |
---|
read, write |
Methods inherited from interface CH.ifa.draw.framework.FigureChangeListener |
---|
figureChanged, figureInvalidated, figureRemoved, figureRequestRemove, figureRequestUpdate |
Method Detail |
---|
void connectStart(Connector start)
figure
- the start figure of the connectionvoid connectEnd(Connector end)
figure
- the end figure of the connectionvoid updateConnection()
void disconnectStart()
void disconnectEnd()
Connector start()
Connector end()
boolean canConnect(Figure start, Figure end)
boolean connectsSame(ConnectionFigure other)
void startPoint(int x, int y)
void endPoint(int x, int y)
java.awt.Point startPoint()
java.awt.Point endPoint()
void setPointAt(java.awt.Point p, int index)
java.awt.Point pointAt(int index)
int pointCount()
int splitSegment(int x, int y)
x,
- y the position where the figure should be split
boolean joinSegments(int x, int y)
x,
- y the position where the figure should be joined.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |