@Test public void testCloning() throws CloneNotSupportedException { Stroke stroke = new BasicStroke(2.0f); XYLineAnnotation a1 = new XYLineAnnotation(10.0, 20.0, 100.0, 200.0, stroke, Color.BLUE); XYLineAnnotation a2 = (XYLineAnnotation) a1.clone(); assertNotSame(a1, a2); assertSame(a1.getClass(), a2.getClass()); assertEquals(a1, a2); }
@Override public Object clone() throws CloneNotSupportedException { return super.clone(); }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYLineAnnotation(double x1, double y1, double x2, double y2);  XYLineAnnotation(double x1, double y1, double x2, double y2,
                            Stroke stroke, Paint paint); }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYLineAnnotation(double x1, double y1, double x2, double y2);  XYLineAnnotation(double x1, double y1, double x2, double y2,
                            Stroke stroke, Paint paint); @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(); }
XYLineAnnotation extends AbstractXYAnnotation implements Cloneable, PublicCloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { return super.clone(); } XYLineAnnotation(double x1, double y1, double x2, double y2);  XYLineAnnotation(double x1, double y1, double x2, double y2,
                            Stroke stroke, Paint paint); @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();  }