private ChartChangeListener getChartChangeListner() { return new ChartChangeListener() { @Override public void chartChanged(ChartChangeEvent event) { // Is weird. This works well for zoom-in. When we add new CCI or // RIS. This event function will be triggered too. However, the // returned draw area will always be the old draw area, unless // you move your move over. // Even I try to capture event.getType() == ChartChangeEventType.NEW_DATASET // also doesn't work. if (event.getType() == ChartChangeEventType.GENERAL) { ChartJDialog.this.chartLayerUI.updateTraceInfos(); // Re-calculating high low value. ChartJDialog.this.updateHighLowJLabels(); } } }; }
/** * Receives notification of changes to the chart (or any of its components), * and redraws the chart. * * @param event */ public void chartChanged( ChartChangeEvent event ) { /* * Do not look at event.getSource(), since the source of the event is * likely to be one of the chart's components rather than the chart itself. */ if ( event.getType() == ChartChangeEventType.DATASET_UPDATED ) { repaint(); } else if ( event.getType() == ChartChangeEventType.NEW_DATASET ) { repaint(); } else { updateAll(); } }
/** * Receives notification of changes to the chart, and redraws the chart. * * @param event * details of the chart change event. */ @Override public void chartChanged(ChartChangeEvent event) { Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.orientation = z.getOrientation(); } repaint(); }
/** * Sets a flag that controls whether or not listeners receive {@link ChartChangeEvent} * notifications. * * @param notify a boolean. */ public void setNotify(boolean notify) { this.notify = notify; // if the flag is being set to true, there may be queued up changes... if (notify) { notifyListeners(new ChartChangeEvent(this)); } }
/** * Sends a {@link ChartChangeEvent} to all registered listeners. * * @param event information about the event that triggered the notification. */ protected void notifyListeners(ChartChangeEvent event) { if (this.notify) { Object[] listeners = this.changeListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartChangeListener.class) { ((ChartChangeListener) listeners[i + 1]).chartChanged(event); } } } }
/** * Receives notification of changes to the chart, and redraws the chart. * * @param event details of the chart change event. */ public void chartChanged(ChartChangeEvent event) { this.refreshBuffer = true; Plot plot = chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.orientation = z.getOrientation(); } this.redraw(); }
/** * Receives notification of changes to the chart, and redraws the chart. * * @param event details of the chart change event. */ public void chartChanged(ChartChangeEvent event) { this.refreshBuffer = true; Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.orientation = z.getOrientation(); } repaint(); }
/** * Sends a {@link ChartChangeEvent} to all registered listeners. * * @param event information about the event that triggered the * notification. */ protected void notifyListeners(ChartChangeEvent event) { if (this.notify) { Object[] listeners = this.changeListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartChangeListener.class) { ((ChartChangeListener) listeners[i + 1]).chartChanged( event); } } } }
/** * Receives notification of changes to the chart, and redraws the chart. * * @param event details of the chart change event. */ public void chartChanged(ChartChangeEvent event) { this.refreshBuffer = true; Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.orientation = z.getOrientation(); } this.canvas.redraw(); }
/** * Receives notification of changes to the chart, and redraws the chart. * * @param event details of the chart change event. */ @Override public void chartChanged(ChartChangeEvent event) { this.refreshBuffer = true; Plot plot = this.chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.orientation = z.getOrientation(); } repaint(); }
@Override public void chartChanged(ChartChangeEvent e) { try { zoomRangeBounds = e.getChart().getXYPlot().getRangeAxis().getRange(); zoomDomainBounds = e.getChart().getXYPlot().getDomainAxis().getRange(); useZoomBounds.setSelected(true); } catch (Exception e1) { e1.printStackTrace(); } }
@Override public void chartChanged(ChartChangeEvent event) { JFreeChart chart = event.getChart(); if (chart != null) { renderToSvg(chart); } }
/** * Receives notification of changes to the chart, and redraws the chart. * * @param event details of the chart change event. */ public void chartChanged(ChartChangeEvent event) { this.refreshBuffer = true; Plot plot = chart.getPlot(); if (plot instanceof Zoomable) { Zoomable z = (Zoomable) plot; this.orientation = z.getOrientation(); } repaint(); }
/** * Sets the padding between the chart border and the chart drawing area, * and sends a {@link ChartChangeEvent} to all registered listeners. * * @param padding the padding (<code>null</code> not permitted). */ public void setPadding(RectangleInsets padding) { if (padding == null) { throw new IllegalArgumentException("Null 'padding' argument."); } this.padding = padding; notifyListeners(new ChartChangeEvent(this)); }
/** * Sets a flag that controls whether or not listeners receive * {@link ChartChangeEvent} notifications. * * @param notify a boolean. */ public void setNotify(boolean notify) { this.notify = notify; // if the flag is being set to true, there may be queued up changes... if (notify) { notifyListeners(new ChartChangeEvent(this)); } }
/** * Sets a flag that controls whether or not listeners receive {@link ChartChangeEvent} notifications. * * @param notify a boolean. * @see #isNotify() */ public void setNotify(boolean notify) { this.notify = notify; // if the flag is being set to true, there may be queued up changes... if (notify) { notifyListeners(new ChartChangeEvent(this)); } }