Example usage for org.jfree.util ArrayUtilities clone

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

Introduction

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

Prototype

public static float[][] clone(final float[][] array) 

Source Link

Document

Clones a two dimensional array of floats.

Usage

From source file:org.proteosuite.FastScatterPlot.java

/**
 * Returns a clone of the plot.//from w  w w.  ja va2s .c om
 * 
 * @return A clone.
 * 
 * @throws CloneNotSupportedException if some component of the plot does 
 *                                    not support cloning.
 */
public Object clone() throws CloneNotSupportedException {

    FastScatterPlot clone = (FastScatterPlot) super.clone();

    if (this.data != null) {
        clone.data = ArrayUtilities.clone(this.data);
    }

    if (this.domainAxis != null) {
        clone.domainAxis = (ValueAxis) this.domainAxis.clone();
        clone.domainAxis.setPlot(clone);
        clone.domainAxis.addChangeListener(clone);
    }

    if (this.rangeAxis != null) {
        clone.rangeAxis = (ValueAxis) this.rangeAxis.clone();
        clone.rangeAxis.setPlot(clone);
        clone.rangeAxis.addChangeListener(clone);
    }

    return clone;

}