Package eu.isas.peptideshaker.gui.pride

Examples of eu.isas.peptideshaker.gui.pride.PrideReshakeGUI


                        boolean canceled = searchGuiSetupDialog.isDialogCanceled();

                        if (!canceled) {
                            setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
                            setVisible(false);
                            new PrideReshakeGUI(peptideShakerGUI);
                            setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
                        }
                    } catch (Exception e) {
                        e.printStackTrace();
                    }
                } else {

                    // check the searchgui version
                    boolean newVersion = checkForNewSearchGUIVersion(peptideShakerGUI.getUtilitiesUserPreferences().getSearchGuiPath());
                    boolean openReshake = true;

                    if (newVersion) {
                        int option = JOptionPane.showConfirmDialog(null,
                                "A newer version of SearchGUI is available.\n"
                                + "Do you want to update?",
                                "Update Available",
                                JOptionPane.YES_NO_CANCEL_OPTION);
                        if (option == JOptionPane.YES_OPTION) {
                            boolean success = downloadSearchGUI();

                            if (success) {
                                peptideShakerGUI.setUtilitiesUserPreferences(UtilitiesUserPreferences.loadUserPreferences());
                            } else {
                                openReshake = false;
                            }
                        } else if (option == JOptionPane.CANCEL_OPTION || option == JOptionPane.CLOSED_OPTION) {
                            openReshake = false;
                        }
                    }

                    if (openReshake) {
                        setCursor(new java.awt.Cursor(java.awt.Cursor.WAIT_CURSOR));
                        setVisible(false);
                        new PrideReshakeGUI(peptideShakerGUI);
                        setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
                    }
                }
            }
        }, "Reshake").start();
View Full Code Here

TOP

Related Classes of eu.isas.peptideshaker.gui.pride.PrideReshakeGUI

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.