Java Code Examples for org.jfree.chart.axis.ValueAxis#removeChangeListener()

The following examples show how to use org.jfree.chart.axis.ValueAxis#removeChangeListener() . 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: Chart_19_CategoryPlot_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a range axis and, if requested, sends a {@link PlotChangeEvent} to 
 * all registered listeners.
 *
 * @param index  the axis index.
 * @param axis  the axis.
 * @param notify  notify listeners?
 */
public void setRangeAxis(int index, ValueAxis axis, boolean notify) {
    ValueAxis existing = (ValueAxis) this.rangeAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.rangeAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        notifyListeners(new PlotChangeEvent(this));
    }
}
 
Example 2
Source File: PolarPlot.java    From ECG-Viewer with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Sets an axis for the plot and, if requested, sends a
 * {@link PlotChangeEvent} to all registered listeners.
 *
 * @param index  the axis index.
 * @param axis  the axis (<code>null</code> permitted).
 * @param notify  notify listeners?
 *
 * @see #getAxis(int)
 *
 * @since 1.0.14
 */
public void setAxis(int index, ValueAxis axis, boolean notify) {
    ValueAxis existing = getAxis(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.axes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        fireChangeEvent();
    }
}
 
Example 3
Source File: 1_XYPlot.java    From SimFix with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Sets a range axis and, if requested, sends a {@link PlotChangeEvent} to 
 * all registered listeners.
 *
 * @param index  the axis index.
 * @param axis  the axis (<code>null</code> permitted).
 * @param notify  notify listeners?
 * 
 * @see #getRangeAxis(int)
 */
public void setRangeAxis(int index, ValueAxis axis, boolean notify) {
    ValueAxis existing = getRangeAxis(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.rangeAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        fireChangeEvent();
    }
}
 
Example 4
Source File: XYPlot.java    From SIMVA-SoS with Apache License 2.0 6 votes vote down vote up
/**
 * Sets a domain axis and, if requested, sends a {@link PlotChangeEvent} to
 * all registered listeners.
 *
 * @param index  the axis index.
 * @param axis  the axis.
 * @param notify  notify listeners?
 *
 * @see #getDomainAxis(int)
 */
public void setDomainAxis(int index, ValueAxis axis, boolean notify) {
    ValueAxis existing = getDomainAxis(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.domainAxes.put(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        fireChangeEvent();
    }
}
 
Example 5
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Sets a range axis and, if requested, sends a {@link PlotChangeEvent} to 
 * all registered listeners.
 *
 * @param index  the axis index.
 * @param axis  the axis.
 * @param notify  notify listeners?
 */
public void setRangeAxis(int index, ValueAxis axis, boolean notify) {
    ValueAxis existing = (ValueAxis) this.rangeAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.rangeAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        notifyListeners(new PlotChangeEvent(this));
    }
}
 
Example 6
Source File: CategoryPlot.java    From opensim-gui with Apache License 2.0 6 votes vote down vote up
/**
 * Sets a range axis and, if requested, sends a {@link PlotChangeEvent} to 
 * all registered listeners.
 *
 * @param index  the axis index.
 * @param axis  the axis.
 * @param notify  notify listeners?
 */
public void setRangeAxis(int index, ValueAxis axis, boolean notify) {
    ValueAxis existing = (ValueAxis) this.rangeAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.rangeAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        notifyListeners(new PlotChangeEvent(this));
    }
}
 
Example 7
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent} 
 * to all registered listeners.
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 8
Source File: XYPlot.java    From opensim-gui with Apache License 2.0 5 votes vote down vote up
/**
 * Clears the domain axes from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 * 
 * @see #clearRangeAxes()
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 9
Source File: Cardumen_0082_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the domain axes from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @see #clearRangeAxes()
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 10
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent} 
 * to all registered listeners.
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    fireChangeEvent();
}
 
Example 11
Source File: jMutRepair_0021_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent} 
 * to all registered listeners.
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 12
Source File: 1_XYPlot.java    From SimFix with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Clears the domain axes from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 * 
 * @see #clearRangeAxes()
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 13
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Clears the domain axes from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @see #clearRangeAxes()
 */
public void clearDomainAxes() {
    for (ValueAxis axis: this.domainAxes.values()) {
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 14
Source File: Nopol2017_005_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent} 
 * to all registered listeners.
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 15
Source File: Nopol2017_005_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent} 
 * to all registered listeners.
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 16
Source File: Chart_14_CategoryPlot_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent} 
 * to all registered listeners.
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    fireChangeEvent();
}
 
Example 17
Source File: Cardumen_009_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @see #clearDomainAxes()
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    fireChangeEvent();
}
 
Example 18
Source File: XYPlot.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Clears the domain axes from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @see #clearRangeAxes()
 */
public void clearDomainAxes() {
    for (ValueAxis axis: this.domainAxes.values()) {
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 19
Source File: Cardumen_006_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Clears the range axes from the plot and sends a {@link PlotChangeEvent} 
 * to all registered listeners.
 */
public void clearRangeAxes() {
    for (int i = 0; i < this.rangeAxes.size(); i++) {
        ValueAxis axis = (ValueAxis) this.rangeAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.rangeAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 20
Source File: XYPlot.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Clears the domain axes from the plot and sends a {@link PlotChangeEvent}
 * to all registered listeners.
 *
 * @see #clearRangeAxes()
 */
public void clearDomainAxes() {
    for (ValueAxis axis: this.domainAxes.values()) {
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}