use of org.jfree.util.PublicCloneable in project SIMVA-SoS by SESoS.
the class ChartRenderingInfo method clone.
/**
* Returns a clone of this object.
*
* @return A clone.
*
* @throws CloneNotSupportedException if the object cannot be cloned.
*/
@Override
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;
}
use of org.jfree.util.PublicCloneable in project SIMVA-SoS by SESoS.
the class LegendItem method 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
*/
@Override
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;
}
use of org.jfree.util.PublicCloneable in project SIMVA-SoS by SESoS.
the class AbstractXYItemRenderer method clone.
/**
* Returns a clone of the renderer.
*
* @return A clone.
*
* @throws CloneNotSupportedException if the renderer does not support
* cloning.
*/
@Override
protected Object clone() throws CloneNotSupportedException {
AbstractXYItemRenderer clone = (AbstractXYItemRenderer) super.clone();
if (this.itemLabelGenerator != null && this.itemLabelGenerator instanceof PublicCloneable) {
PublicCloneable pc = (PublicCloneable) this.itemLabelGenerator;
clone.itemLabelGenerator = (XYItemLabelGenerator) pc.clone();
}
clone.itemLabelGeneratorMap = CloneUtils.cloneMapValues(this.itemLabelGeneratorMap);
if (this.baseItemLabelGenerator != null && this.baseItemLabelGenerator instanceof PublicCloneable) {
PublicCloneable pc = (PublicCloneable) this.baseItemLabelGenerator;
clone.baseItemLabelGenerator = (XYItemLabelGenerator) pc.clone();
}
if (this.toolTipGenerator != null && this.toolTipGenerator instanceof PublicCloneable) {
PublicCloneable pc = (PublicCloneable) this.toolTipGenerator;
clone.toolTipGenerator = (XYToolTipGenerator) pc.clone();
}
clone.toolTipGeneratorMap = CloneUtils.cloneMapValues(this.toolTipGeneratorMap);
if (this.baseToolTipGenerator != null && this.baseToolTipGenerator instanceof PublicCloneable) {
PublicCloneable pc = (PublicCloneable) this.baseToolTipGenerator;
clone.baseToolTipGenerator = (XYToolTipGenerator) pc.clone();
}
if (this.legendItemLabelGenerator instanceof PublicCloneable) {
clone.legendItemLabelGenerator = (XYSeriesLabelGenerator) ObjectUtilities.clone(this.legendItemLabelGenerator);
}
if (this.legendItemToolTipGenerator instanceof PublicCloneable) {
clone.legendItemToolTipGenerator = (XYSeriesLabelGenerator) ObjectUtilities.clone(this.legendItemToolTipGenerator);
}
if (this.legendItemURLGenerator instanceof PublicCloneable) {
clone.legendItemURLGenerator = (XYSeriesLabelGenerator) ObjectUtilities.clone(this.legendItemURLGenerator);
}
clone.foregroundAnnotations = (List) ObjectUtilities.deepClone(this.foregroundAnnotations);
clone.backgroundAnnotations = (List) ObjectUtilities.deepClone(this.backgroundAnnotations);
return clone;
}
Aggregations