All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.gwt.angular.client.impl.JsScopeBase Maven / Gradle / Ivy

There is a newer version: 1.1.1
Show newest version
package com.google.gwt.angular.client.impl;

import com.google.gwt.angular.client.Scope;
import com.google.gwt.angular.client.WatchFunction;

/**
 * Base class of generated scopes.
 */
public class JsScopeBase> extends JsModelBase implements Scope {
  protected JsScopeBase() {
  }

  @Override
  public final native  void $watch(String expr, WatchFunction func) /*-{
    this.$watch(expr, $entry(function (newVal) {
      [email protected]::exec(Ljava/lang/Object;)(newVal);
    }));
  }-*/;

  @Override
  public final native void $apply() /*-{
    this.$apply(null);
  }-*/;

  @Override
  public final native void $apply(String expr) /*-{
    this.$apply(expr);
  }-*/;

  @Override
  public final native void $apply(Runnable runnable) /*-{
    this.$apply($entry(function () {
      [email protected]::run()();
    }));
  }-*/;

  @Override
  public final void $onDestroy(Runnable runnable) {
    $on("$destroy", runnable);
  }

  @Override
  public final native void $on(String eventName, Runnable runnable) /*-{
    this.$on(eventName, $entry(function () {
      [email protected]::run()();
    }));
  }-*/;
}