use of org.eclipse.draw2d.PolylineConnection in project archi by archimatetool.
the class Graph method removeConnection.
void removeConnection(GraphConnection connection) {
IFigure figure = connection.getConnectionFigure();
PolylineConnection sourceContainerConnectionFigure = connection.getSourceContainerConnectionFigure();
PolylineConnection targetContainerConnectionFigure = connection.getTargetContainerConnectionFigure();
connection.removeFigure();
this.getConnections().remove(connection);
figure2ItemMap.remove(figure);
if (sourceContainerConnectionFigure != null) {
figure2ItemMap.remove(sourceContainerConnectionFigure);
}
if (targetContainerConnectionFigure != null) {
figure2ItemMap.remove(targetContainerConnectionFigure);
}
}
use of org.eclipse.draw2d.PolylineConnection in project jbosstools-hibernate by jbosstools.
the class DummyEdgePart method createFigure.
/**
* @see org.eclipse.gef.editparts.AbstractConnectionEditPart#createFigure()
*/
protected IFigure createFigure() {
PolylineConnection conn = new PolylineConnection();
conn.setConnectionRouter(new BendpointConnectionRouter());
conn.setVisible(false);
return conn;
}
use of org.eclipse.draw2d.PolylineConnection in project jbosstools-hibernate by jbosstools.
the class AssociationEditPart method createFigure.
protected IFigure createFigure() {
PolylineConnection polylineConnection = new PolylineConnection();
AssociationViewAdapter association = (AssociationViewAdapter) getModel();
polylineConnection.setTargetDecoration(association.getTargetDecoration());
ConnectionRouter connectionRouter = association.getConnectionRouter();
if (connectionRouter != null) {
polylineConnection.setConnectionRouter(connectionRouter);
}
AssociationViewAdapter ava = (AssociationViewAdapter) getModel();
if (ava.getAssociationName() != null) {
MidpointLocator mpl = new MidpointLocator(polylineConnection, 0);
polylineConnection.add(new Label(ava.getAssociationName()), mpl);
}
polylineConnection.setForegroundColor(ColorConstants.gray);
return polylineConnection;
}
Aggregations