Examples of AnimationCallback


Examples of com.google.gwt.animation.client.AnimationScheduler.AnimationCallback

    private final AnimationCallback getAnimationCallback()
    {
        if (null == m_animate)
        {
            m_animate = new AnimationCallback()
            {
                @Override
                public void execute(double time)
                {
                    doFrame();
View Full Code Here

Examples of com.google.gwt.animation.client.AnimationScheduler.AnimationCallback

        return s_instance;
    }

    private LayerRedrawManager()
    {
        m_redraw = new AnimationCallback()
        {
            @Override
            public void execute(double time)
            {
                final FastArrayList<Layer> list = m_layers;
View Full Code Here

Examples of com.google.gwt.animation.client.AnimationScheduler.AnimationCallback

                @Override
                public void onCanPlayThrough(CanPlayThroughEvent event)
                {
                    play();

                    AnimationScheduler.get().requestAnimationFrame(new AnimationCallback()
                    {
                        @Override
                        public void execute(double timestamp)
                        {
                            if (false == m_pause)
View Full Code Here

Examples of com.google.gwt.animation.client.AnimationScheduler.AnimationCallback

      return;
    }

    final long startTime = System.currentTimeMillis();

    final AnimationCallback animationCallback = new AnimationCallback() {

      @Override
      public void execute(double now) {

        if (now >= startTime + step.getTime()) {
          ScrollPanelTouchImpl.this.pos(step.x, step.y);
          ScrollPanelTouchImpl.this.animating = false;
          if (issueEvent) {
            fireEvent(new ScrollAnimationEndEvent());
          }
          ScrollPanelTouchImpl.this.startAnimation(issueEvent);
          return;
        }

        now = (now - startTime) / step.getTime() - 1;
        double easeOut = Math.sqrt(1 - now * now);
        int newX = (int) Math.round((step.getX() - startX) * easeOut + startX);
        int newY = (int) Math.round((step.getY() - startY) * easeOut + startY);
        ScrollPanelTouchImpl.this.pos(newX, newY);
        fireEvent(new ScrollAnimationMoveEvent());
        if (ScrollPanelTouchImpl.this.animating)
          ScrollPanelTouchImpl.this.aniTime = AnimationScheduler.get().requestAnimationFrame(this);

      }
    };

    animationCallback.execute(startTime);

  }
View Full Code Here

Examples of com.google.gwt.animation.client.AnimationScheduler.AnimationCallback

      return;
    }

    final long startTime = System.currentTimeMillis();

    final AnimationCallback animationCallback = new AnimationCallback() {

      @Override
      public void execute(double now) {

        if (now >= startTime + step.getTime()) {
          ScrollPanelTouchImpl.this.pos(step.x, step.y);
          ScrollPanelTouchImpl.this.animating = false;
          if (issueEvent) {
            fireEvent(new ScrollAnimationEndEvent());
          }
          ScrollPanelTouchImpl.this.startAnimation(issueEvent);
          return;
        }

        now = (now - startTime) / step.getTime() - 1;
        double easeOut = Math.sqrt(1 - now * now);
        int newX = (int) Math.round((step.getX() - startX) * easeOut + startX);
        int newY = (int) Math.round((step.getY() - startY) * easeOut + startY);
        ScrollPanelTouchImpl.this.pos(newX, newY);
        fireEvent(new ScrollAnimationMoveEvent());
        if (ScrollPanelTouchImpl.this.animating)
          ScrollPanelTouchImpl.this.aniTime = AnimationScheduler.get().requestAnimationFrame(this);

      }
    };

    animationCallback.execute(startTime);

  }
View Full Code Here

Examples of com.google.gwt.animation.client.AnimationScheduler.AnimationCallback

        m_begtime = System.currentTimeMillis();

        final CanvasElement element = getCanvasElement();

        final AnimationCallback animate = new AnimationCallback()
        {
            @Override
            public void execute(double time)
            {
                doFrame();
View Full Code Here

Examples of com.google.gwt.layout.client.Layout.AnimationCallback

                                    width, Unit.PX);
      mainPanel_.setWidgetLeftWidth(to,
                                    0, Unit.PX,
                                    width, Unit.PX);

      mainPanel_.animate(300, new AnimationCallback()
      {
         public void onAnimationComplete()
         {
            setVisible(from, fromFocus.getFocusTarget(), false);
            mainPanel_.setWidgetLeftRight(to, 0, Unit.PX, 0, Unit.PX);
View Full Code Here

Examples of com.google.gwt.layout.client.Layout.AnimationCallback

                                    0, Unit.PX,
                                    width, Unit.PX);
     
      isAnimating_ = true;
    
      bodyPanel_.animate(300, new AnimationCallback()
      {
         @Override
         public void onAnimationComplete()
         {
            bodyPanel_.setWidgetVisible(from, false);
View Full Code Here

Examples of com.google.gwt.layout.client.Layout.AnimationCallback

    delayTestFinish(5000);
    // Fully qualified to avoid the deprecation warning in the import section
    com.google.gwt.user.client.DeferredCommand.addCommand(new Command() {
      @Override
      public void execute() {
        p.animate(100, new AnimationCallback() {
          @Override
          public void onLayout(Layer layer, double progress) {
          }

          @Override
View Full Code Here

Examples of com.google.gwt.layout.client.Layout.AnimationCallback

   }

   @Test
   public void animate() {
      // Arrange
      AnimationCallback callback = new AnimationCallback() {

         public void onAnimationComplete() {
            onAnimationComplete = true;
         }
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.