public void restoreTransformTo(Object geometry) { Object[] restoreData = (Object[]) geometry; TRANSFORM.basicSetClone(this, (AffineTransform) restoreData[0]); Point2D.Double[] restoredCoordinates = (Point2D.Double[]) restoreData[1]; for (int i = 0; i < this.coordinates.length; i++) { coordinates[i] = (Point2D.Double) restoredCoordinates[i].clone(); } FILL_GRADIENT.basicSetClone(this, (Gradient) restoreData[2]); STROKE_GRADIENT.basicSetClone(this, (Gradient) restoreData[3]); invalidate(); }