/** * */ public List<mxCellState> snapshot(mxCellState state) { List<mxCellState> result = new LinkedList<mxCellState>(); if (state != null) { result.add((mxCellState) state.clone()); mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); Object cell = state.getCell(); int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { result.addAll(snapshot(graph.getView().getState( model.getChildAt(cell, i)))); } } return result; }
/** * */ public List<mxCellState> snapshot(mxCellState state) { List<mxCellState> result = new LinkedList<mxCellState>(); if (state != null) { result.add((mxCellState) state.clone()); mxGraph graph = graphComponent.getGraph(); mxIGraphModel model = graph.getModel(); Object cell = state.getCell(); int childCount = model.getChildCount(cell); for (int i = 0; i < childCount; i++) { result.addAll(snapshot(graph.getView().getState( model.getChildAt(cell, i)))); } } return result; }
mxCellState clone = (mxCellState) state.clone(); List<mxPoint> points = geometry.getPoints(); mxGraphView view = clone.getView();
mxCellState clone = (mxCellState) state.clone(); List<mxPoint> points = geometry.getPoints(); mxGraphView view = clone.getView();