Search in sources :

Example 16 with EventListenerList

use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.

the class ChartPanel method readObject.

/**
 * 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.zoomFillPaint = SerialUtilities.readPaint(stream);
    this.zoomOutlinePaint = SerialUtilities.readPaint(stream);
    // we create a new but empty chartMouseListeners list
    this.chartMouseListeners = new EventListenerList();
    // register as a listener with sub-components...
    if (this.chart != null) {
        this.chart.addChangeListener(this);
    }
}
Also used : EventListenerList(javax.swing.event.EventListenerList)

Example 17 with EventListenerList

use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.

the class Title method readObject.

/**
 * 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.listenerList = new EventListenerList();
}
Also used : EventListenerList(javax.swing.event.EventListenerList)

Example 18 with EventListenerList

use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.

the class Series method clone.

/**
 * Returns a clone of the series.
 * <P>
 * Notes:
 * <ul>
 * <li>No need to clone the name or description, since String object is
 * immutable.</li>
 * <li>We set the listener list to empty, since the listeners did not
 * register with the clone.</li>
 * <li>Same applies to the PropertyChangeSupport instance.</li>
 * </ul>
 *
 * @return A clone of the series.
 *
 * @throws CloneNotSupportedException  not thrown by this class, but
 *         subclasses may differ.
 */
@Override
public Object clone() throws CloneNotSupportedException {
    Series clone = (Series) super.clone();
    clone.listeners = new EventListenerList();
    clone.propertyChangeSupport = new PropertyChangeSupport(clone);
    clone.vetoableChangeSupport = new VetoableChangeSupport(clone);
    return clone;
}
Also used : VetoableChangeSupport(java.beans.VetoableChangeSupport) EventListenerList(javax.swing.event.EventListenerList) PropertyChangeSupport(java.beans.PropertyChangeSupport)

Example 19 with EventListenerList

use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.

the class AbstractRenderer method clone.

/**
 * Returns an independent copy of the renderer.
 *
 * @return A clone.
 *
 * @throws CloneNotSupportedException if some component of the renderer
 *         does not support cloning.
 */
@Override
protected Object clone() throws CloneNotSupportedException {
    AbstractRenderer clone = (AbstractRenderer) 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();
    }
    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();
    }
    // 'stroke' : immutable, no need to clone reference
    if (this.strokeList != null) {
        clone.strokeList = (StrokeList) this.strokeList.clone();
    }
    // 'outlineStroke' : immutable, no need to clone reference
    if (this.outlineStrokeList != null) {
        clone.outlineStrokeList = (StrokeList) this.outlineStrokeList.clone();
    }
    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();
    }
    // 'itemLabelFont' : immutable, no need to clone reference
    if (this.itemLabelFontMap != null) {
        clone.itemLabelFontMap = CloneUtils.cloneMapValues(this.itemLabelFontMap);
    }
    // 'itemLabelPaint' : immutable, no need to clone reference
    if (this.itemLabelPaintList != null) {
        clone.itemLabelPaintList = (PaintList) this.itemLabelPaintList.clone();
    }
    // 'postiveItemLabelAnchor' : immutable, no need to clone reference
    if (this.positiveItemLabelPositionMap != null) {
        clone.positiveItemLabelPositionMap = CloneUtils.cloneMapValues(this.positiveItemLabelPositionMap);
    }
    // 'negativeItemLabelAnchor' : immutable, no need to clone reference
    if (this.negativeItemLabelPositionMap != null) {
        clone.negativeItemLabelPositionMap = CloneUtils.cloneMapValues(this.negativeItemLabelPositionMap);
    }
    if (this.createEntitiesList != null) {
        clone.createEntitiesList = (BooleanList) this.createEntitiesList.clone();
    }
    if (this.legendShapeList != null) {
        clone.legendShapeList = (ShapeList) this.legendShapeList.clone();
    }
    if (this.legendTextFontMap != null) {
        clone.legendTextFontMap = CloneUtils.cloneMapValues(this.legendTextFontMap);
    }
    if (this.legendTextPaint != null) {
        clone.legendTextPaint = (PaintList) this.legendTextPaint.clone();
    }
    clone.listenerList = new EventListenerList();
    clone.event = null;
    return clone;
}
Also used : EventListenerList(javax.swing.event.EventListenerList)

Example 20 with EventListenerList

use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.

the class AbstractRenderer method readObject.

/**
 * 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.basePaint = SerialUtilities.readPaint(stream);
    this.fillPaint = SerialUtilities.readPaint(stream);
    this.baseFillPaint = SerialUtilities.readPaint(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.baseOutlinePaint = SerialUtilities.readPaint(stream);
    this.stroke = SerialUtilities.readStroke(stream);
    this.baseStroke = SerialUtilities.readStroke(stream);
    this.outlineStroke = SerialUtilities.readStroke(stream);
    this.baseOutlineStroke = SerialUtilities.readStroke(stream);
    this.shape = SerialUtilities.readShape(stream);
    this.baseShape = SerialUtilities.readShape(stream);
    this.itemLabelPaint = SerialUtilities.readPaint(stream);
    this.baseItemLabelPaint = SerialUtilities.readPaint(stream);
    this.baseLegendShape = SerialUtilities.readShape(stream);
    this.baseLegendTextPaint = SerialUtilities.readPaint(stream);
    // listeners are not restored automatically, but storage must be
    // provided...
    this.listenerList = new EventListenerList();
}
Also used : EventListenerList(javax.swing.event.EventListenerList)

Aggregations

EventListenerList (javax.swing.event.EventListenerList)21 Paint (java.awt.Paint)2 RectangleConstraint (org.jfree.chart.block.RectangleConstraint)2 WindowsTabbedPaneUI (com.sun.java.swing.plaf.windows.WindowsTabbedPaneUI)1 RenderingHints (java.awt.RenderingHints)1 PropertyChangeSupport (java.beans.PropertyChangeSupport)1 VetoableChangeSupport (java.beans.VetoableChangeSupport)1 ArrayList (java.util.ArrayList)1 LegendTitle (org.jfree.chart.title.LegendTitle)1 TextTitle (org.jfree.chart.title.TextTitle)1 Title (org.jfree.chart.title.Title)1