@Override
	public Object clone()
	{
		mxCellState clone = new mxCellState(view, cell, style);
		
		if (label != null)
		{
			clone.label = label;
		}

		if (absolutePoints != null)
		{
			clone.absolutePoints = new ArrayList<mxPoint>();

			for (int i = 0; i < absolutePoints.size(); i++)
			{
				clone.absolutePoints.add((mxPoint) absolutePoints.get(i)
						.clone());
			}
		}

		if (origin != null)
		{
			clone.origin = (mxPoint) origin.clone();
		}

		if (absoluteOffset != null)
		{
			clone.absoluteOffset = (mxPoint) absoluteOffset.clone();
		}

		if (labelBounds != null)
		{
			clone.labelBounds = (mxRectangle) labelBounds.clone();
		}

		if (boundingBox != null)
		{
			clone.boundingBox = (mxRectangle) boundingBox.clone();
		}

		clone.terminalDistance = terminalDistance;
		clone.segments = segments;
		clone.length = length;
		clone.x = x;
		clone.y = y;
		clone.width = width;
		clone.height = height;

		return clone;
	}