/** * Returns a clone of the drawing supplier for this theme. * * @return A clone of the drawing supplier. */ public DrawingSupplier getDrawingSupplier() { DrawingSupplier result = null; if (this.drawingSupplier instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.drawingSupplier; try { result = (DrawingSupplier) pc.clone(); } catch (CloneNotSupportedException e) { e.printStackTrace(); } } return result; }
/** * Returns a clone of this object. It is assumed that the key is an * immutable object, so it is not deep-cloned. The object is deep-cloned * if it implements {@link PublicCloneable}, otherwise a shallow clone is * made. * * @return A clone. * * @throws CloneNotSupportedException if there is a problem cloning. */ public Object clone() throws CloneNotSupportedException { KeyedObject clone = (KeyedObject) super.clone(); if (this.object instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.object; clone.object = pc.clone(); } return clone; }
/** * Returns a clone of this block. * * @return A clone. * * @throws CloneNotSupportedException if there is a problem creating the * clone. */ public Object clone() throws CloneNotSupportedException { AbstractBlock clone = (AbstractBlock) super.clone(); clone.bounds = (Rectangle2D) ShapeUtilities.clone(this.bounds); if (this.frame instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.frame; clone.frame = (BlockFrame) pc.clone(); } return clone; }
/** * Returns a clone of this renderer. * * @return A clone of this renderer. * * @throws CloneNotSupportedException if there is a problem creating the * clone. */ public Object clone() throws CloneNotSupportedException { XYBlockRenderer clone = (XYBlockRenderer) super.clone(); if (this.paintScale instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.paintScale; clone.paintScale = (PaintScale) pc.clone(); } return clone; }
/** * Returns a clone of this renderer. * * @return A clone of this renderer. * * @throws CloneNotSupportedException if there is a problem creating the * clone. */ public Object clone() throws CloneNotSupportedException { XYShapeRenderer clone = (XYShapeRenderer) super.clone(); if (this.paintScale instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.paintScale; clone.paintScale = (PaintScale) pc.clone(); } return clone; }
/** * Returns a clone of this object. * * @return A clone. * * @throws CloneNotSupportedException if the object cannot be cloned. */ public Object clone() throws CloneNotSupportedException { ChartRenderingInfo clone = (ChartRenderingInfo) super.clone(); if (this.chartArea != null) { clone.chartArea = (Rectangle2D) this.chartArea.clone(); } if (this.entities instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.entities; clone.entities = (EntityCollection) pc.clone(); } return clone; }
/** * Returns an independent copy of the generator. * * @return A clone. * * @throws CloneNotSupportedException if cloning is not supported. */ public Object clone() throws CloneNotSupportedException { MultipleXYSeriesLabelGenerator clone = (MultipleXYSeriesLabelGenerator) super.clone(); clone.seriesLabelLists = new HashMap(); Set keys = this.seriesLabelLists.keySet(); Iterator iterator = keys.iterator(); while (iterator.hasNext()) { Object key = iterator.next(); Object entry = this.seriesLabelLists.get(key); Object toAdd = entry; if (entry instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) entry; toAdd = pc.clone(); } clone.seriesLabelLists.put(key, toAdd); } return clone; }
/** * Returns an independent copy of the dataset. Note that: * <ul> * <li>the underlying dataset is only cloned if it implements the * {@link PublicCloneable} interface;</li> * <li>the listeners registered with this dataset are not carried over to * the cloned dataset.</li> * </ul> * * @return An independent copy of the dataset. * * @throws CloneNotSupportedException if the dataset cannot be cloned for * any reason. */ public Object clone() throws CloneNotSupportedException { SlidingCategoryDataset clone = (SlidingCategoryDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (CategoryDataset) pc.clone(); } return clone; }
/** * Returns an independent copy of the dataset. Note that: * <ul> * <li>the underlying dataset is only cloned if it implements the * {@link PublicCloneable} interface;</li> * <li>the listeners registered with this dataset are not carried over to * the cloned dataset.</li> * </ul> * * @return An independent copy of the dataset. * * @throws CloneNotSupportedException if the dataset cannot be cloned for * any reason. */ public Object clone() throws CloneNotSupportedException { SlidingGanttCategoryDataset clone = (SlidingGanttCategoryDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (GanttCategoryDataset) pc.clone(); } return clone; }
/** * Returns an independent copy of the dataset. Note that: * <ul> * <li>the underlying dataset is only cloned if it implements the * {@link PublicCloneable} interface;</li> * <li>the listeners registered with this dataset are not carried over to * the cloned dataset.</li> * </ul> * * @return An independent copy of the dataset. * * @throws CloneNotSupportedException if the dataset cannot be cloned for * any reason. */ public Object clone() throws CloneNotSupportedException { XYBarDataset clone = (XYBarDataset) super.clone(); if (this.underlying instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.underlying; clone.underlying = (XYDataset) pc.clone(); } return clone; }
/** * Returns an independent copy of this object (except that the clone will * still reference the same dataset as the original * <code>LegendItem</code>). * * @return A clone. * * @throws CloneNotSupportedException if the legend item cannot be cloned. * * @since 1.0.10 */ public Object clone() throws CloneNotSupportedException { LegendItem clone = (LegendItem) super.clone(); if (this.seriesKey instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.seriesKey; clone.seriesKey = (Comparable) pc.clone(); } // FIXME: Clone the attributed string if it is not null clone.shape = ShapeUtilities.clone(this.shape); if (this.fillPaintTransformer instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.fillPaintTransformer; clone.fillPaintTransformer = (GradientPaintTransformer) pc.clone(); } clone.line = ShapeUtilities.clone(this.line); return clone; }
return pc.clone();
return pc.clone();
return pc.clone();
PublicCloneable pc = (PublicCloneable) this.itemLabelGenerator; clone.itemLabelGenerator = (CategoryItemLabelGenerator) pc.clone(); = (PublicCloneable) this.baseItemLabelGenerator; clone.baseItemLabelGenerator = (CategoryItemLabelGenerator) pc.clone(); if (this.toolTipGenerator instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.toolTipGenerator; clone.toolTipGenerator = (CategoryToolTipGenerator) pc.clone(); = (PublicCloneable) this.baseToolTipGenerator; clone.baseToolTipGenerator = (CategoryToolTipGenerator) pc.clone(); if (this.itemURLGenerator instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.itemURLGenerator; clone.itemURLGenerator = (CategoryURLGenerator) pc.clone(); PublicCloneable pc = (PublicCloneable) this.baseItemURLGenerator; clone.baseItemURLGenerator = (CategoryURLGenerator) pc.clone();
&& this.itemLabelGenerator instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.itemLabelGenerator; clone.itemLabelGenerator = (XYItemLabelGenerator) pc.clone(); && this.baseItemLabelGenerator instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.baseItemLabelGenerator; clone.baseItemLabelGenerator = (XYItemLabelGenerator) pc.clone(); && this.toolTipGenerator instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.toolTipGenerator; clone.toolTipGenerator = (XYToolTipGenerator) pc.clone(); && this.baseToolTipGenerator instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) this.baseToolTipGenerator; clone.baseToolTipGenerator = (XYToolTipGenerator) pc.clone();
if (renderer2 instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) renderer2; CategoryItemRenderer rc = (CategoryItemRenderer) pc.clone(); clone.renderers.set(i, rc); rc.setPlot(clone);
if (renderer2 instanceof PublicCloneable) { PublicCloneable pc = (PublicCloneable) renderer2; XYItemRenderer rc = (XYItemRenderer) pc.clone(); clone.renderers.set(i, rc); rc.setPlot(clone);