List of usage examples for org.jfree.chart.event ChartProgressEvent DRAWING_STARTED
int DRAWING_STARTED
To view the source code for org.jfree.chart.event ChartProgressEvent DRAWING_STARTED.
Click Source Link
From source file:gchisto.jfreechart.extensions.ChartLocker.java
public void chartProgress(ChartProgressEvent event) { switch (event.getType()) { case ChartProgressEvent.DRAWING_STARTED: lock();// w ww . jav a 2s .c om break; case ChartProgressEvent.DRAWING_FINISHED: unlock(); break; } }
From source file:ste.travian.gui.WorldChartPanel.java
@Override public void chartProgress(ChartProgressEvent event) { if (event.getType() == ChartProgressEvent.DRAWING_STARTED) { mainWindow.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); } else {//from w w w .j a v a 2s . c o m mainWindow.setCursor(Cursor.getDefaultCursor()); } }
From source file:com.intel.stl.ui.main.view.HealthHistoryView.java
public void setDataset(final IntervalXYDataset dataset) { JFreeChart chart = ComponentFactory.createStepAreaChart(dataset, new XYItemLabelGenerator() { @Override//from ww w. ja v a 2 s.com public String generateLabel(XYDataset dataset, int series, int item) { Number val = dataset.getY(series, item); return UIConstants.INTEGER.format(val.intValue()); } }); chart.addProgressListener(new ChartProgressListener() { @Override public void chartProgress(ChartProgressEvent event) { if (event.getType() == ChartProgressEvent.DRAWING_STARTED && currentValue != null) { currentValue.setText(scoreString); currentValue.setPaint(scoreColor); currentValue.setToolTipText(scoreTip); } } }); XYPlot plot = chart.getXYPlot(); plot.getRangeAxis().setRange(0, 105); plot.getRenderer().setSeriesPaint(0, UIConstants.INTEL_BLUE); currentValue = new TextTitle(scoreString, scoreFont); currentValue.setPaint(scoreColor); currentValue.setToolTipText(scoreTip); // currentValue.setBackgroundPaint(new Color(255, 255, 255, 128)); currentValue.setPosition(RectangleEdge.BOTTOM); XYTitleAnnotation xytitleannotation = new XYTitleAnnotation(0.49999999999999998D, 0.49999999999999998D, currentValue, RectangleAnchor.CENTER); // xytitleannotation.setMaxWidth(0.47999999999999998D); plot.addAnnotation(xytitleannotation); chartPanel.setChart(chart); }