Package com.google.gwt.animation.client

Examples of com.google.gwt.animation.client.Animation


    //Fade out the "Loading application" pop-up
    private void hideLoadingPopup() {
        final Element e = RootPanel.get("loading").getElement();

        Animation r = new Animation() {

            @Override
            protected void onUpdate(double progress) {
                e.getStyle().setOpacity(1.0 - progress);
            }

            @Override
            protected void onComplete() {
                e.getStyle().setVisibility(Visibility.HIDDEN);
            }

        };

        r.run(500);

    }
View Full Code Here


    //Fade out the "Loading application" pop-up
    private void hideLoadingPopup() {
        final Element e = RootPanel.get( "loading" ).getElement();

        new Animation() {

            @Override
            protected void onUpdate( double progress ) {
                e.getStyle().setOpacity( 1.0 - progress );
            }
View Full Code Here

    private final Animation animation;

    @Inject
    public ProcessingLabel(final UiMessages messages, Resources resources) {
        super(messages.processing());
        animation = new Animation() {
            private double count = 0;

            @Override
            protected void onComplete() {
                if (show) {
View Full Code Here

  protected Effect effect;
  protected Animation animation;
  protected int duration = 0;

  public Fx() {
    animation = new Animation() {

      @Override
      public void onCancel() {
        Fx.this.onCancel();
        isRunning = false;
View Full Code Here

    ListDataProvider<TaskProxy> listDataProvider = new ListDataProvider<TaskProxy>();
    listDataProvider.addDataDisplay(tasksTable);
    tasksList = listDataProvider.getList();

    Element androidElement = getElement().getFirstChildElement().getFirstChildElement();
    final Animation androidAnimation = new AndroidAnimation(androidElement);

    tasksTable.setRowStyles(new RowStyles<TaskProxy>() {
      public String getStyleNames(TaskProxy row, int rowIndex) {
        Range visibleRange = tasksTable.getVisibleRange();
        int lastRow = visibleRange.getStart() + visibleRange.getLength() - 1;
        if (rowIndex == tasksList.size() - 1 || rowIndex == lastRow) {
          return isDone(row) ? "task complete last" : "task incomplete last";
        } else {
          return isDone(row) ? "task complete" : "task incomplete";
        }
      }
    });

    tasksTable.dateColumn.setFieldUpdater(new FieldUpdater<TaskProxy, Date>() {
      public void update(int index, TaskProxy task, Date value) {
        CloudTasksRequest request = requestFactory.cloudTasksRequest();
        TaskProxy updatedTask = request.edit(task);
        updatedTask.setDueDate(value);
        request.updateTask(updatedTask).fire();
      }
    });

    tasksTable.doneColumn.setFieldUpdater(new FieldUpdater<TaskProxy, Boolean>() {
      public void update(int index, TaskProxy task, Boolean value) {
        CloudTasksRequest request = requestFactory.cloudTasksRequest();
        TaskProxy updatedTask = request.edit(task);
        updatedTask.setDone(value);
        request.updateTask(updatedTask).fire();
      }
    });

    tasksTable.deleteColumn.setFieldUpdater(new FieldUpdater<TaskProxy, String>() {
      public void update(int index, TaskProxy task, String value) {
        CloudTasksRequest request = requestFactory.cloudTasksRequest();
        request.deleteTask(task).fire();
        tasksList.remove(task);
      }
    });

    taskInput.getElement().setPropertyString("placeholder", "Add new tasks here");

    taskInput.addKeyUpHandler(new KeyUpHandler() {
      public void onKeyUp(KeyUpEvent event) {
        if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) {
          String message = taskInput.getText();
          taskInput.setText("");
          sendNewTaskToServer(message);
         
          androidAnimation.run(400);
        }
      }
    });

    Scheduler.get().scheduleFixedDelay(new RepeatingCommand() {
View Full Code Here

  protected Effect effect;
  protected Animation animation;
  protected int duration = 0;

  public Fx() {
    animation = new Animation() {

      @Override
      public void onCancel() {
        Fx.this.onCancel();
        isRunning = false;
View Full Code Here

    //Fade out the "Loading application" pop-up
    private void hideLoadingPopup() {
        final Element e = RootPanel.get( "loading" ).getElement();

        new Animation() {

            @Override
            protected void onUpdate( double progress ) {
                e.getStyle().setOpacity( 1.0 - progress );
            }
View Full Code Here

  protected Effect effect;
  protected Animation animation;
  protected int duration = 0;

  public Fx() {
    animation = new Animation() {

      @Override
      public void onCancel() {
        Fx.this.onCancel();
        isRunning = false;
View Full Code Here

    for (Layer l : layers) {
      adjustHorizontalConstraints(parentWidth, l);
      adjustVerticalConstraints(parentHeight, l);
    }

    animation = new Animation() {
      @Override
      protected void onCancel() {
        onComplete();
      }
View Full Code Here

  protected Effect effect;
  protected Animation animation;
  protected int duration = 0;

  public Fx() {
    animation = new Animation() {

      @Override
      public void onCancel() {
        Fx.this.onCancel();
        isRunning = false;
View Full Code Here

TOP

Related Classes of com.google.gwt.animation.client.Animation

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.