Package com.alee.utils.swing

Examples of com.alee.utils.swing.WebTimer


        theme.apply ( xmlEditor );

        // Start listening edits
        xmlEditor.onChange ( new DocumentEventRunnable ()
        {
            private final WebTimer updateTimer = new WebTimer ( updateDelay, new ActionListener ()
            {
                @Override
                public void actionPerformed ( final ActionEvent e )
                {
                    TimeUtils.pinTime ();
View Full Code Here


                {
                    visible = true;

                    if ( forceUpdater == null || listener == null )
                    {
                        forceUpdater = new WebTimer ( 200, new ActionListener ()
                        {
                            @Override
                            public void actionPerformed ( final ActionEvent e )
                            {
                                updateMagnifier ();
View Full Code Here

                animator.stop ();
            }
            if ( animate )
            {
                opacity = 0;
                animator = new WebTimer ( "ShadeLayer.fadeIn", StyleConstants.animationDelay, new ActionListener ()
                {
                    @Override
                    public void actionPerformed ( final ActionEvent e )
                    {
                        if ( opacity < 100 )
View Full Code Here

            {
                if ( filesCount == 0 && selectedFiles.size () > 0 )
                {
                    stopAnimator ();
                    filesCount = selectedFiles.size ();
                    animator = new WebTimer ( "WebFileDrop.textFadeOutTimer", StyleConstants.animationDelay, new ActionListener ()
                    {
                        @Override
                        public void actionPerformed ( final ActionEvent e )
                        {
                            if ( dropTextOpacity > 0f )
                            {
                                dropTextOpacity -= 0.1f;
                            }
                            dropTextOpacity = Math.max ( dropTextOpacity, 0f );
                            WebFileDrop.this.repaint ();
                            if ( dropTextOpacity <= 0f )
                            {
                                animator.stop ();
                            }
                        }
                    } );
                    animator.start ();
                }
                else if ( filesCount > 0 && selectedFiles.size () == 0 )
                {
                    stopAnimator ();
                    filesCount = selectedFiles.size ();
                    animator = new WebTimer ( "WebFileDrop.textFadeInTimer", StyleConstants.animationDelay, new ActionListener ()
                    {
                        @Override
                        public void actionPerformed ( final ActionEvent e )
                        {
                            if ( dropTextOpacity < 1f )
View Full Code Here

        {
            final int time = 100;
            final int steps = 10;
            final int xDiff = newBounds.width - b.width;
            final int yDiff = newBounds.height - b.height;
            final WebTimer t = new WebTimer ( time / steps, new ActionListener ()
            {
                private int step = 1;

                @Override
                public void actionPerformed ( final ActionEvent e )
                {
                    if ( step <= steps )
                    {
                        final int w = b.width + xDiff * step / steps;
                        final int h = b.height + yDiff * step / steps;
                        final Rectangle changed = new Rectangle ( b.x + b.width / 2 - w / 2, b.y + b.height / 2 - h / 2, w, h );
                        window.setBounds ( changed );
                    }
                    else
                    {
                        windowPackTimers.get ( window ).stop ();
                    }
                    step++;
                }
            } );
            windowPackTimers.put ( window, t );
            t.start ();
        }
        else
        {
            window.setBounds ( newBounds );
        }
View Full Code Here

                {
                    animator.stop ();
                }
                if ( animate )
                {
                    animator = new WebTimer ( "WebFilePlate.fadeInTimer", StyleConstants.animationDelay, new ActionListener ()
                    {
                        @Override
                        public void actionPerformed ( final ActionEvent e )
                        {
                            opacity += 0.1f;
View Full Code Here

        {
            animator.stop ();
        }
        if ( animate )
        {
            animator = new WebTimer ( "WebFilePlate.fadeOutTimer", StyleConstants.animationDelay, new ActionListener ()
            {
                @Override
                public void actionPerformed ( final ActionEvent e )
                {
                    opacity -= 0.1f;
View Full Code Here

        {
            reflectionMover.stop ();
        }

        progress = 0f;
        reflectionMover = new WebTimer ( "WebImageGallery.reflectionMoveTimer", StyleConstants.fastAnimationDelay, new ActionListener ()
        {
            @Override
            public void actionPerformed ( final ActionEvent e )
            {
                if ( progress < 1f )
View Full Code Here

        initClock ();
    }

    protected void initClock ()
    {
        this.timer = new WebTimer ( 100, new ActionListener ()
        {
            @Override
            public void actionPerformed ( ActionEvent e )
            {
                if ( clockType.equals ( ClockType.stopwatch ) )
View Full Code Here

    @Override
    public void actionPerformed ( final ActionEvent e )
    {
        hideButton.setEnabled ( false );
        timer = new WebTimer ( "WebTipLabel.animator", StyleConstants.animationDelay, new ActionListener ()
        {
            @Override
            public void actionPerformed ( final ActionEvent e )
            {
                if ( opacity > 0 )
View Full Code Here

TOP

Related Classes of com.alee.utils.swing.WebTimer

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.