@Test public void testCloning() throws CloneNotSupportedException { Stroke stroke1 = new BasicStroke(2.0f); XYPolygonAnnotation a1 = new XYPolygonAnnotation(new double[] {1.0, 2.0, 3.0, 4.0, 5.0, 6.0}, stroke1, Color.RED, Color.BLUE); XYPolygonAnnotation a2 = (XYPolygonAnnotation) a1.clone(); assertNotSame(a1, a2); assertSame(a1.getClass(), a2.getClass()); assertEquals(a1, a2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
XYPolygonAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
XYPolygonAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYPolygonAnnotation(double[] polygon);  XYPolygonAnnotation(double[] polygon,
                               Stroke stroke, Paint outlinePaint);  XYPolygonAnnotation(double[] polygon,
                               Stroke stroke,
                               Paint outlinePaint, Paint fillPaint); }
XYPolygonAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYPolygonAnnotation(double[] polygon);  XYPolygonAnnotation(double[] polygon,
                               Stroke stroke, Paint outlinePaint);  XYPolygonAnnotation(double[] polygon,
                               Stroke stroke,
                               Paint outlinePaint, Paint fillPaint); double[] getPolygonCoordinates(); Paint getFillPaint(); Stroke getOutlineStroke(); Paint getOutlinePaint(); @Override void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea,
                     ValueAxis domainAxis, ValueAxis rangeAxis,
                     int rendererIndex, PlotRenderingInfo info); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone(); }
XYPolygonAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYPolygonAnnotation(double[] polygon);  XYPolygonAnnotation(double[] polygon,
                               Stroke stroke, Paint outlinePaint);  XYPolygonAnnotation(double[] polygon,
                               Stroke stroke,
                               Paint outlinePaint, Paint fillPaint); double[] getPolygonCoordinates(); Paint getFillPaint(); Stroke getOutlineStroke(); Paint getOutlinePaint(); @Override void draw(Graphics2D g2, XYPlot plot, Rectangle2D dataArea,
                     ValueAxis domainAxis, ValueAxis rangeAxis,
                     int rendererIndex, PlotRenderingInfo info); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }