Package com.tagtraum.perf.gcviewer

Examples of com.tagtraum.perf.gcviewer.ChartPanelView


        }

    public void actionPerformed(final ActionEvent e) {
        final GCDocument gcDocument = gcViewer.getSelectedGCDocument();
        for (int i=0; i<gcDocument.getChartPanelViewCount(); i++) {
            final ChartPanelView chartPanelView = gcDocument.getChartPanelView(i);
            final File file = new File(chartPanelView.getModel().getURL().getFile());
            saveDialog.setCurrentDirectory(file.getParentFile());
            saveDialog.setSelectedFile(file);
            final int val = saveDialog.showSaveDialog(gcViewer);
            if (val == JFileChooser.APPROVE_OPTION) {
                ExtensionFileFilter fileFilter = (ExtensionFileFilter) saveDialog.getFileFilter();
                // On OS/X if you don't select one of the filters and just press "Save" the filter may be null. Use the CSV one then
                if (fileFilter==null) {
                    fileFilter = (ExtensionFileFilter) saveDialog.getChoosableFileFilters()[0];
                }
                exportFile(chartPanelView.getModel(), saveDialog.getSelectedFile(), fileFilter.getExtension(),
                    fileFilter.getDataWriterType());
            }
            else if (val == JFileChooser.ERROR_OPTION) {
                JOptionPane.showMessageDialog(gcViewer, LocalisationHelper.getString("fileexport_dialog_error_occured"), LocalisationHelper.getString("fileexport_dialog_write_file_failed"), JOptionPane.ERROR_MESSAGE);
            }
View Full Code Here

TOP

Related Classes of com.tagtraum.perf.gcviewer.ChartPanelView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.