use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.
the class AbstractAnnotation method clone.
/**
* Returns a clone of the annotation. The cloned annotation will NOT
* include the {@link AnnotationChangeListener} references that have been
* registered with this annotation.
*
* @return A clone.
*
* @throws CloneNotSupportedException if the annotation does not support
* cloning.
*/
@Override
public Object clone() throws CloneNotSupportedException {
AbstractAnnotation clone = (AbstractAnnotation) super.clone();
clone.listenerList = new EventListenerList();
return clone;
}
use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.
the class JFreeChartInfo method clone.
/**
* Clones the object, and takes care of listeners.
* Note: caller shall register its own listeners on cloned graph.
*
* @return A clone.
*
* @throws CloneNotSupportedException if the chart is not cloneable.
*/
@Override
public Object clone() throws CloneNotSupportedException {
JFreeChart chart = (JFreeChart) super.clone();
chart.renderingHints = (RenderingHints) this.renderingHints.clone();
if (this.title != null) {
chart.title = (TextTitle) this.title.clone();
chart.title.addChangeListener(chart);
}
chart.subtitles = new ArrayList();
for (int i = 0; i < getSubtitleCount(); i++) {
Title subtitle = (Title) getSubtitle(i).clone();
chart.subtitles.add(subtitle);
subtitle.addChangeListener(chart);
}
if (this.plot != null) {
chart.plot = (Plot) this.plot.clone();
chart.plot.addChangeListener(chart);
}
chart.progressListeners = new EventListenerList();
chart.changeListeners = new EventListenerList();
return chart;
}
use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.
the class Axis method clone.
/**
* Returns a clone of the axis.
*
* @return A clone.
*
* @throws CloneNotSupportedException if some component of the axis does
* not support cloning.
*/
@Override
public Object clone() throws CloneNotSupportedException {
Axis clone = (Axis) super.clone();
// It's up to the plot which clones up to restore the correct references
clone.plot = null;
clone.listenerList = new EventListenerList();
return clone;
}
use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.
the class Title method clone.
/**
* Returns a clone of the title.
* <P>
* One situation when this is useful is when editing the title properties -
* you can edit a clone, and then it is easier to cancel the changes if
* necessary.
*
* @return A clone of the title.
*
* @throws CloneNotSupportedException not thrown by this class, but it may
* be thrown by subclasses.
*/
@Override
public Object clone() throws CloneNotSupportedException {
Title duplicate = (Title) super.clone();
duplicate.listenerList = new EventListenerList();
// RectangleInsets is immutable => same reference in clone OK
return duplicate;
}
use of javax.swing.event.EventListenerList in project SIMVA-SoS by SESoS.
the class Plot method clone.
/**
* Creates a clone of the plot.
*
* @return A clone.
*
* @throws CloneNotSupportedException if some component of the plot does not
* support cloning.
*/
@Override
public Object clone() throws CloneNotSupportedException {
Plot clone = (Plot) super.clone();
// childs in combined plots instead
if (this.datasetGroup != null) {
clone.datasetGroup = (DatasetGroup) ObjectUtilities.clone(this.datasetGroup);
}
clone.drawingSupplier = (DrawingSupplier) ObjectUtilities.clone(this.drawingSupplier);
clone.listenerList = new EventListenerList();
return clone;
}
Aggregations