* Returns a dirty rectangle to be repainted in mxGraphControl.
*/
public mxRectangle show()
{
mxGraph graph = graphComponent.getGraph();
mxIGraphModel model = graph.getModel();
// Stores a copy of the cell states
List<mxCellState> previousStates = null;
if (isCloned())
{
previousStates = new LinkedList<mxCellState>();
Iterator<mxCellState> it = deltas.keySet().iterator();
while (it.hasNext())
{
mxCellState state = it.next();
previousStates.addAll(snapshot(state));
}
}
// Translates the states in step
Iterator<mxCellState> it = deltas.keySet().iterator();
while (it.hasNext())
{
mxCellState state = it.next();
mxPoint delta = deltas.get(state);
mxCellState parentState = graph.getView().getState(
model.getParent(state.getCell()));
translateState(parentState, state, delta.getX(), delta.getY());
}
// Revalidates the states in step
mxRectangle dirty = null;
it = deltas.keySet().iterator();
while (it.hasNext())
{
mxCellState state = it.next();
mxPoint delta = deltas.get(state);
mxCellState parentState = graph.getView().getState(
model.getParent(state.getCell()));
mxRectangle tmp = revalidateState(parentState, state, delta.getX(),
delta.getY());
if (dirty != null)
{