当前位置: 首页>>代码示例>>Java>>正文


Java ChartProgressEvent.getType方法代码示例

本文整理汇总了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());
		}
	}
}
 
开发者ID:MyersResearchGroup,项目名称:iBioSim,代码行数:28,代码来源:Graph.java

示例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"));
    }
}
   }
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:21,代码来源:TICPlot.java

示例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"));
    }
}

   }
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:20,代码来源:NeutralLossPlot.java

示例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;
  }
 
开发者ID:GrammarViz2,项目名称:grammarviz2_src,代码行数:24,代码来源:GrammarvizChartPanel.java

示例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;
    }
}
 
开发者ID:vimerzhao,项目名称:gchisto,代码行数:11,代码来源:ChartLocker.java

示例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);
    }
}
 
开发者ID:mzmine,项目名称:mzmine2,代码行数:17,代码来源:ScatterPlotChart.java

示例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));
           }
	}
}
 
开发者ID:objektwerks,项目名称:swing,代码行数:14,代码来源:TimeSeriesChartPanel.java

示例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);
    }
}
 
开发者ID:dhmay,项目名称:msInspect,代码行数:15,代码来源:CrosshairChangeListener.java

示例9: chartProgress

import org.jfree.chart.event.ChartProgressEvent; //导入方法依赖的package包/类
public void chartProgress(ChartProgressEvent event) {
	if (event.getType() == ChartProgressEvent.DRAWING_FINISHED && !tableLoaded){
		loadTable();
		refreshChart();
	}
}
 
开发者ID:DiegoArranzGarcia,项目名称:JavaTracer,代码行数:7,代码来源:ProfilerView.java


注:本文中的org.jfree.chart.event.ChartProgressEvent.getType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。