/** * Removes the state of the given cell and all descendants if the given cell * is not the current root. * * @param cell * @param force * @param recurse */ public void clear(Object cell, boolean force, boolean recurse) { removeState(cell); if (recurse && (force || cell != currentRoot)) { mxIGraphModel model = graph.getModel(); int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { clear(model.getChildAt(cell, i), force, recurse); } } else { invalidate(cell); } }
/** * Removes the state of the given cell and all descendants if the given cell * is not the current root. * * @param cell * @param force * @param recurse */ public void clear(Object cell, boolean force, boolean recurse) { removeState(cell); if (recurse && (force || cell != currentRoot)) { mxIGraphModel model = graph.getModel(); int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { clear(model.getChildAt(cell, i), force, recurse); } } else { invalidate(cell); } }
modelcontainer.getGraph().getView().clear(modelcontainer.getGraph().getModel().getRoot(), true, true); modelcontainer.getGraph().getView().validate(); modelcontainer.getGraph().refresh();
/** * Refreshes the view for a cell. * * @param cell The cell. */ public void refreshCellView(mxICell cell) { if (layoutmanager != null) { mxIGraphLayout layout = layoutmanager.getLayout(cell); if (layout != null) { layout.execute(cell); } getView().clear(cell, true, false); getView().invalidate(cell); getView().validate(); refresh(); } }
graph.getView().clear(cell, false, true); previewState = null;
graph.getView().clear(cell, false, true); previewState = null;
graph.getView().clear(cell, false, true); previewState = null;