Package de.anormalmedia.vividswinganimations.panels

Examples of de.anormalmedia.vividswinganimations.panels.SlidePanelAnimation


            if( !animate ) {
                itemPanel.setSlideValue( expand ? 1f : 0f );
                return;
            }

            SlidePanelAnimation slidePanelAnimation = new SlidePanelAnimation( itemPanel, expand ? 1f : 0f );
            slidePanelAnimation.setDuration( 300 );

            if( runner != null ) {
                runner.cancel();
            }
            runner = new DefaultAnimationRunner();
View Full Code Here


        AlphaPanelAnimation fadeOut = new AlphaPanelAnimation( alphaPanel, 0f );
        fadeOut.setStartOffset( 4000 );
        fadeOut.setDuration( 2000 );
        runner.addAnimation( fadeOut );

        SlidePanelAnimation slideIn = new SlidePanelAnimation( slidePanel, 1f );
        slideIn.setInterpolator( new AccelerateInterpolator() );
        slideIn.setStartOffset( 7000 );
        slideIn.setDuration( 1000 );
        runner.addAnimation( slideIn );

        SlidePanelAnimation slideOut = new SlidePanelAnimation( slidePanel, 0f );
        slideOut.setInterpolator( new AccelerateInterpolator() );
        slideOut.setStartOffset( 10000 );
        slideOut.setDuration( 1000 );
        slideOut.addAnimationListener( new AnimationAdapter() {
            @Override
            public void animationFinished() {
                slidePanel.setDirection( DIRECTION.fromRight );
                slidePanel.setBounds( contentPane.getWidth() - 200, 0, 200, contentPane.getHeight() );
                super.animationFinished();
            }
        } );
        runner.addAnimation( slideOut );

        slideIn = new SlidePanelAnimation( slidePanel, 1f );
        slideIn.setInterpolator( new AccelerateInterpolator() );
        slideIn.setStartOffset( 13000 );
        slideIn.setDuration( 1000 );
        runner.addAnimation( slideIn );

        slideOut = new SlidePanelAnimation( slidePanel, 0f );
        slideOut.setInterpolator( new AccelerateInterpolator() );
        slideOut.setStartOffset( 16000 );
        slideOut.setDuration( 1000 );
        slideOut.addAnimationListener( new AnimationAdapter() {
            @Override
            public void animationFinished() {
                slidePanel.setDirection( DIRECTION.fromTop );
                slidePanel.setBounds( 0, 0, contentPane.getWidth(), 200 );
                super.animationFinished();
            }
        } );
        runner.addAnimation( slideOut );

        slideIn = new SlidePanelAnimation( slidePanel, 1f );
        slideIn.setInterpolator( new AccelerateInterpolator() );
        slideIn.setStartOffset( 19000 );
        slideIn.setDuration( 1000 );
        runner.addAnimation( slideIn );

        slideOut = new SlidePanelAnimation( slidePanel, 0f );
        slideOut.setInterpolator( new AccelerateInterpolator() );
        slideOut.setStartOffset( 22000 );
        slideOut.setDuration( 1000 );
        slideOut.addAnimationListener( new AnimationAdapter() {
            @Override
            public void animationFinished() {
                slidePanel.setDirection( DIRECTION.fromBottom );
                slidePanel.setBounds( 0, contentPane.getHeight() - 200, contentPane.getWidth(), 200 );
                super.animationFinished();
            }
        } );
        runner.addAnimation( slideOut );

        slideIn = new SlidePanelAnimation( slidePanel, 1f );
        slideIn.setInterpolator( new AccelerateInterpolator() );
        slideIn.setStartOffset( 25000 );
        slideIn.setDuration( 1000 );
        runner.addAnimation( slideIn );

        slideOut = new SlidePanelAnimation( slidePanel, 0f );
        slideOut.setInterpolator( new AccelerateInterpolator() );
        slideOut.setStartOffset( 28000 );
        slideOut.setDuration( 1000 );
        slideOut.addAnimationListener( new AnimationAdapter() {
            @Override
            public void animationFinished() {
                DemoPanels.this.dispose();
            }
        } );
View Full Code Here

TOP

Related Classes of de.anormalmedia.vividswinganimations.panels.SlidePanelAnimation

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.