Examples of PositionWrapper


Examples of com.totsp.gwittir.client.fx.PositionWrapper

            LOG.log(Level.SPAM, "Setting new widget:" + this.toWidget.getUIObject(), null);
            this.add((Widget) this.toWidget.getUIObject());
        }

        //GWT.log( "Setting widget "+ w.toString(), null );
        final PositionWrapper nextWidget = new PositionWrapper(w);
        nextWidget.setPosition("relative");

        String high = "100%";
        String low = "0%";

        if ((this.currentWidget != null) &&
                this.getDirection().equals(SlideTransitionSimplePanel.VERTICAL)) {
            high = "0px";
            low = "-" + currentWidget.getUIObject().getOffsetHeight() + "px";
        }

        this.currentAnimator = new PropertyAnimator(nextWidget,
                this.getDirection(), high, low, this.getMutationStrategy(),
                1000,
                new AnimationFinishedCallback() {
                    public void onFailure(PropertyAnimator animator, Exception e) {
                        currentAnimator = null;
                        clear();
                        add(w);
                        currentWidget = nextWidget;
                        toWidget = null;
                    }

                    public void onFinish(PropertyAnimator animator) {
                        currentWidget = nextWidget;
                        toWidget = null;
                        nextWidget.setTop("0px");
                        currentAnimator = null;
                    }
                });

        if (currentWidget != null) {
            final Widget oldWidget = (Widget) currentWidget.getUIObject();
            int totalOffset = this.currentWidget.getUIObject().getOffsetHeight() +
                Dimensions.INSTANCE.getTotalVerticalMargin(this.currentWidget.getUIObject()
                                                                             .getElement());
            Logger.getAnonymousLogger().log( Level.SPAM, "Total offset " + totalOffset, null);

            if (this.getDirection().equals(SlideTransitionSimplePanel.HORIZONTAL)) {
                nextWidget.setTop("-" + totalOffset + "px");
            }

            PropertyAnimator old = new PropertyAnimator(currentWidget,
                    this.getDirection(), "0%", "-100%",
                    this.getMutationStrategy(), 1000,
                    new AnimationFinishedCallback() {
                        public void onFailure(PropertyAnimator animator,
                            Exception e) {
                            Logger.getAnonymousLogger().log( Level.INFO, "Exception animating transition", e);
                        }

                        public void onFinish(PropertyAnimator animator) {
                            base.remove(oldWidget);

                            if (getDirection()
                                        .equals(SlideTransitionSimplePanel.HORIZONTAL)) {
                                nextWidget.setTop("0px");
                            }
                        }
                    });
            old.start();
        }

        this.toWidget = nextWidget;
        this.currentAnimator.start();
        this.base.add(w);

        if (this.getDirection().equals(SlideTransitionSimplePanel.HORIZONTAL)) {
            nextWidget.setLeft("101%");
        }
    }
View Full Code Here

Examples of com.totsp.gwittir.client.fx.PositionWrapper

            this.getScrollPosition());
    }

    public void setWidget(Widget widget) {
        this.widget = widget;
        this.position = new PositionWrapper(widget);
        this.position.setPosition("relative");
        this.position.setTop("0px");
        this.position.setLeft("0px");
        this.base.setWidget(widget);
    }
View Full Code Here

Examples of com.totsp.gwittir.client.fx.PositionWrapper

    private void showChangedIndicator(){
        if( this.isAttached() && this.hasChanged ){
            OpacityWrapper o = new OpacityWrapper(marker);
            o.setOpacity(new Double(0.0));
            RootPanel.get().add( this.marker );
            PositionWrapper w = new PositionWrapper(marker);
            w.setPosition("absolute");
            w.setTop( this.root.getAbsoluteTop()+"px" );
            w.setRight( this.root.getAbsoluteLeft() + this.root.getOffsetWidth() +"px");
            PropertyAnimator a = new PropertyAnimator(o, "opacity", new Double(1), MutationStrategy.DOUBLE_CUBIC, 250);
            a.start();
        }
    }
View Full Code Here

Examples of com.totsp.gwittir.client.fx.PositionWrapper

            this.getScrollPosition());
    }

    public void setWidget(Widget widget) {
        this.widget = widget;
        this.position = new PositionWrapper(widget);
        this.position.setPosition("relative");
        this.position.setTop("0px");
        this.position.setLeft("0px");
        this.base.setWidget(widget);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.