Package org.adamtacy.client.ui.effects.impl

Examples of org.adamtacy.client.ui.effects.impl.Move


        assert animate;

        Point location = getLocation();

        Move move = new Move(x - location.getX(), y - location.getY()) {
            @Override
            public void tearDownEffect() {
                /*
                 * do not super.tearDownEffects as this resets to original state
                 * reset root panel position as this is affected by move
                 */
                CSS.setLocation(rootPanel, 0, 0);
            }
        };

        move.addEffectCompletedHandler(new EffectCompletedHandler() {
            @Override
            public void onEffectCompleted(EffectCompletedEvent event) {
                removeEffects();
                setLocation(x, y);
                assert 0 == new WidgetLocation(rootPanel, WindowPanel.this)
                        .getLeft();
                assert 0 == new WidgetLocation(rootPanel, WindowPanel.this)
                        .getTop();
            }
        });

        move.setTransitionType(FXUtil.EASE_OUT);
        move.setDuration(FXUtil.DEFAULT_EFFECT_DURATION);

        addEffect(move);
        playEffects();
    }
View Full Code Here

TOP

Related Classes of org.adamtacy.client.ui.effects.impl.Move

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.