/** * Removes all cached information for the given cell and its descendants. * This is called when a cell was removed from the model. * * @param cell Cell that was removed from the model. */ protected void removeStateForCell(Object cell) { int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { removeStateForCell(model.getChildAt(cell, i)); } view.invalidate(cell); view.removeState(cell); }
/** * Removes all cached information for the given cell and its descendants. * This is called when a cell was removed from the model. * * @param cell Cell that was removed from the model. */ protected void removeStateForCell(Object cell) { int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { removeStateForCell(model.getChildAt(cell, i)); } view.invalidate(cell); view.removeState(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); } }
/** * 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); } }