/** * After the chart is redrawn, this method calculates the x and y scale and * updates those text fields. */ @Override public void chartProgress(ChartProgressEvent e) { // if the chart drawing is started if (e.getType() == ChartProgressEvent.DRAWING_STARTED) { this.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); } // if the chart drawing is finished else if (e.getType() == ChartProgressEvent.DRAWING_FINISHED) { this.setCursor(null); JFreeChart chart = e.getChart(); if (graphData.isTimeSeriesPlot()) { XYPlot plot = chart.getXYPlot(); NumberAxis axis = (NumberAxis) plot.getRangeAxis(); YMin.setText("" + axis.getLowerBound()); YMax.setText("" + axis.getUpperBound()); YScale.setText("" + axis.getTickUnit().getSize()); axis = (NumberAxis) plot.getDomainAxis(); XMin.setText("" + axis.getLowerBound()); XMax.setText("" + axis.getUpperBound()); XScale.setText("" + axis.getTickUnit().getSize()); } } }
@Override public void chartProgress(final ChartProgressEvent event) { super.chartProgress(event); if (event.getType() == ChartProgressEvent.DRAWING_FINISHED) { if (visualizer instanceof TICVisualizerWindow) { ((TICVisualizerWindow) visualizer).updateTitle(); } if (showSpectrumRequest) { showSpectrumRequest = false; visualizer.actionPerformed(new ActionEvent(event.getSource(), ActionEvent.ACTION_PERFORMED, "SHOW_SPECTRUM")); } } }
/** * @see org.jfree.chart.event.ChartProgressListener#chartProgress(org.jfree.chart.event.ChartProgressEvent) */ public void chartProgress(ChartProgressEvent event) { super.chartProgress(event); if (event.getType() == ChartProgressEvent.DRAWING_FINISHED) { visualizer.updateTitle(); if (showSpectrumRequest) { showSpectrumRequest = false; visualizer.actionPerformed(new ActionEvent(event.getSource(), ActionEvent.ACTION_PERFORMED, "SHOW_SPECTRUM")); } } }
public void chartProgress(ChartProgressEvent chartprogressevent) { if (chartprogressevent.getType() != 2) return; XYPlot xyplot = (XYPlot) chart.getPlot(); double pos = xyplot.getDomainCrosshairValue(); // this is needed because the call of highlightPatternInChart triggers a ChartProgessEvent if (previousClickPosition == pos) { return; } // SAXString sax = new SAXString(this.session.chartData.getFreqData(), " "); // String rule = sax.getRuleFromPosition(this.session.chartData, (int) pos); // if (rule != null) { // firePropertyChange(SequiturMessage.MAIN_CHART_CLICKED_MESSAGE, "", rule); // System.out.println("Clicked Property Change fired with rule: " + rule); // } previousClickPosition = pos; }
public void chartProgress(ChartProgressEvent event) { switch (event.getType()) { case ChartProgressEvent.DRAWING_STARTED: lock(); break; case ChartProgressEvent.DRAWING_FINISHED: unlock(); break; } }
/** * Sends a {@link ChartProgressEvent} to all registered listeners. * * @param event information about the event that triggered the notification. */ protected void notifyListeners(ChartProgressEvent event) { Object[] listeners = this.progressListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartProgressListener.class) { ((ChartProgressListener) listeners[i + 1]).chartProgress(event); } } }
/** * Sends a {@link ChartProgressEvent} to all registered listeners. * * @param event information about the event that triggered the * notification. */ protected void notifyListeners(ChartProgressEvent event) { Object[] listeners = this.progressListeners.getListenerList(); for (int i = listeners.length - 2; i >= 0; i -= 2) { if (listeners[i] == ChartProgressListener.class) { ((ChartProgressListener) listeners[i + 1]).chartProgress(event); } } }
/** * @see org.jfree.chart.event.ChartProgressListener#chartProgress(org.jfree.chart.event.ChartProgressEvent) */ @Override public void chartProgress(ChartProgressEvent event) { super.chartProgress(event); // Whenever chart is repainted (e.g. after crosshair position changed), // we update the selected item name if (event.getType() == ChartProgressEvent.DRAWING_FINISHED) { double valueX = plot.getDomainCrosshairValue(); double valueY = plot.getRangeCrosshairValue(); PeakListRow selectedRow = mainDataSet.getRow(valueX, valueY); topPanel.updateItemNameText(selectedRow); } }
@Override public void chartProgress(ChartProgressEvent event) { JFreeChart chart = event.getChart(); if ((event.getType() == ChartProgressEvent.DRAWING_FINISHED) && (chart != null)) { SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd"); Date timeSeriesSliderDate = DateCalculator.calculateDateSince1960((short) slider.getValue()); XYPlot xyPlot = chart.getXYPlot(); Date domainCrosshairDate = new Date((long) xyPlot.getDomainCrosshairValue()); if (!formatter.format(domainCrosshairDate).equals(formatter.format(timeSeriesSliderDate))) { slider.setValue(DateCalculator.calculateDaysSince1960(domainCrosshairDate)); } } }
public void chartProgress(ChartProgressEvent event) { if (event.getType() != ChartProgressEvent.DRAWING_FINISHED) return; double newDomainValue = event.getChart().getXYPlot().getDomainCrosshairValue(); double newRangeValue = event.getChart().getXYPlot().getRangeCrosshairValue(); if (domainValue != newDomainValue || rangeValue != newRangeValue) { domainValue = newDomainValue; rangeValue = newRangeValue; crosshairValueChanged(event); } }
@Override public void chartProgress(ChartProgressEvent event) { if (event.getPercent() == 100) { resizeTransferFunctionEditors(); } }
public void chartProgress(ChartProgressEvent event) { if (event.getType() == ChartProgressEvent.DRAWING_FINISHED && !tableLoaded){ loadTable(); refreshChart(); } }
/** * Receives notification of a chart progress event. * * @param event * the event. */ @Override public void chartProgress(ChartProgressEvent event) { // does nothing - override if necessary }
/** * Receives notification of a chart progress event. * * @param event the event. */ public void chartProgress(ChartProgressEvent event) { // does nothing - override if necessary }
/** * Receives notification of a chart progress event. * * @param event the event. */ @Override public void chartProgress(ChartProgressEvent event) { // does nothing - override if necessary }