本文整理汇总了Java中org.jfree.chart.event.ChartProgressEvent.getType方法的典型用法代码示例。如果您正苦于以下问题:Java ChartProgressEvent.getType方法的具体用法?Java ChartProgressEvent.getType怎么用?Java ChartProgressEvent.getType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jfree.chart.event.ChartProgressEvent
的用法示例。
在下文中一共展示了ChartProgressEvent.getType方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
/**
* 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());
}
}
}
示例2: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
@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"));
}
}
}
示例3: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
/**
* @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"));
}
}
}
示例4: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
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;
}
示例5: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
public void chartProgress(ChartProgressEvent event) {
switch (event.getType()) {
case ChartProgressEvent.DRAWING_STARTED:
lock();
break;
case ChartProgressEvent.DRAWING_FINISHED:
unlock();
break;
}
}
示例6: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
/**
* @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);
}
}
示例7: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
@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));
}
}
}
示例8: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
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);
}
}
示例9: chartProgress
import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
public void chartProgress(ChartProgressEvent event) {
if (event.getType() == ChartProgressEvent.DRAWING_FINISHED && !tableLoaded){
loadTable();
refreshChart();
}
}