Example usage for org.jfree.util ShapeUtilities clone

List of usage examples for org.jfree.util ShapeUtilities clone

Introduction

In this page you can find the example usage for org.jfree.util ShapeUtilities clone.

Prototype

public static Shape clone(final Shape shape) 

Source Link

Document

Returns a clone of the specified shape, or null.

Usage

From source file:longMethod.jfreechart.drawItem.SamplingXYLineRenderer.java

/**
 * Returns a clone of the renderer.//from  w  w w  .  jav  a 2  s. c  o m
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException if the clone cannot be created.
 */
public Object clone() throws CloneNotSupportedException {
    SamplingXYLineRenderer clone = (SamplingXYLineRenderer) super.clone();
    if (this.legendLine != null) {
        clone.legendLine = ShapeUtilities.clone(this.legendLine);
    }
    return clone;
}

From source file:msi.gama.outputs.layers.charts.StandardXYItemRenderer.java

/**
 * Returns a clone of the renderer./*ww w  .j  a v  a2 s . c o  m*/
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException
 *             if the renderer cannot be cloned.
 */
@Override
public Object clone() throws CloneNotSupportedException {
    final StandardXYItemRenderer clone = (StandardXYItemRenderer) super.clone();
    clone.seriesShapesFilled = (BooleanList) this.seriesShapesFilled.clone();
    clone.legendLine = ShapeUtilities.clone(this.legendLine);
    return clone;
}

From source file:edu.dlnu.liuwenpeng.render.XYBarRenderer.java

/**
 * Returns a clone of the renderer.//w w w  . j  a v a  2 s . com
 *
 * @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;
}

From source file:edu.dlnu.liuwenpeng.render.NewXYBarRenderer.java

/**    
* Returns a clone of the renderer.    //from   w w w.ja v  a  2s .  c o m
*    
* @return A clone.    
*    
* @throws CloneNotSupportedException  if the renderer cannot be cloned.    
*/
public Object clone() throws CloneNotSupportedException {
    NewXYBarRenderer result = (NewXYBarRenderer) super.clone();
    if (this.gradientPaintTransformer != null) {
        result.gradientPaintTransformer = (GradientPaintTransformer) ObjectUtilities
                .clone(this.gradientPaintTransformer);
    }
    result.legendBar = ShapeUtilities.clone(this.legendBar);
    return result;
}

From source file:edu.dlnu.liuwenpeng.render.XYLineAndShapeRenderer.java

/**    
 * Returns a clone of the renderer.    /* ww  w.  j  a  v  a  2s .  c o m*/
 *    
 * @return A clone.    
 *    
 * @throws CloneNotSupportedException if the clone cannot be created.    
 */
public Object clone() throws CloneNotSupportedException {
    XYLineAndShapeRenderer clone = (XYLineAndShapeRenderer) super.clone();
    clone.seriesLinesVisible = (BooleanList) this.seriesLinesVisible.clone();
    if (this.legendLine != null) {
        clone.legendLine = ShapeUtilities.clone(this.legendLine);
    }
    clone.seriesShapesVisible = (BooleanList) this.seriesShapesVisible.clone();
    clone.seriesShapesFilled = (BooleanList) this.seriesShapesFilled.clone();
    return clone;
}

From source file:genlab.gui.jfreechart.EnhancedSpiderWebPlot.java

/**
 * Returns a clone of this plot./*  w  w  w  . j  a v  a2s . c o m*/
 *
 * @return A clone of this plot.
 *
 * @throws CloneNotSupportedException if the plot cannot be cloned for
 *         any reason.
 */
public Object clone() throws CloneNotSupportedException {
    EnhancedSpiderWebPlot clone = (EnhancedSpiderWebPlot) super.clone();
    clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape);
    clone.seriesPaintList = (PaintList) this.seriesPaintList.clone();
    clone.seriesOutlinePaintList = (PaintList) this.seriesOutlinePaintList.clone();
    clone.seriesOutlineStrokeList = (StrokeList) this.seriesOutlineStrokeList.clone();
    return clone;
}

From source file:spinworld.gui.RadarPlot.java

/**
 * Returns a clone of this plot.//  www  .j a  va 2 s.  co m
 *
 * @return A clone of this plot.
 *
 * @throws CloneNotSupportedException if the plot cannot be cloned for
 *         any reason.
 */
public Object clone() throws CloneNotSupportedException {
    RadarPlot clone = (RadarPlot) super.clone();
    clone.legendItemShape = ShapeUtilities.clone(this.legendItemShape);
    clone.seriesPaintList = (PaintList) this.seriesPaintList.clone();
    clone.seriesOutlinePaintList = (PaintList) this.seriesOutlinePaintList.clone();
    clone.seriesOutlineStrokeList = (StrokeList) this.seriesOutlineStrokeList.clone();
    return clone;
}

From source file:KIDLYAbstractRenderer.java

/**
 * Returns an independent copy of the renderer.
 *
 * @return A clone.//from  w w  w .j  a v a2  s  .  co  m
 *
 * @throws CloneNotSupportedException if some component of the renderer
 *         does not support cloning.
 */
protected Object clone() throws CloneNotSupportedException {
    KIDLYAbstractRenderer clone = (KIDLYAbstractRenderer) super.clone();

    if (this.seriesVisibleList != null) {
        clone.seriesVisibleList = (BooleanList) this.seriesVisibleList.clone();
    }

    if (this.seriesVisibleInLegendList != null) {
        clone.seriesVisibleInLegendList = (BooleanList) this.seriesVisibleInLegendList.clone();
    }

    // 'paint' : immutable, no need to clone reference
    if (this.paintList != null) {
        clone.paintList = (PaintList) this.paintList.clone();
    }
    // 'basePaint' : immutable, no need to clone reference

    if (this.fillPaintList != null) {
        clone.fillPaintList = (PaintList) this.fillPaintList.clone();
    }
    // 'outlinePaint' : immutable, no need to clone reference
    if (this.outlinePaintList != null) {
        clone.outlinePaintList = (PaintList) this.outlinePaintList.clone();
    }
    // 'baseOutlinePaint' : immutable, no need to clone reference

    // 'stroke' : immutable, no need to clone reference
    if (this.strokeList != null) {
        clone.strokeList = (StrokeList) this.strokeList.clone();
    }
    // 'baseStroke' : immutable, no need to clone reference

    // 'outlineStroke' : immutable, no need to clone reference
    if (this.outlineStrokeList != null) {
        clone.outlineStrokeList = (StrokeList) this.outlineStrokeList.clone();
    }
    // 'baseOutlineStroke' : immutable, no need to clone reference

    if (this.shape != null) {
        clone.shape = ShapeUtilities.clone(this.shape);
    }
    if (this.shapeList != null) {
        clone.shapeList = (ShapeList) this.shapeList.clone();
    }
    if (this.baseShape != null) {
        clone.baseShape = ShapeUtilities.clone(this.baseShape);
    }

    // 'itemLabelsVisible' : immutable, no need to clone reference
    if (this.itemLabelsVisibleList != null) {
        clone.itemLabelsVisibleList = (BooleanList) this.itemLabelsVisibleList.clone();
    }
    // 'basePaint' : immutable, no need to clone reference

    // 'itemLabelFont' : immutable, no need to clone reference
    if (this.itemLabelFontList != null) {
        clone.itemLabelFontList = (ObjectList) this.itemLabelFontList.clone();
    }
    // 'baseItemLabelFont' : immutable, no need to clone reference

    // 'itemLabelPaint' : immutable, no need to clone reference
    if (this.itemLabelPaintList != null) {
        clone.itemLabelPaintList = (PaintList) this.itemLabelPaintList.clone();
    }
    // 'baseItemLabelPaint' : immutable, no need to clone reference

    // 'postiveItemLabelAnchor' : immutable, no need to clone reference
    if (this.positiveItemLabelPositionList != null) {
        clone.positiveItemLabelPositionList = (ObjectList) this.positiveItemLabelPositionList.clone();
    }
    // 'baseItemLabelAnchor' : immutable, no need to clone reference

    // 'negativeItemLabelAnchor' : immutable, no need to clone reference
    if (this.negativeItemLabelPositionList != null) {
        clone.negativeItemLabelPositionList = (ObjectList) this.negativeItemLabelPositionList.clone();
    }
    // 'baseNegativeItemLabelAnchor' : immutable, no need to clone reference

    if (this.createEntitiesList != null) {
        clone.createEntitiesList = (BooleanList) this.createEntitiesList.clone();
    }

    if (this.legendShapeList != null) {
        clone.legendShapeList = (ShapeList) this.legendShapeList.clone();
    }
    if (this.legendTextFont != null) {
        clone.legendTextFont = (ObjectList) this.legendTextFont.clone();
    }
    if (this.legendTextPaint != null) {
        clone.legendTextPaint = (PaintList) this.legendTextPaint.clone();
    }
    clone.listenerList = new EventListenerList();
    clone.event = null;
    return clone;
}