Java Code Examples for org.jfree.chart.event.PlotChangeEvent#setType()

The following examples show how to use org.jfree.chart.event.PlotChangeEvent#setType() . 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: Nopol2017_005_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 2
Source File: jMutRepair_0030_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 3
Source File: JGenProg2017_0081_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 4
Source File: Cardumen_00143_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 5
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 6
Source File: JGenProg2017_005_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 7
Source File: Chart_14_CategoryPlot_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 8
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 9
Source File: JGenProg2017_005_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 10
Source File: CategoryPlot.java    From ccu-historian with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
    for (ValueAxis yAxis : this.rangeAxes.values()) {
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 11
Source File: JGenProg2017_0081_s.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 12
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 13
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 14
Source File: patch1-Chart-26-jMutRepair_patch1-Chart-26-jMutRepair_t.java    From coming with MIT License 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 15
Source File: 1_CategoryPlot.java    From SimFix with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {

    int count = this.rangeAxes.size();
    for (int axisIndex = 0; axisIndex < count; axisIndex++) {
        ValueAxis yAxis = getRangeAxis(axisIndex);
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 16
Source File: CategoryPlot.java    From openstock with GNU General Public License v3.0 6 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The range axis bounds will be recalculated if necessary.
 *
 * @param event  information about the event (not used here).
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
    for (ValueAxis yAxis : this.rangeAxes.values()) {
        if (yAxis != null) {
            yAxis.configure();
        }
    }
    if (getParent() != null) {
        getParent().datasetChanged(event);
    } else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }

}
 
Example 17
Source File: Chart_14_XYPlot_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The axis ranges are updated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {
    configureDomainAxes();
    configureRangeAxes();
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }
}
 
Example 18
Source File: Cardumen_0082_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The axis ranges are updated if necessary.
 *
 * @param event  information about the event (not used here).
 */
public void datasetChanged(DatasetChangeEvent event) {
    configureDomainAxes();
    configureRangeAxes();
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }
}
 
Example 19
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 the plot's dataset.
 * <P>
 * The axis ranges are updated if necessary.
 *
 * @param event  information about the event (not used here).
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
    configureDomainAxes();
    configureRangeAxes();
    if (getParent() != null) {
        getParent().datasetChanged(event);
    }
    else {
        PlotChangeEvent e = new PlotChangeEvent(this);
        e.setType(ChartChangeEventType.DATASET_UPDATED);
        notifyListeners(e);
    }
}
 
Example 20
Source File: Plot.java    From ccu-historian with GNU General Public License v3.0 3 votes vote down vote up
/**
 * Receives notification of a change to the plot's dataset.
 * <P>
 * The plot reacts by passing on a plot change event to all registered
 * listeners.
 *
 * @param event  information about the event (not used here).
 */
@Override
public void datasetChanged(DatasetChangeEvent event) {
    PlotChangeEvent newEvent = new PlotChangeEvent(this);
    newEvent.setType(ChartChangeEventType.DATASET_UPDATED);
    notifyListeners(newEvent);
}