/** * Returns a clone of the specified shape, or <code>null</code>. At the * current time, this method supports cloning for instances of * <code>Line2D</code>, <code>RectangularShape</code>, <code>Area</code> * and <code>GeneralPath</code>. * <p> * <code>RectangularShape</code> includes <code>Arc2D</code>, * <code>Ellipse2D</code>, <code>Rectangle2D</code>, * <code>RoundRectangle2D</code>. * * @param shape the shape to clone (<code>null</code> permitted, * returns <code>null</code>). * * @return A clone or <code>null</code>. */ public static Shape clone(final Shape shape) { if (shape instanceof Cloneable) { try { return (Shape) ObjectUtilities.clone(shape); } catch (CloneNotSupportedException cnse) { } } final Shape result = null; return result; }
/** * Returns a clone of the specified shape, or <code>null</code>. At the * current time, this method supports cloning for instances of * <code>Line2D</code>, <code>RectangularShape</code>, <code>Area</code> * and <code>GeneralPath</code>. * <p> * <code>RectangularShape</code> includes <code>Arc2D</code>, * <code>Ellipse2D</code>, <code>Rectangle2D</code>, * <code>RoundRectangle2D</code>. * * @param shape the shape to clone (<code>null</code> permitted, * returns <code>null</code>). * * @return A clone or <code>null</code>. */ public static Shape clone(final Shape shape) { if (shape instanceof Cloneable) { try { return (Shape) ObjectUtilities.clone(shape); } catch (CloneNotSupportedException cnse) { } } final Shape result = null; return result; }
/** * Returns a clone of the specified shape, or <code>null</code>. At the * current time, this method supports cloning for instances of * <code>Line2D</code>, <code>RectangularShape</code>, <code>Area</code> * and <code>GeneralPath</code>. * <p> * <code>RectangularShape</code> includes <code>Arc2D</code>, * <code>Ellipse2D</code>, <code>Rectangle2D</code>, * <code>RoundRectangle2D</code>. * * @param shape the shape to clone (<code>null</code> permitted, * returns <code>null</code>). * * @return A clone or <code>null</code>. */ public static Shape clone(final Shape shape) { if (shape instanceof Cloneable) { try { return (Shape) ObjectUtilities.clone(shape); } catch (CloneNotSupportedException cnse) { } } final Shape result = null; return result; }
/** * Creates a clone of the plot. * * @return A clone. * * @throws CloneNotSupportedException if some component of the plot does not * support cloning. */ public Object clone() throws CloneNotSupportedException { Plot clone = (Plot) super.clone(); // private Plot parent <-- don't clone the parent plot, but take care // childs in combined plots instead if (this.datasetGroup != null) { clone.datasetGroup = (DatasetGroup) ObjectUtilities.clone(this.datasetGroup); } clone.drawingSupplier = (DrawingSupplier) ObjectUtilities.clone(this.drawingSupplier); clone.listenerList = new EventListenerList(); return clone; }
/** * Creates a deep copy of this HashNMap. * * @return a clone. * @throws CloneNotSupportedException this should never happen. */ public Object clone() throws CloneNotSupportedException { final HashNMap map = (HashNMap) super.clone(); map.table = new HashMap(); final Iterator iterator = keys(); while (iterator.hasNext()) { final Object key = iterator.next(); final List list = (List) map.table.get(key); if (list != null) { map.table.put(key, ObjectUtilities.clone(list)); } } return map; }
/** * Creates a deep copy of this HashNMap. * * @return a clone. * @throws CloneNotSupportedException this should never happen. */ public Object clone() throws CloneNotSupportedException { final HashNMap map = (HashNMap) super.clone(); map.table = new HashMap(); final Iterator iterator = keys(); while (iterator.hasNext()) { final Object key = iterator.next(); final List list = (List) map.table.get(key); if (list != null) { map.table.put(key, ObjectUtilities.clone(list)); } } return map; }
/** * Creates a deep copy of this HashNMap. * * @return a clone. * @throws CloneNotSupportedException this should never happen. */ public Object clone() throws CloneNotSupportedException { final HashNMap map = (HashNMap) super.clone(); map.table = new HashMap(); final Iterator iterator = keys(); while (iterator.hasNext()) { final Object key = iterator.next(); final List list = (List) map.table.get(key); if (list != null) { map.table.put(key, ObjectUtilities.clone(list)); } } return map; }
clone.urlGenerator = (PieURLGenerator) ObjectUtilities.clone( this.urlGenerator); if (this.legendLabelGenerator != null) { clone.legendLabelGenerator = (PieSectionLabelGenerator) ObjectUtilities.clone(this.legendLabelGenerator); ObjectUtilities.clone(this.legendLabelToolTipGenerator); ObjectUtilities.clone(this.legendLabelURLGenerator);
/** * Returns a clone of the renderer. * * @return A clone. * * @throws CloneNotSupportedException if the renderer cannot be cloned. */ public Object clone() throws CloneNotSupportedException { XYBarRenderer result = (XYBarRenderer) super.clone(); if (this.gradientPaintTransformer != null) { result.gradientPaintTransformer = (GradientPaintTransformer) ObjectUtilities.clone(this.gradientPaintTransformer); } result.legendBar = ShapeUtilities.clone(this.legendBar); return result; }
/** * Returns a clone of the plot. * * @return A clone. * * @throws CloneNotSupportedException this can occur if some component of * the plot cannot be cloned. */ public Object clone() throws CloneNotSupportedException { PolarPlot clone = (PolarPlot) super.clone(); if (this.axis != null) { clone.axis = (ValueAxis) ObjectUtilities.clone(this.axis); clone.axis.setPlot(clone); clone.axis.addChangeListener(clone); } if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } if (this.renderer != null) { clone.renderer = (PolarItemRenderer) ObjectUtilities.clone(this.renderer); } clone.cornerTextItems = new ArrayList(this.cornerTextItems); return clone; }
ObjectUtilities.clone(this.legendItemLabelGenerator); ObjectUtilities.clone(this.legendItemToolTipGenerator); ObjectUtilities.clone(this.legendItemURLGenerator); ObjectUtilities.clone(this.legendItemLabelGenerator); ObjectUtilities.clone(this.legendItemToolTipGenerator); ObjectUtilities.clone(this.legendItemURLGenerator);
clone.domainAxes = (ObjectList) ObjectUtilities.clone(this.domainAxes); for (int i = 0; i < this.domainAxes.size(); i++) { ValueAxis axis = (ValueAxis) this.domainAxes.get(i); clone.rangeAxes = (ObjectList) ObjectUtilities.clone(this.rangeAxes); for (int i = 0; i < this.rangeAxes.size(); i++) { ValueAxis axis = (ValueAxis) this.rangeAxes.get(i); clone.rangeAxisLocations = (ObjectList) ObjectUtilities.clone( this.rangeAxisLocations); clone.datasets = (ObjectList) ObjectUtilities.clone(this.datasets); for (int i = 0; i < clone.datasets.size(); ++i) { XYDataset d = getDataset(i); clone.renderers = (ObjectList) ObjectUtilities.clone(this.renderers); for (int i = 0; i < this.renderers.size(); i++) { XYItemRenderer renderer2 = (XYItemRenderer) this.renderers.get(i); clone.foregroundDomainMarkers = (Map) ObjectUtilities.clone( this.foregroundDomainMarkers); clone.backgroundDomainMarkers = (Map) ObjectUtilities.clone( this.backgroundDomainMarkers); clone.foregroundRangeMarkers = (Map) ObjectUtilities.clone( this.foregroundRangeMarkers); clone.backgroundRangeMarkers = (Map) ObjectUtilities.clone( this.backgroundRangeMarkers); clone.annotations = (List) ObjectUtilities.deepClone(this.annotations); if (this.fixedDomainAxisSpace != null) {
/** * Returns a clone of the plot. * * @return A clone. * * @throws CloneNotSupportedException if the plot cannot be cloned. */ public Object clone() throws CloneNotSupportedException { ThermometerPlot clone = (ThermometerPlot) super.clone(); if (clone.dataset != null) { clone.dataset.addChangeListener(clone); } clone.rangeAxis = (ValueAxis) ObjectUtilities.clone(this.rangeAxis); if (clone.rangeAxis != null) { clone.rangeAxis.setPlot(clone); clone.rangeAxis.addChangeListener(clone); } clone.valueFormat = (NumberFormat) this.valueFormat.clone(); clone.subrangePaint = (Paint[]) this.subrangePaint.clone(); return clone; }