@Test public void testCloning() throws CloneNotSupportedException { PiePlot p1 = new PiePlot(); PiePlot p2 = (PiePlot) p1.clone(); assertNotSame(p1, p2); assertSame(p1.getClass(), p2.getClass()); assertEquals(p1, p2); }
@Override public Object clone() throws CloneNotSupportedException { PiePlot clone = (PiePlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } if (this.urlGenerator instanceof PublicCloneable) { clone.urlGenerator = ObjectUtilities.clone( this.urlGenerator); } clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape); if (this.legendLabelGenerator != null) { clone.legendLabelGenerator = ObjectUtilities.clone(this.legendLabelGenerator); } if (this.legendLabelToolTipGenerator != null) { clone.legendLabelToolTipGenerator = ObjectUtilities.clone(this.legendLabelToolTipGenerator); } if (this.legendLabelURLGenerator instanceof PublicCloneable) { clone.legendLabelURLGenerator = ObjectUtilities.clone(this.legendLabelURLGenerator); } return clone; }
PiePlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { PiePlot clone = (PiePlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } if (this.urlGenerator instanceof PublicCloneable) { clone.urlGenerator = ObjectUtilities.clone( this.urlGenerator); } clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape); if (this.legendLabelGenerator != null) { clone.legendLabelGenerator = ObjectUtilities.clone(this.legendLabelGenerator); } if (this.legendLabelToolTipGenerator != null) { clone.legendLabelToolTipGenerator = ObjectUtilities.clone(this.legendLabelToolTipGenerator); } if (this.legendLabelURLGenerator instanceof PublicCloneable) { clone.legendLabelURLGenerator = ObjectUtilities.clone(this.legendLabelURLGenerator); } return clone; } }
PiePlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { PiePlot clone = (PiePlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } if (this.urlGenerator instanceof PublicCloneable) { clone.urlGenerator = ObjectUtilities.clone( this.urlGenerator); } clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape); if (this.legendLabelGenerator != null) { clone.legendLabelGenerator = ObjectUtilities.clone(this.legendLabelGenerator); } if (this.legendLabelToolTipGenerator != null) { clone.legendLabelToolTipGenerator = ObjectUtilities.clone(this.legendLabelToolTipGenerator); } if (this.legendLabelURLGenerator instanceof PublicCloneable) { clone.legendLabelURLGenerator = ObjectUtilities.clone(this.legendLabelURLGenerator); } return clone; } PiePlot();  PiePlot(PieDataset dataset); }
PiePlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { PiePlot clone = (PiePlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } if (this.urlGenerator instanceof PublicCloneable) { clone.urlGenerator = ObjectUtilities.clone( this.urlGenerator); } clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape); if (this.legendLabelGenerator != null) { clone.legendLabelGenerator = ObjectUtilities.clone(this.legendLabelGenerator); } if (this.legendLabelToolTipGenerator != null) { clone.legendLabelToolTipGenerator = ObjectUtilities.clone(this.legendLabelToolTipGenerator); } if (this.legendLabelURLGenerator instanceof PublicCloneable) { clone.legendLabelURLGenerator = ObjectUtilities.clone(this.legendLabelURLGenerator); } return clone; } PiePlot();  PiePlot(PieDataset dataset); PieDataset getDataset(); void setDataset(PieDataset dataset); int getPieIndex(); void setPieIndex(int index); double getStartAngle(); void setStartAngle(double angle); Rotation getDirection(); void setDirection(Rotation direction); double getInteriorGap(); void setInteriorGap(double percent); boolean isCircular(); void setCircular(boolean flag); void setCircular(boolean circular, boolean notify); boolean getIgnoreNullValues(); void setIgnoreNullValues(boolean flag); boolean getIgnoreZeroValues(); void setIgnoreZeroValues(boolean flag); Paint getSectionPaint(Comparable key); void setSectionPaint(Comparable key, Paint paint); void clearSectionPaints(boolean notify); Paint getBaseSectionPaint(); void setBaseSectionPaint(Paint paint); boolean getAutoPopulateSectionPaint(); void setAutoPopulateSectionPaint(boolean auto); boolean getSectionOutlinesVisible(); void setSectionOutlinesVisible(boolean visible); Paint getSectionOutlinePaint(Comparable key); void setSectionOutlinePaint(Comparable key, Paint paint); void clearSectionOutlinePaints(boolean notify); Paint getBaseSectionOutlinePaint(); void setBaseSectionOutlinePaint(Paint paint); boolean getAutoPopulateSectionOutlinePaint(); void setAutoPopulateSectionOutlinePaint(boolean auto); Stroke getSectionOutlineStroke(Comparable key); void setSectionOutlineStroke(Comparable key, Stroke stroke); void clearSectionOutlineStrokes(boolean notify); Stroke getBaseSectionOutlineStroke(); void setBaseSectionOutlineStroke(Stroke stroke); boolean getAutoPopulateSectionOutlineStroke(); void setAutoPopulateSectionOutlineStroke(boolean auto); Paint getShadowPaint(); void setShadowPaint(Paint paint); double getShadowXOffset(); void setShadowXOffset(double offset); double getShadowYOffset(); void setShadowYOffset(double offset); double getExplodePercent(Comparable key); void setExplodePercent(Comparable key, double percent); double getMaximumExplodePercent(); PieSectionLabelGenerator getLabelGenerator(); void setLabelGenerator(PieSectionLabelGenerator generator); double getLabelGap(); void setLabelGap(double gap); double getMaximumLabelWidth(); void setMaximumLabelWidth(double width); boolean getLabelLinksVisible(); void setLabelLinksVisible(boolean visible); PieLabelLinkStyle getLabelLinkStyle(); void setLabelLinkStyle(PieLabelLinkStyle style); double getLabelLinkMargin(); void setLabelLinkMargin(double margin); Paint getLabelLinkPaint(); void setLabelLinkPaint(Paint paint); Stroke getLabelLinkStroke(); void setLabelLinkStroke(Stroke stroke); Font getLabelFont(); void setLabelFont(Font font); Paint getLabelPaint(); void setLabelPaint(Paint paint); Paint getLabelBackgroundPaint(); void setLabelBackgroundPaint(Paint paint); Paint getLabelOutlinePaint(); void setLabelOutlinePaint(Paint paint); Stroke getLabelOutlineStroke(); void setLabelOutlineStroke(Stroke stroke); Paint getLabelShadowPaint(); void setLabelShadowPaint(Paint paint); RectangleInsets getLabelPadding(); void setLabelPadding(RectangleInsets padding); boolean getSimpleLabels(); void setSimpleLabels(boolean simple); RectangleInsets getSimpleLabelOffset(); void setSimpleLabelOffset(RectangleInsets offset); AbstractPieLabelDistributor getLabelDistributor(); void setLabelDistributor(AbstractPieLabelDistributor distributor); PieToolTipGenerator getToolTipGenerator(); void setToolTipGenerator(PieToolTipGenerator generator); PieURLGenerator getURLGenerator(); void setURLGenerator(PieURLGenerator generator); double getMinimumArcAngleToDraw(); void setMinimumArcAngleToDraw(double angle); Shape getLegendItemShape(); void setLegendItemShape(Shape shape); PieSectionLabelGenerator getLegendLabelGenerator(); void setLegendLabelGenerator(PieSectionLabelGenerator generator); PieSectionLabelGenerator getLegendLabelToolTipGenerator(); void setLegendLabelToolTipGenerator(
            PieSectionLabelGenerator generator); PieURLGenerator getLegendLabelURLGenerator(); void setLegendLabelURLGenerator(PieURLGenerator generator); ShadowGenerator getShadowGenerator(); void setShadowGenerator(ShadowGenerator generator); void handleMouseWheelRotation(int rotateClicks); PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea,
            PiePlot plot, Integer index, PlotRenderingInfo info); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); @Override List<LegendItem> getLegendItems(); @Override String getPlotType(); @Override boolean equals(Object obj); @Override Object clone(); }
PiePlot extends Plot implements Cloneable, Serializable { @Override public Object clone() throws CloneNotSupportedException { PiePlot clone = (PiePlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } if (this.urlGenerator instanceof PublicCloneable) { clone.urlGenerator = ObjectUtilities.clone( this.urlGenerator); } clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape); if (this.legendLabelGenerator != null) { clone.legendLabelGenerator = ObjectUtilities.clone(this.legendLabelGenerator); } if (this.legendLabelToolTipGenerator != null) { clone.legendLabelToolTipGenerator = ObjectUtilities.clone(this.legendLabelToolTipGenerator); } if (this.legendLabelURLGenerator instanceof PublicCloneable) { clone.legendLabelURLGenerator = ObjectUtilities.clone(this.legendLabelURLGenerator); } return clone; } PiePlot();  PiePlot(PieDataset dataset); PieDataset getDataset(); void setDataset(PieDataset dataset); int getPieIndex(); void setPieIndex(int index); double getStartAngle(); void setStartAngle(double angle); Rotation getDirection(); void setDirection(Rotation direction); double getInteriorGap(); void setInteriorGap(double percent); boolean isCircular(); void setCircular(boolean flag); void setCircular(boolean circular, boolean notify); boolean getIgnoreNullValues(); void setIgnoreNullValues(boolean flag); boolean getIgnoreZeroValues(); void setIgnoreZeroValues(boolean flag); Paint getSectionPaint(Comparable key); void setSectionPaint(Comparable key, Paint paint); void clearSectionPaints(boolean notify); Paint getBaseSectionPaint(); void setBaseSectionPaint(Paint paint); boolean getAutoPopulateSectionPaint(); void setAutoPopulateSectionPaint(boolean auto); boolean getSectionOutlinesVisible(); void setSectionOutlinesVisible(boolean visible); Paint getSectionOutlinePaint(Comparable key); void setSectionOutlinePaint(Comparable key, Paint paint); void clearSectionOutlinePaints(boolean notify); Paint getBaseSectionOutlinePaint(); void setBaseSectionOutlinePaint(Paint paint); boolean getAutoPopulateSectionOutlinePaint(); void setAutoPopulateSectionOutlinePaint(boolean auto); Stroke getSectionOutlineStroke(Comparable key); void setSectionOutlineStroke(Comparable key, Stroke stroke); void clearSectionOutlineStrokes(boolean notify); Stroke getBaseSectionOutlineStroke(); void setBaseSectionOutlineStroke(Stroke stroke); boolean getAutoPopulateSectionOutlineStroke(); void setAutoPopulateSectionOutlineStroke(boolean auto); Paint getShadowPaint(); void setShadowPaint(Paint paint); double getShadowXOffset(); void setShadowXOffset(double offset); double getShadowYOffset(); void setShadowYOffset(double offset); double getExplodePercent(Comparable key); void setExplodePercent(Comparable key, double percent); double getMaximumExplodePercent(); PieSectionLabelGenerator getLabelGenerator(); void setLabelGenerator(PieSectionLabelGenerator generator); double getLabelGap(); void setLabelGap(double gap); double getMaximumLabelWidth(); void setMaximumLabelWidth(double width); boolean getLabelLinksVisible(); void setLabelLinksVisible(boolean visible); PieLabelLinkStyle getLabelLinkStyle(); void setLabelLinkStyle(PieLabelLinkStyle style); double getLabelLinkMargin(); void setLabelLinkMargin(double margin); Paint getLabelLinkPaint(); void setLabelLinkPaint(Paint paint); Stroke getLabelLinkStroke(); void setLabelLinkStroke(Stroke stroke); Font getLabelFont(); void setLabelFont(Font font); Paint getLabelPaint(); void setLabelPaint(Paint paint); Paint getLabelBackgroundPaint(); void setLabelBackgroundPaint(Paint paint); Paint getLabelOutlinePaint(); void setLabelOutlinePaint(Paint paint); Stroke getLabelOutlineStroke(); void setLabelOutlineStroke(Stroke stroke); Paint getLabelShadowPaint(); void setLabelShadowPaint(Paint paint); RectangleInsets getLabelPadding(); void setLabelPadding(RectangleInsets padding); boolean getSimpleLabels(); void setSimpleLabels(boolean simple); RectangleInsets getSimpleLabelOffset(); void setSimpleLabelOffset(RectangleInsets offset); AbstractPieLabelDistributor getLabelDistributor(); void setLabelDistributor(AbstractPieLabelDistributor distributor); PieToolTipGenerator getToolTipGenerator(); void setToolTipGenerator(PieToolTipGenerator generator); PieURLGenerator getURLGenerator(); void setURLGenerator(PieURLGenerator generator); double getMinimumArcAngleToDraw(); void setMinimumArcAngleToDraw(double angle); Shape getLegendItemShape(); void setLegendItemShape(Shape shape); PieSectionLabelGenerator getLegendLabelGenerator(); void setLegendLabelGenerator(PieSectionLabelGenerator generator); PieSectionLabelGenerator getLegendLabelToolTipGenerator(); void setLegendLabelToolTipGenerator(
            PieSectionLabelGenerator generator); PieURLGenerator getLegendLabelURLGenerator(); void setLegendLabelURLGenerator(PieURLGenerator generator); ShadowGenerator getShadowGenerator(); void setShadowGenerator(ShadowGenerator generator); void handleMouseWheelRotation(int rotateClicks); PiePlotState initialise(Graphics2D g2, Rectangle2D plotArea,
            PiePlot plot, Integer index, PlotRenderingInfo info); @Override void draw(Graphics2D g2, Rectangle2D area, Point2D anchor,
            PlotState parentState, PlotRenderingInfo info); @Override List<LegendItem> getLegendItems(); @Override String getPlotType(); @Override boolean equals(Object obj); @Override Object clone(); static final double DEFAULT_INTERIOR_GAP; static final double MAX_INTERIOR_GAP; static final double DEFAULT_START_ANGLE; static final Font DEFAULT_LABEL_FONT; static final Paint DEFAULT_LABEL_PAINT; static final Paint DEFAULT_LABEL_BACKGROUND_PAINT; static final Paint DEFAULT_LABEL_OUTLINE_PAINT; static final Stroke DEFAULT_LABEL_OUTLINE_STROKE; static final Paint DEFAULT_LABEL_SHADOW_PAINT; static final double DEFAULT_MINIMUM_ARC_ANGLE_TO_DRAW; }