org.jfree.chart.event.AnnotationChangeEvent Java Examples

The following examples show how to use org.jfree.chart.event.AnnotationChangeEvent. 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: AbstractAnnotation.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @param event  contains information about the event that triggered the
 *               notification.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 * @see #removeChangeListener(AnnotationChangeListener)
 */
protected void notifyListeners(AnnotationChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AnnotationChangeListener.class) {
            ((AnnotationChangeListener) listeners[i + 1]).annotationChanged(
                    event);
        }
    }

}
 
Example #2
Source File: AbstractAnnotation.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @param event  contains information about the event that triggered the
 *               notification.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 * @see #removeChangeListener(AnnotationChangeListener)
 */
protected void notifyListeners(AnnotationChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AnnotationChangeListener.class) {
            ((AnnotationChangeListener) listeners[i + 1]).annotationChanged(
                    event);
        }
    }

}
 
Example #3
Source File: CategoryPlot.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #4
Source File: AbstractAnnotation.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @param event  contains information about the event that triggered the
 *               notification.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 * @see #removeChangeListener(AnnotationChangeListener)
 */
protected void notifyListeners(AnnotationChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AnnotationChangeListener.class) {
            ((AnnotationChangeListener) listeners[i + 1]).annotationChanged(
                    event);
        }
    }

}
 
Example #5
Source File: CategoryPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #6
Source File: XYPlot.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #7
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #8
Source File: CategoryPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #9
Source File: AbstractAnnotation.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @param event  contains information about the event that triggered the
 *               notification.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 * @see #removeChangeListener(AnnotationChangeListener)
 */
protected void notifyListeners(AnnotationChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AnnotationChangeListener.class) {
            ((AnnotationChangeListener) listeners[i + 1]).annotationChanged(
                    event);
        }
    }

}
 
Example #10
Source File: CategoryPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #11
Source File: XYPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #12
Source File: AbstractAnnotation.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @param event  contains information about the event that triggered the
 *               notification.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 * @see #removeChangeListener(AnnotationChangeListener)
 */
protected void notifyListeners(AnnotationChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AnnotationChangeListener.class) {
            ((AnnotationChangeListener) listeners[i + 1]).annotationChanged(
                    event);
        }
    }

}
 
Example #13
Source File: AbstractAnnotation.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @param event  contains information about the event that triggered the
 *               notification.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 * @see #removeChangeListener(AnnotationChangeListener)
 */
protected void notifyListeners(AnnotationChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AnnotationChangeListener.class) {
            ((AnnotationChangeListener) listeners[i + 1]).annotationChanged(
                    event);
        }
    }

}
 
Example #14
Source File: CategoryPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #15
Source File: XYPlot.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #16
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #17
Source File: CategoryPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #18
Source File: AbstractAnnotation.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @param event  contains information about the event that triggered the
 *               notification.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 * @see #removeChangeListener(AnnotationChangeListener)
 */
protected void notifyListeners(AnnotationChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AnnotationChangeListener.class) {
            ((AnnotationChangeListener) listeners[i + 1]).annotationChanged(
                    event);
        }
    }

}
 
Example #19
Source File: CategoryPlot.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #20
Source File: XYPlot.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    if (getParent() != null) {
        getParent().annotationChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        notifyListeners(e);
    }
}
 
Example #21
Source File: AbstractAnnotation.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 */
protected void fireAnnotationChanged() {
    if (notify) {
        notifyListeners(new AnnotationChangeEvent(this, this));
    }
}
 
Example #22
Source File: AbstractAnnotation.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 */
protected void fireAnnotationChanged() {
    if (notify) {
        notifyListeners(new AnnotationChangeEvent(this, this));
    }
}
 
Example #23
Source File: AbstractAnnotation.java    From SIMVA-SoS with Apache License 2.0 4 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 */
protected void fireAnnotationChanged() {
    if (notify) {
        notifyListeners(new AnnotationChangeEvent(this, this));
    }
}
 
Example #24
Source File: AbstractAnnotation.java    From ccu-historian with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 */
protected void fireAnnotationChanged() {
    if (notify) {
        notifyListeners(new AnnotationChangeEvent(this, this));
    }
}
 
Example #25
Source File: AbstractAnnotation.java    From openstock with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 */
protected void fireAnnotationChanged() {
    if (notify) {
        notifyListeners(new AnnotationChangeEvent(this, this));
    }
}
 
Example #26
Source File: AbstractAnnotation.java    From ECG-Viewer with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 */
protected void fireAnnotationChanged() {
    if (notify) {
        notifyListeners(new AnnotationChangeEvent(this, this));
    }
}
 
Example #27
Source File: AbstractAnnotation.java    From buffer_bci with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Notifies all registered listeners that the annotation has changed.
 *
 * @see #addChangeListener(AnnotationChangeListener)
 */
protected void fireAnnotationChanged() {
    if (notify) {
        notifyListeners(new AnnotationChangeEvent(this, this));
    }
}
 
Example #28
Source File: Plot.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    fireChangeEvent();
}
 
Example #29
Source File: Plot.java    From ECG-Viewer with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Receives notification of a change to an {@link Annotation} added to
 * this plot.
 *
 * @param event  information about the event (not used here).
 *
 * @since 1.0.14
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    fireChangeEvent();
}
 
Example #30
Source File: TextAnnotationTest.java    From buffer_bci with GNU General Public License v3.0 2 votes vote down vote up
/**
 * Receives notification of a change to an annotation.
 * 
 * @param event  the event. 
 */
@Override
public void annotationChanged(AnnotationChangeEvent event) {
    this.lastEvent = event;  
}