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

The following examples show how to use org.jfree.chart.axis.CategoryAxis#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: jMutRepair_0030_t.java    From coming with MIT License 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 (<code>null</code> permitted).
 * @param notify  notify listeners?
 */
public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {
    CategoryAxis existing = (CategoryAxis) this.domainAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.domainAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        notifyListeners(new PlotChangeEvent(this));
    }
}
 
Example 2
Source File: CategoryPlot.java    From astor with GNU General Public License v2.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 (<code>null</code> permitted).
 * @param notify  notify listeners?
 */
public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {
    CategoryAxis existing = (CategoryAxis) this.domainAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.domainAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        fireChangeEvent();
    }
}
 
Example 3
Source File: CategoryPlot.java    From astor with GNU General Public License v2.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 (<code>null</code> permitted).
 * @param notify  notify listeners?
 */
public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {
    CategoryAxis existing = (CategoryAxis) this.domainAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.domainAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        fireChangeEvent();
    }
}
 
Example 4
Source File: Chart_14_CategoryPlot_s.java    From coming with MIT License 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 (<code>null</code> permitted).
 * @param notify  notify listeners?
 */
public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {
    CategoryAxis existing = (CategoryAxis) this.domainAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.domainAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        fireChangeEvent();
    }
}
 
Example 5
Source File: CategoryPlot.java    From opensim-gui 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?
 */
public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {
    CategoryAxis existing = (CategoryAxis) this.domainAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.domainAxes.set(index, axis);
    if (axis != null) {
        axis.configure();
        axis.addChangeListener(this);
    }
    if (notify) {
        notifyListeners(new PlotChangeEvent(this));
    }
}
 
Example 6
Source File: Nopol2017_005_s.java    From coming with MIT License 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 (<code>null</code> permitted).
 * @param notify  notify listeners?
 */
public void setDomainAxis(int index, CategoryAxis axis, boolean notify) {
    CategoryAxis existing = (CategoryAxis) this.domainAxes.get(index);
    if (existing != null) {
        existing.removeChangeListener(this);
    }
    if (axis != null) {
        axis.setPlot(this);
    }
    this.domainAxes.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_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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 8
Source File: Cardumen_006_s.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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 9
Source File: jMutRepair_0030_s.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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 10
Source File: Chart_14_CategoryPlot_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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 11
Source File: jKali_001_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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 12
Source File: CategoryPlot.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.
 */
public void clearDomainAxes() {
    for (CategoryAxis xAxis : this.domainAxes.values()) {
        if (xAxis != null) {
            xAxis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 13
Source File: 1_CategoryPlot.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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 14
Source File: JGenProg2017_0081_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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 15
Source File: 1_CategoryPlot.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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 16
Source File: jMutRepair_001_s.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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 17
Source File: 1_CategoryPlot.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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 18
Source File: CategoryPlot.java    From astor 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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}
 
Example 19
Source File: JGenProg2017_005_s.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.
 */
public void clearDomainAxes() {
    for (int i = 0; i < this.domainAxes.size(); i++) {
        CategoryAxis axis = (CategoryAxis) this.domainAxes.get(i);
        if (axis != null) {
            axis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    notifyListeners(new PlotChangeEvent(this));
}
 
Example 20
Source File: CategoryPlot.java    From openstock 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.
 */
public void clearDomainAxes() {
    for (CategoryAxis xAxis : this.domainAxes.values()) {
        if (xAxis != null) {
            xAxis.removeChangeListener(this);
        }
    }
    this.domainAxes.clear();
    fireChangeEvent();
}