Package de.anormalmedia.vividswinganimations.listener

Examples of de.anormalmedia.vividswinganimations.listener.AnimationAdapter


        Animation windowFadeAnimation = WindowFadeFactory.createWindowFadeAnimation( this, 0f );
        windowFadeAnimation.setStartOffset( 3000 );
        windowFadeAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( windowFadeAnimation );

        windowFadeAnimation.addAnimationListener( new AnimationAdapter() {

            @Override
            public void animationFinished() {
                Point p = DemoFrame.this.getLocation();
                p.x = frameBounds.x + frameBounds.width - DemoFrame.this.getWidth();
                DemoFrame.this.setLocation( p );
            }
        } );

        windowFadeAnimation = WindowFadeFactory.createWindowFadeAnimation( this, 1f );
        windowFadeAnimation.setStartOffset( 4000 );
        windowFadeAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( windowFadeAnimation );

        SizeAnimation collapseWidthAnimation = new SizeAnimation( this, 200, -1 );
        collapseWidthAnimation.setStartOffset( 6000 );
        collapseWidthAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( collapseWidthAnimation );

        LocationAnimation locationXAnimation = new LocationAnimation( this, frameBounds.x + frameBounds.width / 2 + 100, -1 );
        locationXAnimation.setStartOffset( 6000 );
        locationXAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( locationXAnimation );

        SizeAnimation collapseHeighthAnimation = new SizeAnimation( this, -1, 100 );
        collapseHeighthAnimation.setStartOffset( 7000 );
        collapseHeighthAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( collapseHeighthAnimation );

        LocationAnimation locationYAnimation = new LocationAnimation( this, -1, 250 );
        locationYAnimation.setStartOffset( 7000 );
        locationYAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( locationYAnimation );

        CircleAnimation circleAnimation = new CircleAnimation( this, 200, true );
        circleAnimation.setStartOffset( 8000 );
        circleAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( circleAnimation );

        CircleAnimation circleReverseAnimation = new CircleAnimation( this, 200, false );
        circleReverseAnimation.setStartOffset( 9000 );
        circleReverseAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( circleReverseAnimation );

        BackgroundColorAnimation blackBackgroundColorAnimation = new BackgroundColorAnimation( contentPane, Color.BLACK );
        blackBackgroundColorAnimation.setStartOffset( 10000 );
        blackBackgroundColorAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( blackBackgroundColorAnimation );

        ForegroundColorAnimation foregroundColorAnimation = new ForegroundColorAnimation( lblGeil, Color.WHITE );
        foregroundColorAnimation.setStartOffset( 11000 );
        foregroundColorAnimation.setDuration( 2000 );
        defaultAnimationExecutor.addAnimation( foregroundColorAnimation );

        BackgroundColorRangeAnimation prepareColorRangeAnimation = new BackgroundColorRangeAnimation( contentPane, new Color( Color.HSBtoRGB( 0f, 1f, 1f ) ) );
        prepareColorRangeAnimation.setStartOffset( 13000 );
        prepareColorRangeAnimation.setDuration( 1000 );
        defaultAnimationExecutor.addAnimation( prepareColorRangeAnimation );

        BackgroundColorRangeAnimation backgroundColorRangeAnimation = new BackgroundColorRangeAnimation( contentPane, new Color( Color.HSBtoRGB( 0.99f, 1f, 1f ) ) );
        backgroundColorRangeAnimation.setStartOffset( 14000 );
        backgroundColorRangeAnimation.setDuration( 10000 );
        defaultAnimationExecutor.addAnimation( backgroundColorRangeAnimation );

        windowFadeAnimation = WindowFadeFactory.createWindowFadeAnimation( this, 0f );
        windowFadeAnimation.setStartOffset( 16000 );
        windowFadeAnimation.setDuration( 8000 );
        defaultAnimationExecutor.addAnimation( windowFadeAnimation );

        windowFadeAnimation.addAnimationListener( new AnimationAdapter() {

            @Override
            public void animationFinished() {
                DemoFrame.this.dispose();
            }
View Full Code Here


        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.listener.AnimationAdapter

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.