/** * */ public double getCost(Object cell) { if (mapper != null) { CellView view = mapper.getMapping(cell, false); return getLength(view); } else { return 1.0; } }
protected CellView getVisibleParent(GraphModel model, CellMapper mapper, Object port) { CellView view = null; do { view = mapper.getMapping(port, false); port = model.getParent(port); } while (view == null && port != null); return view; }
final CellView view = mapper.getMapping(node, false); if (view != null)
key = view.getCell(); } else if (cm != null) // else is assumed by clients! view = cm.getMapping(key, false); if (view != null)
CellView tmp = mapper.getMapping(par, createDependentViews); if (tmp != parent) removeFromParent(); for (int i = 0; i < model.getChildCount(cell); i++) { Object child = model.getChild(cell, i); CellView view = mapper.getMapping(child, createDependentViews); if (!model.isPort(child) && view != null) childViews.add(view);
+ sourceRow + "-" + targetRow; GraphConstants.setPoints(attributes, nodeChain); CellView view = mapper.getMapping(edge, false); if (view != null)
/** * 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; }
PortView portView = (PortView) mapper.getMapping(port, false); edgeLength = portView.getLocation().getX() - node.position.getX();