Package com.google.web.bindery.event.shared

Examples of com.google.web.bindery.event.shared.HandlerRegistration.removeHandler()


    assertEquals(1, presenter.firstEventsWithoutParameterHandled);
    assertEquals(1, presenter.secondEventsHandled);
    assertEquals(2, presenter.firstAndSecondEventsHandled);

    // After unregistering
    registration.removeHandler();
    eventBus.fireEvent(new FirstEvent());
    eventBus.fireEvent(new SecondEvent());
    assertEquals(1, presenter.firstEventsHandled);
    assertEquals(1, presenter.firstEventsWithoutParameterHandled);
    assertEquals(1, presenter.secondEventsHandled);
View Full Code Here


    return new HandlerRegistration() {
      public void removeHandler() {

        bind.removeHandler();
        handlerRegistration.removeHandler();
      }
    };
  }

  protected HandlerRegistration bind() {
View Full Code Here

    return new HandlerRegistration() {
      public void removeHandler() {
        MGWTPlaceHistoryHandler.this.defaultPlace = Place.NOWHERE;
        MGWTPlaceHistoryHandler.this.placeController = null;
        popHandler.removeHandler();
        placeChangeHandler.removeHandler();
      }
    };

  }
View Full Code Here

    checkHandlerCount(2, BarEvent.TYPE);

    fooReg.removeHandler();
    checkHandlerCount(0, FooEvent.TYPE);

    barReg2.removeHandler();
    checkHandlerCount(1, BarEvent.TYPE);

    barReg1.removeHandler();
    checkHandlerCount(0, BarEvent.TYPE);
  }
View Full Code Here

    checkHandlerCount(1, FooEvent.TYPE);

    HandlerRegistration fooReg2 = eventBus.addHandlerToSource(FooEvent.TYPE, source2, fooHandler2);
    checkHandlerCount(2, FooEvent.TYPE);

    fooReg2.removeHandler();
    checkHandlerCount(1, FooEvent.TYPE);

    fooReg1.removeHandler();
    checkHandlerCount(0, FooEvent.TYPE);
  }
View Full Code Here

        req.find(response.stableId()).fire(new Receiver<SimpleFooProxy>() {
          @Override
          public void onSuccess(SimpleFooProxy response) {
            // No new events
            assertEquals(2, count[0]);
            registration.removeHandler();
            finishTestAndReset();
          }
        });
      }
    });
View Full Code Here

        req.find(stableId).fire(new Receiver<SimpleFooProxy>() {

          @Override
          public void onSuccess(SimpleFooProxy returnedProxy) {
            assertEquals(1, count[0]);
            registration.removeHandler();
            finishTestAndReset();
          }
        });
      }
    });
View Full Code Here

      NativeEvent event = document.createClickEvent(1, 0, 0, 0, 0, false, false, false, false);
      link.getElement().dispatchEvent(event);
    } finally {
      RootPanel.get().remove(link);
      if (registration != null) {
        registration.removeHandler();
      }
    }
  }
}
View Full Code Here

      }
    });
   
    return new com.google.gwt.event.shared.HandlerRegistration(){
      public void removeHandler() {
        registration.removeHandler();
      }
    };
  }

  public HandlerRegistration addChosenChangeHandler(ChosenChangeHandler handler) {
View Full Code Here

      }
    });

    return new com.google.gwt.event.shared.HandlerRegistration() {
      public void removeHandler() {
        registration.removeHandler();
      }
    };
  }

  public HandlerRegistration addChosenChangeHandler(
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.