Search in sources :

Example 1 with ExportGraphicsDialog

use of com.compomics.util.gui.export.graphics.ExportGraphicsDialog in project peptide-shaker by compomics.

the class SpectrumIdentificationPanel method uniquePsmsMenuItemActionPerformed.

// GEN-LAST:event_numberPsmsPlotMenuItemActionPerformed
/**
 * Export the unique PMS plot.
 *
 * @param evt
 */
private void uniquePsmsMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_uniquePsmsMenuItemActionPerformed
    ChartPanel tempChartPanel = new ChartPanel(uniquePsmsPlot.getChart());
    tempChartPanel.setBounds(new Rectangle(uniquePsmsPlot.getBounds().width * 2, uniquePsmsPlot.getBounds().height * 2));
    new ExportGraphicsDialog(peptideShakerGUI, peptideShakerGUI.getNormalIcon(), peptideShakerGUI.getWaitingIcon(), true, tempChartPanel, peptideShakerGUI.getLastSelectedFolder());
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) Rectangle(java.awt.Rectangle) ExportGraphicsDialog(com.compomics.util.gui.export.graphics.ExportGraphicsDialog)

Example 2 with ExportGraphicsDialog

use of com.compomics.util.gui.export.graphics.ExportGraphicsDialog in project peptide-shaker by compomics.

the class SpectrumIdentificationPanel method numberPsmsPlotMenuItemActionPerformed.

// GEN-LAST:event_spectrumSelectionPanelMouseMoved
/**
 * Export the number of PMS plot.
 *
 * @param evt
 */
private void numberPsmsPlotMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
    // GEN-FIRST:event_numberPsmsPlotMenuItemActionPerformed
    ChartPanel tempChartPanel = new ChartPanel(numberPsmsPlot.getChart());
    tempChartPanel.setBounds(new Rectangle(numberPsmsPlot.getBounds().width * 2, numberPsmsPlot.getBounds().height * 2));
    new ExportGraphicsDialog(peptideShakerGUI, peptideShakerGUI.getNormalIcon(), peptideShakerGUI.getWaitingIcon(), true, tempChartPanel, peptideShakerGUI.getLastSelectedFolder());
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) Rectangle(java.awt.Rectangle) ExportGraphicsDialog(com.compomics.util.gui.export.graphics.ExportGraphicsDialog)

Example 3 with ExportGraphicsDialog

use of com.compomics.util.gui.export.graphics.ExportGraphicsDialog in project peptide-shaker by compomics.

the class ModificationsPanel method exportRelatedPeptideProfileJButtonMouseReleased.

// GEN-LAST:event_exportSpectrumJButtonMouseReleased
/**
 * Export the table contents.
 *
 * @param evt
 */
private void exportRelatedPeptideProfileJButtonMouseReleased(java.awt.event.MouseEvent evt) {
    // GEN-FIRST:event_exportRelatedPeptideProfileJButtonMouseReleased
    JPopupMenu popupMenu = new JPopupMenu();
    JMenuItem menuItem = new JMenuItem("Table to File");
    menuItem.addActionListener(new java.awt.event.ActionListener() {

        public void actionPerformed(java.awt.event.ActionEvent evt) {
            copyTableContentToFileOrClipboard(TableIndex.RELATED_PEPTIDES_TABLE);
        }
    });
    popupMenu.add(menuItem);
    if (modificationProfileRelatedPeptideJPanel.getComponentCount() == 2) {
        menuItem = new JMenuItem("Modification Profile Plot");
        menuItem.addActionListener(new java.awt.event.ActionListener() {

            public void actionPerformed(java.awt.event.ActionEvent evt) {
                new ExportGraphicsDialog(peptideShakerGUI, peptideShakerGUI.getNormalIcon(), peptideShakerGUI.getWaitingIcon(), true, modificationProfileRelatedPeptideJPanel.getComponent(1), peptideShakerGUI.getLastSelectedFolder());
            }
        });
        popupMenu.add(menuItem);
    }
    popupMenu.show(exportRelatedPeptideProfileJButton, evt.getX(), evt.getY());
}
Also used : ExportGraphicsDialog(com.compomics.util.gui.export.graphics.ExportGraphicsDialog)

Example 4 with ExportGraphicsDialog

use of com.compomics.util.gui.export.graphics.ExportGraphicsDialog in project peptide-shaker by compomics.

the class PeptideShakerGUI method exportMassErrorPlotAsFigure.

/**
 * Export the current mass error plot as a figure.
 */
public void exportMassErrorPlotAsFigure() {
    int selectedTabIndex = allTabsJTabbedPane.getSelectedIndex();
    if (selectedTabIndex == OVER_VIEW_TAB_INDEX) {
        if (overviewPanel.getMassErrorPlot() != null) {
            ChartPanel chartPanel = overviewPanel.getMassErrorPlot().getChartPanel();
            ChartPanel tempChartPanel = new ChartPanel(chartPanel.getChart());
            tempChartPanel.setBounds(new Rectangle(chartPanel.getBounds().width * 5, chartPanel.getBounds().height * 5));
            new ExportGraphicsDialog(this, getNormalIcon(), getWaitingIcon(), true, tempChartPanel, lastSelectedFolder);
        } else {
            JOptionPane.showMessageDialog(this, "No m/z error plot to export!", "Export Error", JOptionPane.INFORMATION_MESSAGE);
        }
    }
// else if (selectedTabIndex == SPECTRUM_ID_TAB_INDEX) {
// new ExportGraphicsDialog(this, true, (Component) spectrumIdentificationPanel.getSpectrum());
// } else if (selectedTabIndex == MODIFICATIONS_TAB_INDEX) {
// new ExportGraphicsDialog(this, true, (Component) ptmPanel.getSpectrum());
// }
// @TODO: add export support for the other tabs
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) ExportGraphicsDialog(com.compomics.util.gui.export.graphics.ExportGraphicsDialog)

Example 5 with ExportGraphicsDialog

use of com.compomics.util.gui.export.graphics.ExportGraphicsDialog in project peptide-shaker by compomics.

the class PeptideShakerGUI method exportIntensityHistogramAsFigure.

/**
 * Export the current intensity histogram as a figure.
 */
public void exportIntensityHistogramAsFigure() {
    int selectedTabIndex = allTabsJTabbedPane.getSelectedIndex();
    if (selectedTabIndex == OVER_VIEW_TAB_INDEX) {
        ChartPanel chartPanel = overviewPanel.getIntensityHistogramPlot().getChartPanel();
        ChartPanel tempChartPanel = new ChartPanel(chartPanel.getChart());
        tempChartPanel.setBounds(new Rectangle(chartPanel.getBounds().width * 5, chartPanel.getBounds().height * 5));
        new ExportGraphicsDialog(this, getNormalIcon(), getWaitingIcon(), true, tempChartPanel, lastSelectedFolder);
    }
// else if (selectedTabIndex == SPECTRUM_ID_TAB_INDEX) {
// new ExportGraphicsDialog(this, true, (Component) spectrumIdentificationPanel.getSpectrum());
// } else if (selectedTabIndex == MODIFICATIONS_TAB_INDEX) {
// new ExportGraphicsDialog(this, true, (Component) ptmPanel.getSpectrum());
// }
// @TODO: add export support for the other tabs
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) ExportGraphicsDialog(com.compomics.util.gui.export.graphics.ExportGraphicsDialog)

Aggregations

ExportGraphicsDialog (com.compomics.util.gui.export.graphics.ExportGraphicsDialog)9 ChartPanel (org.jfree.chart.ChartPanel)7 Rectangle (java.awt.Rectangle)4 ProgressDialogX (com.compomics.util.gui.waiting.waitinghandlers.ProgressDialogX)1 ValueAndBooleanDataPoint (no.uib.jsparklines.data.ValueAndBooleanDataPoint)1 XYDataPoint (no.uib.jsparklines.data.XYDataPoint)1