setSource(source); if (target != null) setTarget(target);
} else if (target) { edge.setPoint(edge.getPointCount() - 1, p); edge.setTarget(null);
overlay(graph.getGraphics()); edge.setTarget(portView); edge.update(graph.getGraphLayoutCache()); if (graph.isXorEnabled()) {
/** * Overrides the parent method to udpate the cached points, source and * target port. If the source or target is removed, a point is inserted into * the array of points. */ public void refresh(GraphLayoutCache cache, CellMapper mapper, boolean createDependentViews) { // Makes sure the manual control points are passed to // the router instead of the cached control points after // changes to the edge (normally manual point changes). initialiseDefaultPoints(); super.refresh(cache, mapper, createDependentViews); // Re-sync source- and targetportviews GraphModel model = cache.getModel(); Object modelSource = model.getSource(cell); Object modelTarget = model.getTarget(cell); setSource(mapper.getMapping(modelSource, createDependentViews)); setTarget(mapper.getMapping(modelTarget, createDependentViews)); if (modelSource != null && getSource() == null) sourceParentView = getVisibleParent(model, mapper, modelSource); else sourceParentView = null; if (modelTarget != null && getTarget() == null) targetParentView = getVisibleParent(model, mapper, modelTarget); else targetParentView = null; }
.getParentView().getAllAttributes()) && !contains(port.getCell())) { view.setTarget(null); cs.disconnect(view.getCell(), false);