org.jfree.chart.event.ChartProgressEvent Java Examples

The following examples show how to use org.jfree.chart.event.ChartProgressEvent. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GrammarvizChartPanel.java    From grammarviz2_src with GNU General Public License v2.0 6 votes vote down vote up
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;
  }
 
Example #2
Source File: TICPlot.java    From mzmine2 with GNU General Public License v2.0 6 votes vote down vote up
@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"));
    }
  }
}
 
Example #3
Source File: ProductIonFilterPlot.java    From mzmine2 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @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"));
    }
  }

}
 
Example #4
Source File: NeutralLossPlot.java    From mzmine2 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * @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"));
    }
  }

}
 
Example #5
Source File: Cardumen_003_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #6
Source File: JGenProg2017_00104_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #7
Source File: JGenProg2017_00106_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #8
Source File: JGenProg2017_00106_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #9
Source File: JGenProg2017_00104_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #10
Source File: JGenProg2017_003_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #11
Source File: JGenProg2017_003_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #12
Source File: JGenProg2017_00127_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #13
Source File: JGenProg2017_00127_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #14
Source File: JGenProg2015_000_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #15
Source File: JGenProg2015_000_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #16
Source File: jKali_0052_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #17
Source File: jKali_0052_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #18
Source File: JFreeChart.java    From ECG-Viewer with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #19
Source File: JFreeChart.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #20
Source File: JFreeChart.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #21
Source File: JFreeChart.java    From opensim-gui with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #22
Source File: JFreeChart.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #23
Source File: JFreeChart.java    From buffer_bci with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #24
Source File: Cardumen_00193_s.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #25
Source File: JFreeChart.java    From ccu-historian with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #26
Source File: ScatterPlotChart.java    From mzmine3 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @see org.jfree.chart.event.ChartProgressListener#chartProgress(org.jfree.chart.event.ChartProgressEvent)
 */
// @Override
public void chartProgress(ChartProgressEvent 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);
  }
}
 
Example #27
Source File: JFreeChart.java    From openstock with GNU General Public License v3.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #28
Source File: JFreeChart.java    From SIMVA-SoS with Apache License 2.0 5 votes vote down vote up
/**
 * 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);
        }
    }

}
 
Example #29
Source File: ScatterPlotChart.java    From mzmine2 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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);
  }
}
 
Example #30
Source File: Cardumen_00193_t.java    From coming with MIT License 5 votes vote down vote up
/**
 * 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);
        }
    }

}