org.jfree.chart.event.AxisChangeListener Java Examples

The following examples show how to use org.jfree.chart.event.AxisChangeListener. 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: jKali_0041_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #2
Source File: Axis.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {
    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }
}
 
Example #3
Source File: Axis.java    From opensim-gui with Apache License 2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #4
Source File: Cardumen_0080_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #5
Source File: Chart_26_Axis_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #6
Source File: Axis.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {
    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }
}
 
Example #7
Source File: Cardumen_0080_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #8
Source File: Axis.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {
    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }
}
 
Example #9
Source File: Axis.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {
    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }
}
 
Example #10
Source File: Axis.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {
    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }
}
 
Example #11
Source File: jMutRepair_0038_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #12
Source File: Cardumen_00144_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #13
Source File: Cardumen_00195_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #14
Source File: Cardumen_00195_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #15
Source File: jMutRepair_0046_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #16
Source File: Cardumen_007_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #17
Source File: Cardumen_007_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #18
Source File: jMutRepair_0046_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #19
Source File: JGenProg2017_0082_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #20
Source File: jKali_0032_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #21
Source File: JGenProg2017_0082_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #22
Source File: JGenProg2017_006_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #23
Source File: jKali_0032_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #24
Source File: Axis.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #25
Source File: JGenProg2017_006_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #26
Source File: jKali_0041_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #27
Source File: jMutRepair_0038_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * Notifies all registered listeners that the axis has changed.
 * The AxisChangeEvent provides information about the change.
 *
 * @param event  information about the change to the axis.
 */
protected void notifyListeners(AxisChangeEvent event) {

    Object[] listeners = this.listenerList.getListenerList();
    for (int i = listeners.length - 2; i >= 0; i -= 2) {
        if (listeners[i] == AxisChangeListener.class) {
            ((AxisChangeListener) listeners[i + 1]).axisChanged(event);
        }
    }

}
 
Example #28
Source File: ProfilePlotPanel.java    From snap-desktop with GNU General Public License v3.0 4 votes vote down vote up
@Override
protected void initComponents() {
    if (hasAlternativeView()) {
        getAlternativeView().initComponents();
    }
    dataset = new XYIntervalSeriesCollection();
    this.chart = ChartFactory.createXYLineChart(
            CHART_TITLE,
            "Path in pixels",
            DEFAULT_SAMPLE_DATASET_NAME,
            dataset,
            PlotOrientation.VERTICAL,
            true,
            true,
            false
    );
    final XYPlot plot = chart.getXYPlot();

    deviationRenderer = new DeviationRenderer();
    deviationRenderer.setUseFillPaint(true);
    deviationRenderer.setBaseToolTipGenerator(new XYPlotToolTipGenerator());
    deviationRenderer.setSeriesLinesVisible(0, true);
    deviationRenderer.setSeriesShapesVisible(0, false);
    deviationRenderer.setSeriesStroke(0, new BasicStroke(1.0f));
    deviationRenderer.setSeriesPaint(0, StatisticChartStyling.SAMPLE_DATA_PAINT);
    deviationRenderer.setSeriesFillPaint(0, StatisticChartStyling.SAMPLE_DATA_FILL_PAINT);

    pointRenderer = new XYErrorRenderer();
    pointRenderer.setUseFillPaint(true);
    pointRenderer.setBaseToolTipGenerator(new XYPlotToolTipGenerator());
    pointRenderer.setSeriesLinesVisible(0, false);
    pointRenderer.setSeriesShapesVisible(0, true);
    pointRenderer.setSeriesStroke(0, new BasicStroke(1.0f));
    pointRenderer.setSeriesPaint(0, StatisticChartStyling.SAMPLE_DATA_PAINT);
    pointRenderer.setSeriesFillPaint(0, StatisticChartStyling.SAMPLE_DATA_FILL_PAINT);
    pointRenderer.setSeriesShape(0, StatisticChartStyling.SAMPLE_DATA_POINT_SHAPE);

    configureRendererForCorrelativeData(deviationRenderer);
    configureRendererForCorrelativeData(pointRenderer);

    plot.setNoDataMessage(NO_DATA_MESSAGE);
    plot.setAxisOffset(new RectangleInsets(5, 5, 5, 5));
    plot.setRenderer(deviationRenderer);

    final AxisChangeListener axisListener = new AxisChangeListener() {
        @Override
        public void axisChanged(AxisChangeEvent event) {
            adjustAxisControlComponents();
        }
    };

    final ValueAxis domainAxis = plot.getDomainAxis();
    final ValueAxis rangeAxis = plot.getRangeAxis();
    // allow transfer from bounds into min/max fields, if auto min/maxis enabled
    domainAxis.setAutoRange(true);
    rangeAxis.setAutoRange(true);

    domainAxis.addChangeListener(axisListener);
    rangeAxis.addChangeListener(axisListener);

    intervalMarkers = new HashSet<>();

    xAxisRangeControl = new AxisRangeControl("X-Axis");
    yAxisRangeControl = new AxisRangeControl("Y-Axis");

    final PropertyChangeListener changeListener = new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            if (evt.getPropertyName().equals(PROPERTY_NAME_MARK_SEGMENTS)) {
                updateDataSet();
            }
            if (evt.getPropertyName().equals(PROPERTY_NAME_LOG_SCALED)) {
                updateScalingOfYAxis();
            }
            updateUIState();
        }
    };
    xAxisRangeControl.getBindingContext().addPropertyChangeListener(changeListener);
    xAxisRangeControl.getBindingContext().getPropertySet().addProperty(Property.create(PROPERTY_NAME_MARK_SEGMENTS, false));
    xAxisRangeControl.getBindingContext().getPropertySet().getDescriptor(PROPERTY_NAME_MARK_SEGMENTS).setDescription("Toggle whether to mark segments");

    yAxisRangeControl.getBindingContext().addPropertyChangeListener(changeListener);
    yAxisRangeControl.getBindingContext().getPropertySet().addProperty(Property.create(PROPERTY_NAME_LOG_SCALED, false));
    yAxisRangeControl.getBindingContext().getPropertySet().getDescriptor(PROPERTY_NAME_LOG_SCALED).setDescription("Toggle whether to use a logarithmic axis");

    dataSourceConfig = new DataSourceConfig();
    final BindingContext bindingContext = new BindingContext(PropertyContainer.createObjectBacked(dataSourceConfig));

    JPanel middlePanel = createMiddlePanel(bindingContext);
    createUI(createChartPanel(chart), middlePanel, new RoiMaskSelector(bindingContext));

    isInitialized = true;

    updateComponents();
}
 
Example #29
Source File: jKali_0032_t.java    From coming with MIT License 2 votes vote down vote up
/**
 * Registers an object for notification of changes to the axis.
 *
 * @param listener  the object that is being registered.
 * 
 * @see #removeChangeListener(AxisChangeListener)
 */
public void addChangeListener(AxisChangeListener listener) {
    this.listenerList.add(AxisChangeListener.class, listener);
}
 
Example #30
Source File: Chart_26_Axis_t.java    From coming with MIT License 2 votes vote down vote up
/**
 * Registers an object for notification of changes to the axis.
 *
 * @param listener  the object that is being registered.
 * 
 * @see #removeChangeListener(AxisChangeListener)
 */
public void addChangeListener(AxisChangeListener listener) {
    this.listenerList.add(AxisChangeListener.class, listener);
}