/** @see org.eclipse.bpel.ui.editparts.BPELEditPart#refreshVisuals() */ public void refreshVisuals() { super.refreshVisuals(); // Refresh any decorations on this edit part this.hasFH = getFaultHandler() != null; this.hasEH = getEventHandler() != null; // Force a repaint, as the decorations. getFigure().repaint(); }
@Override protected ArrayList<PolylineConnection> createHorizontalConnections(BPELEditPart parent) { ArrayList<PolylineConnection> connections = new ArrayList<PolylineConnection>(); List children = getConnectionChildren(parent); BPELEditPart sourcePart, targetPart; ConnectionAnchor sourceAnchor = null, targetAnchor = null; sourcePart = parent; sourceAnchor = sourcePart.getConnectionAnchor(CenteredConnectionAnchor.LEFT); if (children != null) { for (int i = 0; i < children.size(); i++) { if (i == 0) { // Link from the left border to the first child targetPart = (BPELEditPart) children.get(i); targetAnchor = targetPart.getConnectionAnchor(CenteredConnectionAnchor.LEFT); if (sourceAnchor != null && targetAnchor != null) connections.add(createConnection(sourceAnchor, targetAnchor, arrowColor)); } if (i < children.size() - 1) { sourcePart = (BPELEditPart) children.get(i); sourceAnchor = sourcePart.getConnectionAnchor(CenteredConnectionAnchor.RIGHT); targetPart = (BPELEditPart) children.get(i + 1); targetAnchor = targetPart.getConnectionAnchor(CenteredConnectionAnchor.LEFT); } else { // Link from the last child to the right border sourcePart = (BPELEditPart) children.get(i); sourceAnchor = sourcePart.getConnectionAnchor(CenteredConnectionAnchor.RIGHT); targetAnchor = parent.getConnectionAnchor(CenteredConnectionAnchor.RIGHT); } if (sourceAnchor != null && targetAnchor != null) { PolylineConnection connection = createConnection(sourceAnchor, targetAnchor, arrowColor); if (sourcePart instanceof StartNodeEditPart || sourcePart instanceof ScopeEditPart || sourcePart instanceof InvokeEditPart) { boolean horizontal = ModelHelper.getBPELEditor(getHost().getModel()).isHorizontalLayout(); connection.setConnectionRouter(new ImplicitLinkHandlerConnectionRouter(horizontal)); } connections.add(connection); } } } return connections; }
@Override protected ArrayList<PolylineConnection> createHorizontalConnections(BPELEditPart parent) { ArrayList<PolylineConnection> connections = new ArrayList<PolylineConnection>(); List children = getConnectionChildren(parent); BPELEditPart sourcePart, targetPart; ConnectionAnchor sourceAnchor = null, targetAnchor = null; sourcePart = parent; sourceAnchor = sourcePart.getConnectionAnchor(CenteredConnectionAnchor.LEFT); if (children != null) { for (int i = 0; i < children.size(); i++) { if (i == 0) { targetPart = (BPELEditPart) children.get(i); targetAnchor = targetPart.getConnectionAnchor(CenteredConnectionAnchor.LEFT); if (sourceAnchor != null && targetAnchor != null) connections.add(createConnection(sourceAnchor, targetAnchor, arrowColor)); } if (i < children.size() - 1) { if (i > 0) { sourcePart = (BPELEditPart) children.get(i); sourceAnchor = sourcePart.getConnectionAnchor(CenteredConnectionAnchor.RIGHT); } targetPart = (BPELEditPart) children.get(i + 1); targetAnchor = targetPart.getConnectionAnchor(CenteredConnectionAnchor.LEFT); } else { // Link from the last child to the right border sourcePart = (BPELEditPart) children.get(i); sourceAnchor = sourcePart.getConnectionAnchor(CenteredConnectionAnchor.RIGHT); targetAnchor = parent.getConnectionAnchor(CenteredConnectionAnchor.RIGHT); } if (sourceAnchor != null && targetAnchor != null) connections.add(createConnection(sourceAnchor, targetAnchor, arrowColor)); } } return connections; }
protected void removeAllAdapters() { adapter.removedFrom(getProcess()); super.removeAllAdapters(); }
protected void addAllAdapters() { super.addAllAdapters(); adapter.addToObject(getProcess()); }