Package com.google.gwt.event.shared

Examples of com.google.gwt.event.shared.HandlerRegistration


       
        executor.execute();         
      }
    };
   
    final HandlerRegistration resizeHandlerRegistration = Window.addResizeHandler(resizeHandler);
   
    return new HandlerRegistration()
    {
      public void removeHandler()
      {
        if(resizeHandlerRegistration != null)
        {
          resizeHandlerRegistration.removeHandler();
        }
      }
    };
  }
View Full Code Here


   * @param filter the filter to be removed
   */
  public void removeFilter(Filter<M, ?> filter) {
    filters.remove(filter.getValueProvider().getPath());

    HandlerRegistration r = registrations.remove(filter);
    if (r != null) {
      r.removeHandler();
    }
  }
View Full Code Here

  }
 
  public HandlerRegistration addMessageHandler(final SocketMessageHandler handler)
  {
    messageHandlers.add(handler);
    return new HandlerRegistration()
    {
      @Override
      public void removeHandler()
      {
        int index = messageHandlers.indexOf(handler);
View Full Code Here

  }
 
  public HandlerRegistration addOpenHandler(final SocketOpenHandler handler)
  {
    openHandlers.add(handler);
    return new HandlerRegistration()
    {
      @Override
      public void removeHandler()
      {
        int index = openHandlers.indexOf(handler);
View Full Code Here

  }

  public HandlerRegistration addCloseHandler(final SocketCloseHandler handler)
  {
    closeHandlers.add(handler);
    return new HandlerRegistration()
    {
      @Override
      public void removeHandler()
      {
        int index = closeHandlers.indexOf(handler);
View Full Code Here

  }

  public HandlerRegistration addErrorHandler(final SocketErrorHandler handler)
  {
    errorHandlers.add(handler);
    return new HandlerRegistration()
    {
      @Override
      public void removeHandler()
      {
        int index = errorHandlers.indexOf(handler);
View Full Code Here

  @Override
  public void add(Widget w) {

    final WidgetListEntry widgetListEntry = new WidgetListEntry(this.appearance);
    widgetListEntry.setWidget(w);
    HandlerRegistration handlerRegistration = widgetListEntry.addTapHandler(new TapHandler() {
      @Override
      public void onTap(TapEvent event) {
        SelectionEvent.fire(WidgetList.this, container.getWidgetIndex(widgetListEntry));
      }
    });
View Full Code Here

    return addValueChangedHandler(valueChangedHandler, false);
  }

  @Override public HandlerRegistration addValueChangedHandler(ValueChangedHandler<Type> valueChangedHandler,
    boolean triggerOnceRightAway) {
    HandlerRegistration handlerRegistration = manager.addHandler(ValueChangedEvent.getType(), valueChangedHandler);
    if (triggerOnceRightAway) {
      ValueChangedEvent.fire(this, get(), get());
    }
    return handlerRegistration;
  }
View Full Code Here

  @Override public HandlerRegistration addValueAddedHandler(ValueAddedHandler<T> handler) {
    return addValueAddedHandler(handler, false);
  }

  public HandlerRegistration addValueAddedHandler(ValueAddedHandler<T> handler, boolean trickerValueAddedEventForAll) {
    HandlerRegistration handlerRegistration = manager.addHandler(ValueAddedEvent.getType(), handler);
    if (trickerValueAddedEventForAll) {
      trickerValueAddedEventForAll();
    }
    return handlerRegistration;
  }
View Full Code Here

   * addValueChangedHandler
   * (net.svenbuschbeck.gwt.ao.client.events.ValueChangedHandler, boolean)
   */
  @Override public HandlerRegistration addValueChangedHandler(ValueChangedHandler<List<T>> valueChangedHandler,
    boolean triggerInitially) {
    HandlerRegistration handlerRegistration = manager.addHandler(ValueChangedEvent.getType(), valueChangedHandler);
    List<T> staticCopy = getStaticCopy();
    ValueChangedEvent.fire(this, staticCopy, staticCopy);
    return handlerRegistration;
  }
View Full Code Here

TOP

Related Classes of com.google.gwt.event.shared.HandlerRegistration

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.