Package com.google.gwt.user.client.Event

Examples of com.google.gwt.user.client.Event.NativePreviewHandler


      historyHandlerRegistration = null;
    }

    // Create handlers if showing.
    if (showing) {
      nativePreviewHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {
        public void onPreviewNativeEvent(NativePreviewEvent event) {
          previewNativeEvent(event);
        }
      });
      historyHandlerRegistration = History.addValueChangeHandler(new ValueChangeHandler<String>() {
View Full Code Here


  /**
   *
   */
  private void initKeyboardShortcuts() {
    Event.addNativePreviewHandler(new NativePreviewHandler() {

      @Override
      public void onPreviewNativeEvent(NativePreviewEvent event) {
        /**
         * Chrome does not fire a 'keypress' event with ctr+c, ctrl+v,
View Full Code Here

    animation.setState(showing);
    this.showing = showing;

    // Create or remove the native preview handler
    if (showing) {
      nativePreviewHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {
  public void onPreviewNativeEvent(NativePreviewEvent event) {
    previewNativeEvent(event);
  }
      });
    } else if (nativePreviewHandlerRegistration != null) {
View Full Code Here

        final int eventType = Event.as(startEvent).getTypeInt();
        if (handleDragEvents
                && (eventType == Event.ONMOUSEDOWN || eventType == Event.ONTOUCHSTART)) {
            // only really start drag event on mousemove
            deferredStartRegistration = Event
                    .addNativePreviewHandler(new NativePreviewHandler() {

                        public void onPreviewNativeEvent(
                                NativePreviewEvent event) {
                            int typeInt = event.getTypeInt();
                            switch (typeInt) {
View Full Code Here

                        log.log(Level.SEVERE, "Exception thrown in master timer handler.", ex);
                    }
                }
            }
        });
        Event.addNativePreviewHandler(new NativePreviewHandler()
        {
            /*
             * This event will be called A LOT. Do not add anything non-trivial to it! It is used to determine
             * inactivity.
             */
 
View Full Code Here

    return currentIndex;
  }

  public void startHandlingKeys() {
    stopHandlingKeys();
    nativePreviewHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {
      @Override
      public void onPreviewNativeEvent(NativePreviewEvent event) {
        Event nativeEvent = Event.as(event.getNativeEvent());
        if (nativeEvent.getTypeInt() == Event.ONKEYDOWN) {
          switch (nativeEvent.getKeyCode()) {
View Full Code Here

    }
    this.showing = showing;

    // Create or remove the native preview handler
    if (showing) {
      nativePreviewHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {
        public void onPreviewNativeEvent(NativePreviewEvent event) {
          previewNativeEvent(event);
        }
      });
      historyHandlerRegistration = History.addValueChangeHandler(new ValueChangeHandler<String>() {
View Full Code Here

      RootPanel.get().add(this);
      getLayout().onAttach();
      getLayout().fillParent();
     
      nativePreviewHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {
        public void onPreviewNativeEvent(NativePreviewEvent event) {
          previewNativeEvent(event);
        }
      });
View Full Code Here

      historyHandlerRegistration = null;
    }

    // Create handlers if showing.
    if (showing) {
      nativePreviewHandlerRegistration = Event.addNativePreviewHandler(new NativePreviewHandler() {
        public void onPreviewNativeEvent(NativePreviewEvent event) {
          previewNativeEvent(event);
        }
      });
      historyHandlerRegistration = History.addValueChangeHandler(new ValueChangeHandler<String>() {
View Full Code Here

TOP

Related Classes of com.google.gwt.user.client.Event.NativePreviewHandler

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.