protected mxRectangle apply(TreeNode node, mxRectangle bounds)
	{
		mxIGraphModel model = graph.getModel();
		Object cell = node.cell;
		mxRectangle g = model.getGeometry(cell);

		if (cell != null && g != null)
		{
			if (isVertexMovable(cell))
			{
				g = setVertexLocation(cell, node.x, node.y);

				if (resizeParent)
				{
					parentsChanged.add(model.getParent(cell));
				}
			}

			if (bounds == null)
			{
				bounds = new mxRectangle(g.getX(), g.getY(), g.getWidth(),
						g.getHeight());
			}
			else
			{
				bounds = new mxRectangle(Math.min(bounds.getX(), g.getX()),
						Math.min(bounds.getY(), g.getY()), Math.max(
								bounds.getX() + bounds.getWidth(),
								g.getX() + g.getWidth()), Math.max(
								bounds.getY() + bounds.getHeight(), g.getY()
										+ g.getHeight()));
			}
		}

		return bounds;
	}