/** * Invalidates all cell states. */ public void invalidate() { invalidate(null); }
/** * Invalidates all cell states. */ public void invalidate() { invalidate(null); }
/** * */ public void revalidate() { invalidate(); validate(); }
/** * */ public void revalidate() { invalidate(); validate(); }
/** * 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); }
/** * */ public void revalidate(mxCellState state) { state.getView().invalidate(state.getCell()); state.getView().validateCellState(state.getCell()); }
/** * */ public void revalidate(mxCellState state) { state.getView().invalidate(state.getCell()); state.getView().validateCellState(state.getCell()); }
/** * Invalidates the state of the given cell, all its descendants and * connected edges. */ public void invalidate(Object cell) { mxIGraphModel model = graph.getModel(); cell = (cell != null) ? cell : model.getRoot(); mxCellState state = getState(cell); if (state == null || !state.isInvalid()) { if (state != null) { state.setInvalid(true); } // Recursively invalidates all descendants int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { Object child = model.getChildAt(cell, i); invalidate(child); } // Propagates invalidation to all connected edges int edgeCount = model.getEdgeCount(cell); for (int i = 0; i < edgeCount; i++) { invalidate(model.getEdgeAt(cell, i)); } } }
/** * Invalidates the state of the given cell, all its descendants and * connected edges. */ public void invalidate(Object cell) { mxIGraphModel model = graph.getModel(); cell = (cell != null) ? cell : model.getRoot(); mxCellState state = getState(cell); if (state == null || !state.isInvalid()) { if (state != null) { state.setInvalid(true); } // Recursively invalidates all descendants int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { Object child = model.getChildAt(cell, i); invalidate(child); } // Propagates invalidation to all connected edges int edgeCount = model.getEdgeCount(cell); for (int i = 0; i < edgeCount; i++) { invalidate(model.getEdgeAt(cell, i)); } } }
geo.setX(dist * 0.2 + dist * count++); geo.setY(vpos); graph.getView().invalidate(vactivity);
/** * 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().invalidate(); modelcontainer.getGraph().getView().clear(modelcontainer.getGraph().getModel().getRoot(), true, true); modelcontainer.getGraph().getView().validate();
public void actionPerformed(ActionEvent e) { boolean selected = ((JCheckBox) e.getSource()).isSelected(); if (selected) { VActivity vsactivity = (VActivity) seqedge.getSource(); MActivity sactivity = (MActivity) vsactivity.getBpmnElement(); List<MSequenceEdge> edges = sactivity.getOutgoingSequenceEdges(); for (MSequenceEdge edge : edges) { edge.setDefault(false); } modelcontainer.getGraph().getView().invalidate(vsactivity); /*modelcontainer.getGraph().getModel().beginUpdate(); for (int i = 0; i < vsactivity.getEdgeCount(); ++i) { modelcontainer.getGraph().getModel().setStyle(vsactivity.getEdgeAt(i), VSequenceEdge.class.getSimpleName()); } modelcontainer.getGraph().getModel().endUpdate();*/ } getBpmnSequenceEdge().setDefault(selected); modelcontainer.getGraphComponent().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(); } }
view.invalidate(cell); view.invalidate(cell); view.invalidate(cell);
view.invalidate(cell); view.invalidate(cell); view.invalidate(cell);