Java Code Examples for org.jfree.chart.annotations.XYAnnotation#addChangeListener()
The following examples show how to use
org.jfree.chart.annotations.XYAnnotation#addChangeListener() .
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: AbstractXYItemRenderer.java From openstock with GNU General Public License v3.0 | 6 votes |
/** * Adds an annotation to the specified layer and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param layer the layer (<code>null</code> not permitted). */ @Override public void addAnnotation(XYAnnotation annotation, Layer layer) { ParamChecks.nullNotPermitted(annotation, "annotation"); if (layer.equals(Layer.FOREGROUND)) { this.foregroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else if (layer.equals(Layer.BACKGROUND)) { this.backgroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else { // should never get here throw new RuntimeException("Unknown layer."); } }
Example 2
Source File: AbstractXYItemRenderer.java From ccu-historian with GNU General Public License v3.0 | 6 votes |
/** * Adds an annotation to the specified layer and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param layer the layer (<code>null</code> not permitted). */ @Override public void addAnnotation(XYAnnotation annotation, Layer layer) { ParamChecks.nullNotPermitted(annotation, "annotation"); if (layer.equals(Layer.FOREGROUND)) { this.foregroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else if (layer.equals(Layer.BACKGROUND)) { this.backgroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else { // should never get here throw new RuntimeException("Unknown layer."); } }
Example 3
Source File: AbstractXYItemRenderer.java From SIMVA-SoS with Apache License 2.0 | 6 votes |
/** * Adds an annotation to the specified layer and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param layer the layer (<code>null</code> not permitted). */ @Override public void addAnnotation(XYAnnotation annotation, Layer layer) { ParamChecks.nullNotPermitted(annotation, "annotation"); if (layer.equals(Layer.FOREGROUND)) { this.foregroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else if (layer.equals(Layer.BACKGROUND)) { this.backgroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else { // should never get here throw new RuntimeException("Unknown layer."); } }
Example 4
Source File: AbstractXYItemRenderer.java From ECG-Viewer with GNU General Public License v2.0 | 6 votes |
/** * Adds an annotation to the specified layer and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param layer the layer (<code>null</code> not permitted). */ @Override public void addAnnotation(XYAnnotation annotation, Layer layer) { ParamChecks.nullNotPermitted(annotation, "annotation"); if (layer.equals(Layer.FOREGROUND)) { this.foregroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else if (layer.equals(Layer.BACKGROUND)) { this.backgroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else { // should never get here throw new RuntimeException("Unknown layer."); } }
Example 5
Source File: AbstractXYItemRenderer.java From astor with GNU General Public License v2.0 | 6 votes |
/** * Adds an annotation to the specified layer and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param layer the layer (<code>null</code> not permitted). */ public void addAnnotation(XYAnnotation annotation, Layer layer) { if (annotation == null) { throw new IllegalArgumentException("Null 'annotation' argument."); } if (layer.equals(Layer.FOREGROUND)) { this.foregroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else if (layer.equals(Layer.BACKGROUND)) { this.backgroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else { // should never get here throw new RuntimeException("Unknown layer."); } }
Example 6
Source File: AbstractXYItemRenderer.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Adds an annotation to the specified layer and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param layer the layer (<code>null</code> not permitted). */ @Override public void addAnnotation(XYAnnotation annotation, Layer layer) { ParamChecks.nullNotPermitted(annotation, "annotation"); if (layer.equals(Layer.FOREGROUND)) { this.foregroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else if (layer.equals(Layer.BACKGROUND)) { this.backgroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else { // should never get here throw new RuntimeException("Unknown layer."); } }
Example 7
Source File: AbstractXYItemRenderer.java From buffer_bci with GNU General Public License v3.0 | 6 votes |
/** * Adds an annotation to the specified layer and sends a * {@link RendererChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param layer the layer (<code>null</code> not permitted). */ @Override public void addAnnotation(XYAnnotation annotation, Layer layer) { ParamChecks.nullNotPermitted(annotation, "annotation"); if (layer.equals(Layer.FOREGROUND)) { this.foregroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else if (layer.equals(Layer.BACKGROUND)) { this.backgroundAnnotations.add(annotation); annotation.addChangeListener(this); fireChangeEvent(); } else { // should never get here throw new RuntimeException("Unknown layer."); } }
Example 8
Source File: XYPlot.java From openstock with GNU General Public License v3.0 | 3 votes |
/** * Adds an annotation to the plot and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param notify notify listeners? * * @since 1.0.10 */ public void addAnnotation(XYAnnotation annotation, boolean notify) { ParamChecks.nullNotPermitted(annotation, "annotation"); this.annotations.add(annotation); annotation.addChangeListener(this); if (notify) { fireChangeEvent(); } }
Example 9
Source File: XYPlot.java From ccu-historian with GNU General Public License v3.0 | 3 votes |
/** * Adds an annotation to the plot and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param notify notify listeners? * * @since 1.0.10 */ public void addAnnotation(XYAnnotation annotation, boolean notify) { ParamChecks.nullNotPermitted(annotation, "annotation"); this.annotations.add(annotation); annotation.addChangeListener(this); if (notify) { fireChangeEvent(); } }
Example 10
Source File: XYPlot.java From SIMVA-SoS with Apache License 2.0 | 3 votes |
/** * Adds an annotation to the plot and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param notify notify listeners? * * @since 1.0.10 */ public void addAnnotation(XYAnnotation annotation, boolean notify) { ParamChecks.nullNotPermitted(annotation, "annotation"); this.annotations.add(annotation); annotation.addChangeListener(this); if (notify) { fireChangeEvent(); } }
Example 11
Source File: XYPlot.java From ECG-Viewer with GNU General Public License v2.0 | 3 votes |
/** * Adds an annotation to the plot and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param notify notify listeners? * * @since 1.0.10 */ public void addAnnotation(XYAnnotation annotation, boolean notify) { ParamChecks.nullNotPermitted(annotation, "annotation"); this.annotations.add(annotation); annotation.addChangeListener(this); if (notify) { fireChangeEvent(); } }
Example 12
Source File: XYPlot.java From buffer_bci with GNU General Public License v3.0 | 3 votes |
/** * Adds an annotation to the plot and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param notify notify listeners? * * @since 1.0.10 */ public void addAnnotation(XYAnnotation annotation, boolean notify) { ParamChecks.nullNotPermitted(annotation, "annotation"); this.annotations.add(annotation); annotation.addChangeListener(this); if (notify) { fireChangeEvent(); } }
Example 13
Source File: XYPlot.java From buffer_bci with GNU General Public License v3.0 | 3 votes |
/** * Adds an annotation to the plot and, if requested, sends a * {@link PlotChangeEvent} to all registered listeners. * * @param annotation the annotation (<code>null</code> not permitted). * @param notify notify listeners? * * @since 1.0.10 */ public void addAnnotation(XYAnnotation annotation, boolean notify) { ParamChecks.nullNotPermitted(annotation, "annotation"); this.annotations.add(annotation); annotation.addChangeListener(this); if (notify) { fireChangeEvent(); } }