Package com.mucommander

Examples of com.mucommander.VersionChecker


        Container contentPane = getContentPane();
        contentPane.setLayout(new BorderLayout());
       
        String         message;
        String         title;
        VersionChecker version;
        URL            downloadURL = null;
        boolean        downloadOption = false;
        String         jarURL = null;

        try {
            LOGGER.debug("Checking for new version...");

            version = VersionChecker.getInstance();
            // A newer version is available
            if(version.isNewVersionAvailable()) {
                LOGGER.info("A new version is available!");

                title = Translator.get("version_dialog.new_version_title");

                // Checks if the current platform can open a new browser window
                downloadURL    = new URL(version.getDownloadURL());
                downloadOption = DesktopManager.isOperationSupported(DesktopManager.BROWSE, new Object[] {downloadURL});
               
                // If the platform is not capable of opening a new browser window,
                // display the download URL.
                if(downloadOption) {
                    message = Translator.get("version_dialog.new_version");
                }
                else {
                    message = Translator.get("version_dialog.new_version_url", downloadURL.toString());
                }

                jarURL = version.getJarURL();
            }
            // We're already running latest version
            else {
                LOGGER.debug("No new version.");
View Full Code Here

TOP

Related Classes of com.mucommander.VersionChecker

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.