use of org.eclipse.gef.editparts.AbstractConnectionEditPart in project tdi-studio-se by Talend.
the class TableEntityPart method refreshChildrenTargetConnections.
public void refreshChildrenTargetConnections(TableEntityPart rootPart, boolean expanded) {
for (Object obj : getChildren()) {
if (obj instanceof TableEntityPart) {
TableEntityPart part = (TableEntityPart) obj;
if (expanded) {
// do collapse
part.setRootAnchor(rootPart.getFigure());
} else {
part.setRootAnchor(null);
}
if (part.getTargetConnections() != null) {
for (Object conn : part.getTargetConnections()) {
if (conn instanceof AbstractConnectionEditPart) {
AbstractConnectionEditPart connectionEditPart = (AbstractConnectionEditPart) conn;
connectionEditPart.refresh();
// if (connectionEditPart.getFigure() instanceof PolylineConnection) {
// PolylineConnection connFigure = (PolylineConnection) connectionEditPart.getFigure();
// if (expanded) {
// connFigure.setLineStyle(SWT.LINE_DASHDOTDOT);
// } else {
// connFigure.setLineStyle(SWT.LINE_SOLID);
// }
// }
}
}
}
part.refreshChildrenTargetConnections(rootPart, expanded);
}
}
}
Aggregations