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;
}