Package com.alee.managers.version

Examples of com.alee.managers.version.VersionInfo


            @Override
            public void actionPerformed ( final ActionEvent e )
            {
                try
                {
                    final VersionInfo lv = getLastVersion ();
                    if ( lv != null && lv.compareTo ( VersionManager.getLibraryVersion () ) > 0 )
                    {
                        // Displaying update icon
                        update.setVisible ( true );

                        // Updating tips
                        final ImageIcon updateIcon = getUpdateIcon ();

                        final WebCustomTooltip versionTip = TooltipManager
                                .showOneTimeTooltip ( update, null, updateIcon, "New library version available: " + lv.toString () );
                        update.addMouseListener ( new MouseAdapter ()
                        {
                            @Override
                            public void mouseEntered ( final MouseEvent e )
                            {
                                versionTip.closeTooltip ();
                                update.removeMouseListener ( this );
                            }
                        } );

                        TooltipManager.setTooltip ( update, updateIcon, "Download new version: " + lv.toString () );

                        // Finishing updater thread
                        ( ( WebTimer ) e.getSource () ).stop ();
                    }
                }
View Full Code Here


     *
     * @return library version panel
     */
    private WebPanel createLibraryVersionPanel ()
    {
        final VersionInfo versionInfo = VersionManager.getLibraryVersion ();

        final WebImage icon = new WebImage ( WebLookAndFeel.getIcon ( 32 ) );

        final WebLinkLabel version = new WebLinkLabel ( versionInfo.toString () );
        version.setLink ( "http://weblookandfeel.com", false );
        SwingUtils.setBoldFont ( version );

        final SimpleDateFormat sdf = new SimpleDateFormat ( "dd MMM yyyy", Locale.getDefault () );
        final WebLabel date = new WebLabel ();
        date.setLanguage ( "weblaf.info.general.updated", sdf.format ( new Date ( versionInfo.getDate () ) ) );

        return new GroupPanel ( 15, icon, new GroupPanel ( false, version, date ) );
    }
View Full Code Here

TOP

Related Classes of com.alee.managers.version.VersionInfo

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.