Java Code Examples for org.jfree.chart.util.SerialUtilities#readStroke()

The following examples show how to use org.jfree.chart.util.SerialUtilities#readStroke() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JGenProg2017_00127_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.borderStroke = SerialUtilities.readStroke(stream);
    this.borderPaint = SerialUtilities.readPaint(stream);
    this.backgroundPaint = SerialUtilities.readPaint(stream);
    this.progressListeners = new EventListenerList();
    this.changeListeners = new EventListenerList();
    this.renderingHints = new RenderingHints(
            RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_ON);

    // register as a listener with sub-components...
    if (this.title != null) {
        this.title.addChangeListener(this);
    }

    for (int i = 0; i < getSubtitleCount(); i++) {
        getSubtitle(i).addChangeListener(this);
    }
    this.plot.addChangeListener(this);
}
 
Example 2
Source File: Cardumen_00241_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.borderStroke = SerialUtilities.readStroke(stream);
    this.borderPaint = SerialUtilities.readPaint(stream);
    this.backgroundPaint = SerialUtilities.readPaint(stream);
    this.progressListeners = new EventListenerList();
    this.changeListeners = new EventListenerList();
    this.renderingHints = new RenderingHints(
            RenderingHints.KEY_ANTIALIASING, 
            RenderingHints.VALUE_ANTIALIAS_ON);

    // register as a listener with sub-components...
    if (this.title != null) {
        this.title.addChangeListener(this);
    }

    for (int i = 0; i < getSubtitleCount(); i++) {
        getSubtitle(i).addChangeListener(this);
    }
    this.plot.addChangeListener(this);
}
 
Example 3
Source File: XYBoxAnnotation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream (<code>null</code> not permitted).
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    
    stream.defaultReadObject();
    this.stroke = SerialUtilities.readStroke(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.fillPaint = SerialUtilities.readPaint(stream);
}
 
Example 4
Source File: DefaultDrawingSupplier.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Restores a serialized object.
 *
 * @param stream  the input stream.
 *
 * @throws IOException if there is an I/O problem.
 * @throws ClassNotFoundException if there is a problem loading a class.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();

    int paintCount = stream.readInt();
    this.paintSequence = new Paint[paintCount];
    for (int i = 0; i < paintCount; i++) {
        this.paintSequence[i] = SerialUtilities.readPaint(stream);
    }

    int outlinePaintCount = stream.readInt();
    this.outlinePaintSequence = new Paint[outlinePaintCount];
    for (int i = 0; i < outlinePaintCount; i++) {
        this.outlinePaintSequence[i] = SerialUtilities.readPaint(stream);
    }

    int strokeCount = stream.readInt();
    this.strokeSequence = new Stroke[strokeCount];
    for (int i = 0; i < strokeCount; i++) {
        this.strokeSequence[i] = SerialUtilities.readStroke(stream);
    }

    int outlineStrokeCount = stream.readInt();
    this.outlineStrokeSequence = new Stroke[outlineStrokeCount];
    for (int i = 0; i < outlineStrokeCount; i++) {
        this.outlineStrokeSequence[i] = SerialUtilities.readStroke(stream);
    }

    int shapeCount = stream.readInt();
    this.shapeSequence = new Shape[shapeCount];
    for (int i = 0; i < shapeCount; i++) {
        this.shapeSequence[i] = SerialUtilities.readShape(stream);
    }

}
 
Example 5
Source File: Cardumen_00144_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.labelPaint = SerialUtilities.readPaint(stream);
    this.tickLabelPaint = SerialUtilities.readPaint(stream);
    this.axisLineStroke = SerialUtilities.readStroke(stream);
    this.axisLinePaint = SerialUtilities.readPaint(stream);
    this.tickMarkStroke = SerialUtilities.readStroke(stream);
    this.tickMarkPaint = SerialUtilities.readPaint(stream);
    this.listenerList = new EventListenerList();
}
 
Example 6
Source File: Cardumen_007_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.labelPaint = SerialUtilities.readPaint(stream);
    this.tickLabelPaint = SerialUtilities.readPaint(stream);
    this.axisLineStroke = SerialUtilities.readStroke(stream);
    this.axisLinePaint = SerialUtilities.readPaint(stream);
    this.tickMarkStroke = SerialUtilities.readStroke(stream);
    this.tickMarkPaint = SerialUtilities.readPaint(stream);
    this.listenerList = new EventListenerList();
}
 
Example 7
Source File: jMutRepair_0046_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.labelPaint = SerialUtilities.readPaint(stream);
    this.tickLabelPaint = SerialUtilities.readPaint(stream);
    this.axisLineStroke = SerialUtilities.readStroke(stream);
    this.axisLinePaint = SerialUtilities.readPaint(stream);
    this.tickMarkStroke = SerialUtilities.readStroke(stream);
    this.tickMarkPaint = SerialUtilities.readPaint(stream);
    this.listenerList = new EventListenerList();
}
 
Example 8
Source File: LegendGraphic.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
        throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.shape = SerialUtilities.readShape(stream);
    this.fillPaint = SerialUtilities.readPaint(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.outlineStroke = SerialUtilities.readStroke(stream);
    this.line = SerialUtilities.readShape(stream);
    this.linePaint = SerialUtilities.readPaint(stream);
    this.lineStroke = SerialUtilities.readStroke(stream);
}
 
Example 9
Source File: StandardDialScale.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
        throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.majorTickPaint = SerialUtilities.readPaint(stream);
    this.majorTickStroke = SerialUtilities.readStroke(stream);
    this.minorTickPaint = SerialUtilities.readPaint(stream);
    this.minorTickStroke = SerialUtilities.readStroke(stream);
    this.tickLabelPaint = SerialUtilities.readPaint(stream);
}
 
Example 10
Source File: XYTextAnnotation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.paint = SerialUtilities.readPaint(stream);
    this.backgroundPaint = SerialUtilities.readPaint(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.outlineStroke = SerialUtilities.readStroke(stream);
}
 
Example 11
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_s.java    From coming with MIT License 4 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {

    stream.defaultReadObject();
    this.domainGridlineStroke = SerialUtilities.readStroke(stream);
    this.domainGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeGridlineStroke = SerialUtilities.readStroke(stream);
    this.rangeGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeCrosshairStroke = SerialUtilities.readStroke(stream);
    this.rangeCrosshairPaint = SerialUtilities.readPaint(stream);

    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(i);
        if (xAxis != null) {
            xAxis.setPlot(this);
            xAxis.addChangeListener(this);
        }
    } 
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(i);
        if (yAxis != null) {
            yAxis.setPlot(this);   
            yAxis.addChangeListener(this);
        }
    }
    int datasetCount = this.datasets.size();
    for (int i = 0; i < datasetCount; i++) {
        Dataset dataset = (Dataset) this.datasets.get(i);
        if (dataset != null) {
            dataset.addChangeListener(this);
        }
    }
    int rendererCount = this.renderers.size();
    for (int i = 0; i < rendererCount; i++) {
        CategoryItemRenderer renderer 
            = (CategoryItemRenderer) this.renderers.get(i);
        if (renderer != null) {
            renderer.addChangeListener(this);
        }
    }

}
 
Example 12
Source File: CategoryPlot.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
    throws IOException, ClassNotFoundException {

    stream.defaultReadObject();
    this.domainGridlineStroke = SerialUtilities.readStroke(stream);
    this.domainGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeGridlineStroke = SerialUtilities.readStroke(stream);
    this.rangeGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeCrosshairStroke = SerialUtilities.readStroke(stream);
    this.rangeCrosshairPaint = SerialUtilities.readPaint(stream);
    this.domainCrosshairStroke = SerialUtilities.readStroke(stream);
    this.domainCrosshairPaint = SerialUtilities.readPaint(stream);
    this.rangeMinorGridlineStroke = SerialUtilities.readStroke(stream);
    this.rangeMinorGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeZeroBaselineStroke = SerialUtilities.readStroke(stream);
    this.rangeZeroBaselinePaint = SerialUtilities.readPaint(stream);

    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(i);
        if (xAxis != null) {
            xAxis.setPlot(this);
            xAxis.addChangeListener(this);
        }
    }
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(i);
        if (yAxis != null) {
            yAxis.setPlot(this);
            yAxis.addChangeListener(this);
        }
    }
    int datasetCount = this.datasets.size();
    for (int i = 0; i < datasetCount; i++) {
        Dataset dataset = (Dataset) this.datasets.get(i);
        if (dataset != null) {
            dataset.addChangeListener(this);
        }
    }
    int rendererCount = this.renderers.size();
    for (int i = 0; i < rendererCount; i++) {
        CategoryItemRenderer renderer
            = (CategoryItemRenderer) this.renderers.get(i);
        if (renderer != null) {
            renderer.addChangeListener(this);
        }
    }

}
 
Example 13
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java    From coming with MIT License 4 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {

    stream.defaultReadObject();
    this.domainGridlineStroke = SerialUtilities.readStroke(stream);
    this.domainGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeGridlineStroke = SerialUtilities.readStroke(stream);
    this.rangeGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeCrosshairStroke = SerialUtilities.readStroke(stream);
    this.rangeCrosshairPaint = SerialUtilities.readPaint(stream);

    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(i);
        if (xAxis != null) {
            xAxis.setPlot(this);
            xAxis.addChangeListener(this);
        }
    } 
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(i);
        if (yAxis != null) {
            yAxis.setPlot(this);   
            yAxis.addChangeListener(this);
        }
    }
    int datasetCount = this.datasets.size();
    for (int i = 0; i < datasetCount; i++) {
        Dataset dataset = (Dataset) this.datasets.get(i);
        if (dataset != null) {
            dataset.addChangeListener(this);
        }
    }
    int rendererCount = this.renderers.size();
    for (int i = 0; i < rendererCount; i++) {
        CategoryItemRenderer renderer 
            = (CategoryItemRenderer) this.renderers.get(i);
        if (renderer != null) {
            renderer.addChangeListener(this);
        }
    }

}
 
Example 14
Source File: jMutRepair_0021_s.java    From coming with MIT License 4 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {

    stream.defaultReadObject();
    this.domainGridlineStroke = SerialUtilities.readStroke(stream);
    this.domainGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeGridlineStroke = SerialUtilities.readStroke(stream);
    this.rangeGridlinePaint = SerialUtilities.readPaint(stream);
    this.rangeCrosshairStroke = SerialUtilities.readStroke(stream);
    this.rangeCrosshairPaint = SerialUtilities.readPaint(stream);

    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis xAxis = (CategoryAxis) this.domainAxes.get(i);
        if (xAxis != null) {
            xAxis.setPlot(this);
            xAxis.addChangeListener(this);
        }
    } 
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis yAxis = (ValueAxis) this.rangeAxes.get(i);
        if (yAxis != null) {
            yAxis.setPlot(this);   
            yAxis.addChangeListener(this);
        }
    }
    int datasetCount = this.datasets.size();
    for (int i = 0; i < datasetCount; i++) {
        Dataset dataset = (Dataset) this.datasets.get(i);
        if (dataset != null) {
            dataset.addChangeListener(this);
        }
    }
    int rendererCount = this.renderers.size();
    for (int i = 0; i < rendererCount; i++) {
        CategoryItemRenderer renderer 
            = (CategoryItemRenderer) this.renderers.get(i);
        if (renderer != null) {
            renderer.addChangeListener(this);
        }
    }

}
 
Example 15
Source File: XYPointerAnnotation.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.arrowPaint = SerialUtilities.readPaint(stream);
    this.arrowStroke = SerialUtilities.readStroke(stream);
}
 
Example 16
Source File: LineBorder.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.paint = SerialUtilities.readPaint(stream);
    this.stroke = SerialUtilities.readStroke(stream);
}
 
Example 17
Source File: Chart_25_StatisticalBarRenderer_t.java    From coming with MIT License 3 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.errorIndicatorPaint = SerialUtilities.readPaint(stream);
    this.errorIndicatorStroke = SerialUtilities.readStroke(stream);
}
 
Example 18
Source File: RingPlot.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.separatorStroke = SerialUtilities.readStroke(stream);
    this.separatorPaint = SerialUtilities.readPaint(stream);
}
 
Example 19
Source File: XYPolygonAnnotation.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream (<code>null</code> not permitted).
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream)
        throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.stroke = SerialUtilities.readStroke(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.fillPaint = SerialUtilities.readPaint(stream);
}
 
Example 20
Source File: XYLineAnnotation.java    From astor with GNU General Public License v2.0 3 votes vote down vote up
/**
 * Provides serialization support.
 *
 * @param stream  the input stream.
 *
 * @throws IOException  if there is an I/O error.
 * @throws ClassNotFoundException  if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) 
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.paint = SerialUtilities.readPaint(stream);
    this.stroke = SerialUtilities.readStroke(stream);
}