@Test public void testCloning() throws CloneNotSupportedException { CompassPlot p1 = new CompassPlot(new DefaultValueDataset(15.0)); CompassPlot p2 = (CompassPlot) p1.clone(); assertNotSame(p1, p2); assertSame(p1.getClass(), p2.getClass()); assertEquals(p1, p2); }
@Override public Object clone() throws CloneNotSupportedException { CompassPlot clone = (CompassPlot) super.clone(); if (this.circle1 != null) { clone.circle1 = (Ellipse2D) this.circle1.clone(); } if (this.circle2 != null) { clone.circle2 = (Ellipse2D) this.circle2.clone(); } if (this.a1 != null) { clone.a1 = (Area) this.a1.clone(); } if (this.a2 != null) { clone.a2 = (Area) this.a2.clone(); } if (this.rect1 != null) { clone.rect1 = (Rectangle2D) this.rect1.clone(); } clone.datasets = this.datasets.clone(); clone.seriesNeedle = this.seriesNeedle.clone(); for (int i = 0; i < this.datasets.length; ++i) { if (clone.datasets[i] != null) { clone.datasets[i].addChangeListener(clone); } } return clone; }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { CompassPlot clone = (CompassPlot) super.clone(); if (this.circle1 != null) { clone.circle1 = (Ellipse2D) this.circle1.clone(); } if (this.circle2 != null) { clone.circle2 = (Ellipse2D) this.circle2.clone(); } if (this.a1 != null) { clone.a1 = (Area) this.a1.clone(); } if (this.a2 != null) { clone.a2 = (Area) this.a2.clone(); } if (this.rect1 != null) { clone.rect1 = (Rectangle2D) this.rect1.clone(); } clone.datasets = this.datasets.clone(); clone.seriesNeedle = this.seriesNeedle.clone(); for (int i = 0; i < this.datasets.length; ++i) { if (clone.datasets[i] != null) { clone.datasets[i].addChangeListener(clone); } } return clone; } }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { CompassPlot clone = (CompassPlot) super.clone(); if (this.circle1 != null) { clone.circle1 = (Ellipse2D) this.circle1.clone(); } if (this.circle2 != null) { clone.circle2 = (Ellipse2D) this.circle2.clone(); } if (this.a1 != null) { clone.a1 = (Area) this.a1.clone(); } if (this.a2 != null) { clone.a2 = (Area) this.a2.clone(); } if (this.rect1 != null) { clone.rect1 = (Rectangle2D) this.rect1.clone(); } clone.datasets = this.datasets.clone(); clone.seriesNeedle = this.seriesNeedle.clone(); for (int i = 0; i < this.datasets.length; ++i) { if (clone.datasets[i] != null) { clone.datasets[i].addChangeListener(clone); } } return clone; } CompassPlot();  CompassPlot(ValueDataset dataset); }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { CompassPlot clone = (CompassPlot) super.clone(); if (this.circle1 != null) { clone.circle1 = (Ellipse2D) this.circle1.clone(); } if (this.circle2 != null) { clone.circle2 = (Ellipse2D) this.circle2.clone(); } if (this.a1 != null) { clone.a1 = (Area) this.a1.clone(); } if (this.a2 != null) { clone.a2 = (Area) this.a2.clone(); } if (this.rect1 != null) { clone.rect1 = (Rectangle2D) this.rect1.clone(); } clone.datasets = this.datasets.clone(); clone.seriesNeedle = this.seriesNeedle.clone(); for (int i = 0; i < this.datasets.length; ++i) { if (clone.datasets[i] != null) { clone.datasets[i].addChangeListener(clone); } } return clone; } CompassPlot();  CompassPlot(ValueDataset dataset); int getLabelType(); void setLabelType(int type); Font getLabelFont(); void setLabelFont(Font font); Paint getRosePaint(); void setRosePaint(Paint paint); Paint getRoseCenterPaint(); void setRoseCenterPaint(Paint paint); Paint getRoseHighlightPaint(); void setRoseHighlightPaint(Paint paint); boolean getDrawBorder(); void setDrawBorder(boolean status); void setSeriesPaint(int series, Paint paint); void setSeriesOutlinePaint(int series, Paint p); void setSeriesOutlineStroke(int series, Stroke stroke); void setSeriesNeedle(int type); void setSeriesNeedle(int index, int type); void setSeriesNeedle(int index, MeterNeedle needle); ValueDataset[] getDatasets(); void addDataset(ValueDataset dataset); void addDataset(ValueDataset dataset, MeterNeedle needle); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState,
                     PlotRenderingInfo info); @Override String getPlotType(); @Override List<LegendItem> getLegendItems(); @Override void zoom(double percent); @Override boolean equals(Object obj); @Override Object clone(); void setRevolutionDistance(double size); double getRevolutionDistance(); }
CompassPlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { CompassPlot clone = (CompassPlot) super.clone(); if (this.circle1 != null) { clone.circle1 = (Ellipse2D) this.circle1.clone(); } if (this.circle2 != null) { clone.circle2 = (Ellipse2D) this.circle2.clone(); } if (this.a1 != null) { clone.a1 = (Area) this.a1.clone(); } if (this.a2 != null) { clone.a2 = (Area) this.a2.clone(); } if (this.rect1 != null) { clone.rect1 = (Rectangle2D) this.rect1.clone(); } clone.datasets = this.datasets.clone(); clone.seriesNeedle = this.seriesNeedle.clone(); for (int i = 0; i < this.datasets.length; ++i) { if (clone.datasets[i] != null) { clone.datasets[i].addChangeListener(clone); } } return clone; } CompassPlot();  CompassPlot(ValueDataset dataset); int getLabelType(); void setLabelType(int type); Font getLabelFont(); void setLabelFont(Font font); Paint getRosePaint(); void setRosePaint(Paint paint); Paint getRoseCenterPaint(); void setRoseCenterPaint(Paint paint); Paint getRoseHighlightPaint(); void setRoseHighlightPaint(Paint paint); boolean getDrawBorder(); void setDrawBorder(boolean status); void setSeriesPaint(int series, Paint paint); void setSeriesOutlinePaint(int series, Paint p); void setSeriesOutlineStroke(int series, Stroke stroke); void setSeriesNeedle(int type); void setSeriesNeedle(int index, int type); void setSeriesNeedle(int index, MeterNeedle needle); ValueDataset[] getDatasets(); void addDataset(ValueDataset dataset); void addDataset(ValueDataset dataset, MeterNeedle needle); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
                     PlotState parentState,
                     PlotRenderingInfo info); @Override String getPlotType(); @Override List<LegendItem> getLegendItems(); @Override void zoom(double percent); @Override boolean equals(Object obj); @Override Object clone(); void setRevolutionDistance(double size); double getRevolutionDistance(); static final Font DEFAULT_LABEL_FONT; static final int NO_LABELS; static final int VALUE_LABELS; }