/** * Remaps all existing views using the CellViewFactory * and replaces the respective root views. */ public synchronized void reload() { List newRoots = new ArrayList(); Map oldMapping = new Hashtable(mapping); mapping.clear(); Iterator it = oldMapping.keySet().iterator(); Set rootsSet = new HashSet(roots); while (it.hasNext()) { Object cell = it.next(); CellView oldView = (CellView) oldMapping.get(cell); CellView newView = getMapping(cell, true); newView.changeAttributes(this, oldView.getAttributes()); // newView.refresh(getModel(), this, false); if (rootsSet.contains(oldView)) newRoots.add(newView); } // replace hidden hiddenMapping.clear(); roots = newRoots; }
.getMapping(all[i].getCell(), false); AttributeMap attr = orig.getAllAttributes(); all[i].changeAttributes( graph.getGraphLayoutCache(), (AttributeMap) attr.clone());
AttributeMap origAttr = (AttributeMap) orig .getAllAttributes().clone(); all[i].changeAttributes(graph.getGraphLayoutCache(), origAttr); all[i].refresh(graph.getGraphLayoutCache(), context, false);
public CellView createMapping(Object cell) { CellView view = graphLayoutCache.getFactory().createView( graph.getModel(), cell); putMapping(cell, view); view.refresh(graph.getGraphLayoutCache(), this, true); // Create Dependent Views // Fetch Attributes From Original View CellView src = graphLayoutCache.getMapping(cell, false); if (src != null) { view.changeAttributes(graphLayoutCache, (AttributeMap) src.getAttributes().clone()); // Inserts portviews into points list view.refresh(graph.getGraphLayoutCache(), this, false); } return view; }