org.jfree.chart.event.RendererChangeEvent Java Examples
The following examples show how to use
org.jfree.chart.event.RendererChangeEvent.
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: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java From coming with MIT License | 6 votes |
/** * Receives notification of a renderer change event. * * @param event the event. */ public void rendererChanged(RendererChangeEvent event) { Plot parent = getParent(); if (parent != null) { if (parent instanceof RendererChangeListener) { RendererChangeListener rcl = (RendererChangeListener) parent; rcl.rendererChanged(event); } else { // this should never happen with the existing code, but throw // an exception in case future changes make it possible... throw new RuntimeException( "The renderer has changed and I don't know what to do!"); } } else { configureRangeAxes(); PlotChangeEvent e = new PlotChangeEvent(this); notifyListeners(e); } }
Example #2
Source File: AbstractRenderer.java From astor with GNU General Public License v2.0 | 5 votes |
/** * Notifies all registered listeners that the renderer has been modified. * * @param event information about the change event. */ public void notifyListeners(RendererChangeEvent event) { Object[] ls = this.listenerList.getListenerList(); for (int i = ls.length - 2; i >= 0; i -= 2) { if (ls[i] == RendererChangeListener.class) { ((RendererChangeListener) ls[i + 1]).rendererChanged(event); } } }
Example #3
Source File: AbstractRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Sets the base visibility and, if requested, sends * a {@link RendererChangeEvent} to all registered listeners. * * @param visible the visibility. * @param notify notify listeners? * * @see #getBaseSeriesVisible() */ public void setBaseSeriesVisible(boolean visible, boolean notify) { this.baseSeriesVisible = visible; if (notify) { // we create an event with a special flag set...the purpose of // this is to communicate to the plot (the default receiver of // the event) that series visibility has changed so the axis // ranges might need updating... RendererChangeEvent e = new RendererChangeEvent(this, true); notifyListeners(e); } }
Example #4
Source File: AbstractRenderer.java From buffer_bci with GNU General Public License v3.0 | 5 votes |
/** * Notifies all registered listeners that the renderer has been modified. * * @param event information about the change event. */ public void notifyListeners(RendererChangeEvent event) { Object[] ls = this.listenerList.getListenerList(); for (int i = ls.length - 2; i >= 0; i -= 2) { if (ls[i] == RendererChangeListener.class) { ((RendererChangeListener) ls[i + 1]).rendererChanged(event); } } }
Example #5
Source File: CandlestickRenderer.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * Sets a flag that controls whether or not volume bars are drawn in the * background. * * @param flag The flag. */ public void setDrawVolume(boolean flag) { if (this.drawVolume != flag) { this.drawVolume = flag; notifyListeners(new RendererChangeEvent(this)); } }
Example #6
Source File: AbstractRenderer.java From ccu-historian with GNU General Public License v3.0 | 5 votes |
/** * Sets the base visibility and, if requested, sends * a {@link RendererChangeEvent} to all registered listeners. * * @param visible the visibility. * @param notify notify listeners? * * @see #getBaseSeriesVisible() */ public void setBaseSeriesVisible(boolean visible, boolean notify) { this.baseSeriesVisible = visible; if (notify) { // we create an event with a special flag set...the purpose of // this is to communicate to the plot (the default receiver of // the event) that series visibility has changed so the axis // ranges might need updating... RendererChangeEvent e = new RendererChangeEvent(this, true); notifyListeners(e); } }
Example #7
Source File: AbstractRenderer.java From opensim-gui with Apache License 2.0 | 5 votes |
/** * Sets the base stroke and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param stroke the stroke (<code>null</code> not permitted). * @param notify notify listeners? */ public void setBaseStroke(Stroke stroke, boolean notify) { if (stroke == null) { throw new IllegalArgumentException("Null 'stroke' argument."); } this.baseStroke = stroke; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #8
Source File: AbstractRenderer.java From ECG-Viewer with GNU General Public License v2.0 | 5 votes |
/** * Sends a {@link RendererChangeEvent} to all registered listeners. * * @since 1.0.5 */ protected void fireChangeEvent() { // the commented out code would be better, but only if // RendererChangeEvent is immutable, which it isn't. See if there is // a way to fix this... //if (this.event == null) { // this.event = new RendererChangeEvent(this); //} //notifyListeners(this.event); notifyListeners(new RendererChangeEvent(this)); }
Example #9
Source File: JGenProg2017_0044_t.java From coming with MIT License | 3 votes |
/** * Sets the base item URL generator. * * @param generator the item URL generator (<code>null</code> permitted). * @param notify notify listeners? * * @see #getBaseURLGenerator() * * @since 1.2.0 */ public void setBaseURLGenerator(CategoryURLGenerator generator, boolean notify) { this.baseURLGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #10
Source File: JGenProg2017_0078_t.java From coming with MIT License | 3 votes |
/** * Sets the item label generator for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesItemLabelGenerator(int) */ public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator, boolean notify) { this.itemLabelGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #11
Source File: Arja_00112_s.java From coming with MIT License | 3 votes |
/** * Sets the item label generator for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesItemLabelGenerator(int) */ public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator, boolean notify) { this.itemLabelGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #12
Source File: jKali_0019_t.java From coming with MIT License | 3 votes |
/** * Removes the specified annotation and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param annotation the annotation to remove (<code>null</code> not * permitted). * * @return A boolean to indicate whether or not the annotation was * successfully removed. * * @since 1.2.0 */ public boolean removeAnnotation(CategoryAnnotation annotation) { boolean removed = this.foregroundAnnotations.remove(annotation); removed = removed & this.backgroundAnnotations.remove(annotation); notifyListeners(new RendererChangeEvent(this)); return removed; }
Example #13
Source File: Cardumen_000_t.java From coming with MIT License | 3 votes |
/** * Sets the item label generator for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesItemLabelGenerator(int) */ public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator, boolean notify) { this.itemLabelGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #14
Source File: Cardumen_00191_t.java From coming with MIT License | 3 votes |
/** * Removes the specified annotation and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param annotation the annotation to remove (<code>null</code> not * permitted). * * @return A boolean to indicate whether or not the annotation was * successfully removed. * * @since 1.2.0 */ public boolean removeAnnotation(CategoryAnnotation annotation) { boolean removed = this.foregroundAnnotations.remove(annotation); removed = removed & this.backgroundAnnotations.remove(annotation); notifyListeners(new RendererChangeEvent(this)); return removed; }
Example #15
Source File: patch1-Chart-1-jMutRepair_patch1-Chart-1-jMutRepair_s.java From coming with MIT License | 3 votes |
/** * Sets the base item URL generator. * * @param generator the item URL generator (<code>null</code> permitted). * @param notify notify listeners? * * @see #getBaseURLGenerator() * * @since 1.2.0 */ public void setBaseURLGenerator(CategoryURLGenerator generator, boolean notify) { this.baseURLGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #16
Source File: JGenProg2017_000_t.java From coming with MIT License | 3 votes |
/** * Removes the specified annotation and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param annotation the annotation to remove (<code>null</code> not * permitted). * * @return A boolean to indicate whether or not the annotation was * successfully removed. * * @since 1.2.0 */ public boolean removeAnnotation(CategoryAnnotation annotation) { boolean removed = this.foregroundAnnotations.remove(annotation); removed = removed & this.backgroundAnnotations.remove(annotation); notifyListeners(new RendererChangeEvent(this)); return removed; }
Example #17
Source File: jMutRepair_0020_t.java From coming with MIT License | 3 votes |
/** * Sets the base item label generator and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getBaseItemLabelGenerator() */ public void setBaseItemLabelGenerator( CategoryItemLabelGenerator generator, boolean notify) { this.baseItemLabelGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #18
Source File: patch1-Chart-1-jMutRepair_patch1-Chart-1-jMutRepair_s.java From coming with MIT License | 3 votes |
/** * Sets the URL generator for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesURLGenerator(int) */ public void setSeriesURLGenerator(int series, CategoryURLGenerator generator, boolean notify) { this.urlGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #19
Source File: Elixir_000_t.java From coming with MIT License | 3 votes |
/** * Sets the base tool tip generator and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getBaseToolTipGenerator() */ public void setBaseToolTipGenerator(CategoryToolTipGenerator generator, boolean notify) { this.baseToolTipGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #20
Source File: Elixir_000_t.java From coming with MIT License | 3 votes |
/** * Sets the tool tip generator for a series and sends a * {@link org.jfree.chart.event.RendererChangeEvent} to all registered * listeners. * * @param series the series index (zero-based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesToolTipGenerator(int) */ public void setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator, boolean notify) { this.toolTipGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #21
Source File: Arja_0089_s.java From coming with MIT License | 3 votes |
/** * Sets the item label generator for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesItemLabelGenerator(int) */ public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator, boolean notify) { this.itemLabelGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #22
Source File: JGenProg2017_00102_t.java From coming with MIT License | 3 votes |
/** * Sets the tool tip generator for a series and sends a * {@link org.jfree.chart.event.RendererChangeEvent} to all registered * listeners. * * @param series the series index (zero-based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesToolTipGenerator(int) */ public void setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator, boolean notify) { this.toolTipGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #23
Source File: Arja_00112_t.java From coming with MIT License | 3 votes |
/** * Sets the tool tip generator for a series and sends a * {@link org.jfree.chart.event.RendererChangeEvent} to all registered * listeners. * * @param series the series index (zero-based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesToolTipGenerator(int) */ public void setSeriesToolTipGenerator(int series, CategoryToolTipGenerator generator, boolean notify) { this.toolTipGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #24
Source File: Chart_23_MinMaxCategoryRenderer_t.java From coming with MIT License | 3 votes |
/** * Sets the paint used to draw the line between the minimum and maximum * value items in each category and sends a {@link RendererChangeEvent} to * all registered listeners. * * @param paint the paint (<code>null</code> not permitted). * * @see #getGroupPaint() */ public void setGroupPaint(Paint paint) { if (paint == null) { throw new IllegalArgumentException("Null 'paint' argument."); } this.groupPaint = paint; notifyListeners(new RendererChangeEvent(this)); }
Example #25
Source File: Cardumen_00191_t.java From coming with MIT License | 3 votes |
/** * Sets the item label generator for a series and, if requested, sends a * {@link RendererChangeEvent} to all registered listeners. * * @param series the series index (zero based). * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getSeriesItemLabelGenerator(int) */ public void setSeriesItemLabelGenerator(int series, CategoryItemLabelGenerator generator, boolean notify) { this.itemLabelGeneratorList.set(series, generator); if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #26
Source File: Arja_00112_s.java From coming with MIT License | 3 votes |
/** * Removes the specified annotation and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param annotation the annotation to remove (<code>null</code> not * permitted). * * @return A boolean to indicate whether or not the annotation was * successfully removed. * * @since 1.2.0 */ public boolean removeAnnotation(CategoryAnnotation annotation) { boolean removed = this.foregroundAnnotations.remove(annotation); removed = removed & this.backgroundAnnotations.remove(annotation); notifyListeners(new RendererChangeEvent(this)); return removed; }
Example #27
Source File: Arja_00112_t.java From coming with MIT License | 3 votes |
/** * Removes the specified annotation and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param annotation the annotation to remove (<code>null</code> not * permitted). * * @return A boolean to indicate whether or not the annotation was * successfully removed. * * @since 1.2.0 */ public boolean removeAnnotation(CategoryAnnotation annotation) { boolean removed = this.foregroundAnnotations.remove(annotation); removed = removed & this.backgroundAnnotations.remove(annotation); notifyListeners(new RendererChangeEvent(this)); return removed; }
Example #28
Source File: Cardumen_000_t.java From coming with MIT License | 3 votes |
/** * Removes the specified annotation and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param annotation the annotation to remove (<code>null</code> not * permitted). * * @return A boolean to indicate whether or not the annotation was * successfully removed. * * @since 1.2.0 */ public boolean removeAnnotation(CategoryAnnotation annotation) { boolean removed = this.foregroundAnnotations.remove(annotation); removed = removed & this.backgroundAnnotations.remove(annotation); notifyListeners(new RendererChangeEvent(this)); return removed; }
Example #29
Source File: patch1-Chart-1-jMutRepair_patch1-Chart-1-jMutRepair_s.java From coming with MIT License | 3 votes |
/** * Sets the base tool tip generator and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param generator the generator (<code>null</code> permitted). * @param notify notify listeners? * * @since 1.2.0 * * @see #getBaseToolTipGenerator() */ public void setBaseToolTipGenerator(CategoryToolTipGenerator generator, boolean notify) { this.baseToolTipGenerator = generator; if (notify) { notifyListeners(new RendererChangeEvent(this)); } }
Example #30
Source File: XYSplineAndShapeRenderer.java From astor with GNU General Public License v2.0 | 3 votes |
/** * Set the resolution of splines and sends a {@link RendererChangeEvent} * to all registered listeners. * * @param p number of line segments between points (must be > 0). * * @see #getPrecision() */ public void setPrecision(int p) { if (p <= 0) { throw new IllegalArgumentException("Requires p > 0."); } this.precision = p; notifyListeners(new RendererChangeEvent(this)); }