Package gwt.mosaic.client.effects

Examples of gwt.mosaic.client.effects.Transition


  @UiHandler(value = { "button1", "button2", "button3", "button4" })
  public void onClickEvent(ClickEvent e) {
    final Widget w = (Widget) e.getSource();

    Transition transition = new Transition(new Quadratic(),
        Type.EASE_IN_OUT) {

      int initialWidth = w.getElement().getClientWidth()
          - WidgetHelper.getBoxModel(w).getPaddingWidthContribution();

      @Override
      protected void onUpdate(double progress) {
        WidgetHelper.setPreferredWidth(w,
            (int) ((1.0 - progress) * initialWidth) + "px", true);
      }

      @Override
      protected void onComplete() {
        w.setVisible(false);
        WidgetHelper.setPreferredWidth(w, null);
        WidgetHelper.invalidate(w, true);
      }
    };

    transition.run(250);
  }
View Full Code Here

TOP

Related Classes of gwt.mosaic.client.effects.Transition

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.