Package com.alee.extended.transition.effects.curtain

Examples of com.alee.extended.transition.effects.curtain.CurtainTransitionEffect


        return effect;
    }

    private CurtainTransitionEffect createFadeCurtainEffect ()
    {
        CurtainTransitionEffect effect = new CurtainTransitionEffect ();
        effect.setSpeed ( 2 );
        effect.setSize ( 20 );
        effect.setType ( CurtainType.fade );
        return effect;
    }
View Full Code Here


        return effect;
    }

    private CurtainTransitionEffect createFillCurtainEffect ()
    {
        CurtainTransitionEffect effect = new CurtainTransitionEffect ();
        effect.setSpeed ( 2 );
        effect.setSize ( 40 );
        effect.setType ( CurtainType.fill );
        return effect;
    }
View Full Code Here

        return effect;
    }

    private CurtainTransitionEffect createHorizontalSlideCurtainEffect ()
    {
        CurtainTransitionEffect effect = new CurtainTransitionEffect ();
        effect.setSpeed ( 20 );
        effect.setSize ( 20 );
        effect.setType ( CurtainType.slide );
        effect.setDirection ( Direction.horizontal );
        return effect;
    }
View Full Code Here

        return effect;
    }

    private CurtainTransitionEffect createVerticalSlideCurtainEffect ()
    {
        CurtainTransitionEffect effect = new CurtainTransitionEffect ();
        effect.setSpeed ( 30 );
        effect.setSize ( 20 );
        effect.setType ( CurtainType.slide );
        effect.setDirection ( Direction.vertical );
        return effect;
    }
View Full Code Here

    {
        // Transition panel
        final ComponentTransition componentTransition = new ComponentTransition ();

        // Transition effect
        final CurtainTransitionEffect effect = new CurtainTransitionEffect ();
        effect.setType ( CurtainType.fade );
        effect.setSize ( 10 );
        effect.setSpeed ( 2 );
        componentTransition.setTransitionEffect ( effect );

        // Toolbar #1
        final WebToolBar toolBar1 = new WebToolBar ( WebToolBar.HORIZONTAL );
        toolBar1.setFloatable ( false );
        toolBar1.add ( WebButton.createIconWebButton ( loadIcon ( "toolbar/1.png" ), true ) );
        toolBar1.addSeparator ();
        toolBar1.add ( WebButton.createIconWebButton ( loadIcon ( "toolbar/2.png" ), true ) );
        toolBar1.addSeparator ();
        toolBar1.add ( WebButton.createIconWebButton ( loadIcon ( "toolbar/3.png" ), true ) );
        toolBar1.addToEnd ( WebButton.createIconWebButton ( loadIcon ( "toolbar/4.png" ), true ) );

        // Toolbar #2
        final WebToolBar toolBar2 = new WebToolBar ( WebToolBar.HORIZONTAL );
        toolBar2.setFloatable ( false );
        toolBar2.addSpacing ();
        toolBar2.add ( new WebLabel ( "Curtain transition example" ) );
        toolBar2.addSpacing ();
        componentTransition.setContent ( toolBar2 );

        // Initial transition panel state
        componentTransition.setContent ( toolBar1 );
        componentTransition.setPreferredSize ( SwingUtils.max ( toolBar1, toolBar2 ) );

        // States switch button
        final WebButton switchView = new WebButton ( loadIcon ( "switch.png" ) );
        switchView.setDrawFocus ( false );
        switchView.addActionListener ( new ActionListener ()
        {
            @Override
            public void actionPerformed ( ActionEvent e )
            {
                if ( componentTransition.getContent () == toolBar1 )
                {
                    effect.setDirection ( Direction.right );
                    componentTransition.performTransition ( toolBar2 );
                }
                else
                {
                    effect.setDirection ( Direction.left );
                    componentTransition.performTransition ( toolBar1 );
                }
            }
        } );
        componentTransition.addTransitionListener ( new TransitionListener ()
View Full Code Here

            public Dimension getPreferredSize ()
            {
                return contentPane.getPreferredSize ();
            }
        };
        final CurtainTransitionEffect effect = new CurtainTransitionEffect ();
        effect.setDirection ( Direction.down );
        effect.setType ( CurtainType.fade );
        appearanceTransition.setTransitionEffect ( effect );
        appearanceTransition.addAncestorListener ( new AncestorAdapter ()
        {
            @Override
            public void ancestorAdded ( final AncestorEvent event )
View Full Code Here

TOP

Related Classes of com.alee.extended.transition.effects.curtain.CurtainTransitionEffect

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.