/** * Handles a change to an overlay by repainting the panel. * * @param event the event. * * @since 1.0.13 */ @Override public void overlayChanged(OverlayChangeEvent event) { repaint(); }
/** * Handles a change to an overlay by repainting the panel. * * @param event the event. * * @since 1.0.13 */ public void overlayChanged(OverlayChangeEvent event) { repaint(); }
/** * Sets the location at which the temperature value is displayed. * * @param loc the location. */ public void setValueLocation(int loc) { this.plot.setValueLocation(loc); this.panel.repaint(); }
@Override public void actionPerformed(ActionEvent e) { chartPanel.restoreAutoBounds(); chartPanel.repaint(); } });
/** * Add an overlay to the panel. * * @param overlay the overlay (<code>null</code> not permitted). * * @since 1.0.13 */ public void addOverlay(Overlay overlay) { if (overlay == null) { throw new IllegalArgumentException("Null 'overlay' argument."); } this.overlays.add(overlay); overlay.addChangeListener(this); repaint(); }
/** * Removes an overlay from the panel. * * @param overlay the overlay to remove (<code>null</code> not permitted). * * @since 1.0.13 */ public void removeOverlay(Overlay overlay) { if (overlay == null) { throw new IllegalArgumentException("Null 'overlay' argument."); } boolean removed = this.overlays.remove(overlay); if (removed) { overlay.removeChangeListener(this); repaint(); } }
private void adaptChartPanelSizeToScrollSize() { chartPanel.setPreferredSize(new Dimension(0, 0));//Let the chartPanel adjust to scroll pane current size. chartPanel.revalidate(); chartPanel.repaint(); }
/** * Add an overlay to the panel. * * @param overlay the overlay ({@code null} not permitted). * * @since 1.0.13 */ public void addOverlay(Overlay overlay) { Args.nullNotPermitted(overlay, "overlay"); this.overlays.add(overlay); overlay.addChangeListener(this); repaint(); }
private void recreateChart() { chartHandler.updateData(); chartHandler.updateChart(); chartPanel.repaint(); updateUIState(); }
/** * Removes an overlay from the panel. * * @param overlay the overlay to remove ({@code null} not permitted). * * @since 1.0.13 */ public void removeOverlay(Overlay overlay) { Args.nullNotPermitted(overlay, "overlay"); boolean removed = this.overlays.remove(overlay); if (removed) { overlay.removeChangeListener(this); repaint(); } }
void updateChart() { maybeShowTip(); chartHandler.updateChart(); chartPanel.repaint(); }
void updateChart() { maybeShowTip(); chartHandler.updateChart(); chartPanel.repaint(); }
private void recreateChart() { chartHandler.updateData(); chartHandler.updateChart(); chartPanel.repaint(); updateUIState(); }
/** * 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(); }
/** * 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(); }
private void applyZoom(float multiplier) { int width = (int) (chartPanel.getSize().width * multiplier); int heigth = (int) (chartPanel.getSize().height * multiplier); width= width > MAX_DIMENSION ? MAX_DIMENSION : width; heigth= heigth > MAX_DIMENSION ? MAX_DIMENSION : heigth; chartPanel.setPreferredSize(new Dimension(width,heigth)); chartPanel.revalidate(); chartPanel.repaint(); }
public void clearChart() { if (!lock) { this.chart = chartData.makeChart(); this.chart.setBackgroundPaint(this.background); this.chart.setBorderPaint(null); if (output != null) { JFreeChart newChart = new JFreeChart(chart.getPlot()); newChart.getLegend().setPosition(RectangleEdge.TOP); newChart.getLegend().setPadding(5, 5, 5, 5); newChart.setBackgroundPaint(background); output.setChart(newChart); output.invalidate(); output.repaint(); } } }
public void updateDomain(String title, int seriesNum, Color background) { if (!lock) { this.chart = chartData.makeChart(); this.background = background == null ? DEFAULT_BACKGROUND : background; this.chart.setBackgroundPaint(this.background); this.chart.setBorderPaint(null); if (output != null) { JFreeChart newChart = new JFreeChart(chart.getPlot()); newChart.getLegend().setPosition(RectangleEdge.TOP); newChart.getLegend().setPadding(5, 5, 5, 5); newChart.setBackgroundPaint(background); output.setChart(newChart); output.invalidate(); output.repaint(); } } }
public void clearChart() { if (!lock) { this.chart = chartData.makeChart(); this.chart.setBackgroundPaint(this.background); this.chart.setBorderPaint(null); if (output != null) { JFreeChart newChart = new JFreeChart(chart.getPlot()); newChart.getLegend().setPosition(RectangleEdge.TOP); newChart.getLegend().setPadding(5, 5, 5, 5); newChart.setBackgroundPaint(background); output.setChart(newChart); output.invalidate(); output.repaint(); } } }