Package com.google.gwt.event.shared

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


    return toggles.keySet().iterator();
  }

  @Override
  public boolean remove(Object toggle) {
    HandlerRegistration reg = toggles.remove(toggle);
    if (reg != null) {
      reg.removeHandler();
      return true;
    }
    return false;

  }
View Full Code Here


    @Override
    public HandlerRegistration addValueChangeHandler(final ValueChangeHandler<String> handler) {

        changeHandlers.add(handler);

        return new HandlerRegistration() {
            @Override
            public void removeHandler() {
                changeHandlers.remove(handler);
            }
        };
View Full Code Here

  }

  void unbind(String property) {
    bindings.remove(property);
    converters.remove(property);
    HandlerRegistration reg = handlerRegistrations.remove(property);
    if (reg != null) {
      reg.removeHandler();
    }
  }
View Full Code Here

      if (binding.getWidget().equals(widget) && !property.equals(binding.getProperty())) {
        throw new WidgetAlreadyBoundException("Widget already bound to property: " + binding.getProperty());
      }
    }

    HandlerRegistration handlerRegistration = null;
    if (widget instanceof HasValue) {
      handlerRegistration = ((HasValue) widget).addValueChangeHandler(new ValueChangeHandler() {
        @Override
        public void onValueChange(ValueChangeEvent event) {
          Object oldValue = proxy.get(property);
View Full Code Here

    * @see #touch touch
    * @see #isUpdateNeeded isUpdateNeeded
    */

  public HandlerRegistration addClickHandler(ClickHandler clickHandler) {
       HandlerRegistration result =
           addDomHandler(clickHandler, ClickEvent.getType());
       return result;  
   }
View Full Code Here

    return toggles.keySet().iterator();
  }

  @Override
  public boolean remove(Object toggle) {
    HandlerRegistration reg = toggles.remove(toggle);
    if (reg != null) {
      reg.removeHandler();
      return true;
    }
    return false;

  }
View Full Code Here

      }

      private void cleanUp() {
        RootPanel.get().remove(doubleLoadedImage);

        final HandlerRegistration onLoadReg = onLoadHandlerRegistration;
        final HandlerRegistration onErrorReg = onErrorHandlerRegistration;

        // HACK(user): There is a bug in GWT which stops us from removing a listener in HOSTED
        // mode inside the invoke context.  Put the remove in a deferred command to avoid this
        // error
        ScheduleCommand.addCommand(new Scheduler.Task() {
          public void execute() {
            onLoadReg.removeHandler();
            onErrorReg.removeHandler();
          }
        });

        onLoadHandlerRegistration = null;
        onErrorHandlerRegistration = null;
View Full Code Here

      d.setConstrainClient(false);
      portlet.setData("gxt.draggable", d);
    }
    d.setUseProxy(true);

    HandlerRegistration reg = handlerRegistrations.get(portlet.getId());
    if (reg != null) {
      reg.removeHandler();
    }
    d.addDragHandler(handler);

    d.setMoveAfterProxyDrag(false);
    d.setSizeProxyToSource(true);
View Full Code Here

    resizeHandlers.add(handler);
    if (isActive())
    { 
      ViewHandlers.ensureViewContainerResizeHandler(getContainer());
    }
    return new HandlerRegistration()
    {
      @Override
      public void removeHandler()
      {
        int index = resizeHandlers.indexOf(handler);
View Full Code Here

    if (isActive())
    { 
      ViewHandlers.ensureViewContainerOrientationChangeHandler(getContainer());
    }
   
    return new HandlerRegistration()
    {
      @Override
      public void removeHandler()
      {
        int index = orientationHandlers.indexOf(handler);
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.