Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.NativeEvent


        }
    }

    public void onTouchStart(TouchStartEvent event) {
        if (activeScrollDelegate == null && event.getTouches().length() == 1) {
            NativeEvent nativeEvent = event.getNativeEvent();
            doTouchStart(nativeEvent);
        } else {
            /*
             * Touch scroll is currenly on (possibly bouncing). Ignore.
             */
 
View Full Code Here


     * @see
     * com.google.gwt.event.dom.client.KeyPressHandler#onKeyPress(com.google
     * .gwt.event.dom.client.KeyPressEvent)
     */
    public void onKeyPress(KeyPressEvent event) {
        NativeEvent nativeEvent = event.getNativeEvent();
        int keyCode = nativeEvent.getKeyCode();
        if (keyCode == 0 && nativeEvent.getCharCode() == ' ') {
            // Provide a keyCode for space to be compatible with FireFox
            // keypress event
            keyCode = CHARCODE_SPACE;
        }
        if (handleKeyNavigation(keyCode,
View Full Code Here

    private boolean shiftKey;
    private boolean metaKey;
    private int button;
    private EventTarget relatedEventTarget;
    public EventClone(MouseEvent<?> mouseEvent) {
      NativeEvent evt = mouseEvent.getNativeEvent();
      type = evt.getType();
      screenX = evt.getScreenX();
      screenY = evt.getScreenY();
      clientX = evt.getClientX();
      clientY = evt.getClientY();
      ctrlKey = evt.getCtrlKey();
      altKey = evt.getAltKey();
      shiftKey = evt.getShiftKey();
      metaKey = evt.getMetaKey();
      button = evt.getButton();
      relatedEventTarget = evt.getRelatedEventTarget();
    }
View Full Code Here

      this.rowIndex = row;
      setOptions(delegate.getOptions(row));
    }

    if(!isShowing()) {
      final NativeEvent ne = event.getNativeEvent();
      showAt(ne.getClientX(), ne.getClientY());
    }
  }
View Full Code Here

 
    // Hook a toggle button.
    p.hookupControlToggle(new ToggleButton("Toggle"));
 
    // Fire an event on the hover bar.
    NativeEvent event = Document.get().createMouseOverEvent(0, 0, 0, 0, 0,
        false, false, false, false, 0, null);
    p.getHoverBar().getElement().dispatchEvent(event);
    assertEquals(State.WILL_SHOW, p.getState());
 
    // Programatically force refreshWidth to be called.
View Full Code Here

    // Hook a toggle button.
    p.hookupControlToggle(new ToggleButton("Toggle"));

    // Fire an event on the hover bar that will trigger a delayed timer.
    NativeEvent event = Document.get().createMouseOverEvent(0, 0, 0, 0, 0,
        false, false, false, false, 0, null);
    p.getHoverBar().getElement().dispatchEvent(event);
    assertEquals(State.WILL_SHOW, p.getState());

    // Programatically force refreshWidth to be called.
View Full Code Here

    // test keyboard support
    {
      t.setSelectedItem(t0);

      // disable keyboard support
      NativeEvent keyEvent0 = Document.get().createKeyPressEvent(false, false,
          false, false, KeyCodes.KEY_DOWN, 0);
      assertEquals(t0, t.getSelectedItem());
      t.setKeyboardSupportEnabled(false);
      t.getElement().dispatchEvent(keyEvent0);
      assertEquals(t0, t.getSelectedItem());

      // enable keyboard support
      NativeEvent keyEvent1 = Document.get().createKeyPressEvent(false, false,
          false, false, KeyCodes.KEY_DOWN, 0);
      assertEquals(t0, t.getSelectedItem());
      t.setKeyboardSupportEnabled(true);
      t.getElement().dispatchEvent(keyEvent1);
      assertEquals(t1, t.getSelectedItem());
View Full Code Here

        ret.add("clicked");
      }
    });

    // Fire an event on the element
    NativeEvent clickEvent = Document.get().createClickEvent(0, 0, 0, 0, 0,
        false, false, false, false);
    widget.getElement().dispatchEvent(clickEvent);
    assertEquals(1, ret.size());
    RootPanel.get().remove(widget);
  }
View Full Code Here

        ret.add("clicked");
      }
    });

    // Fire an event on the element
    NativeEvent clickEvent = Document.get().createClickEvent(0, 0, 0, 0, 0,
        false, false, false, false);
    widget.getElement().dispatchEvent(clickEvent);
    assertEquals(1, ret.size());
    RootPanel.get().remove(widget);
  }
View Full Code Here

    }

    int code = DOM.eventGetKeyCode(event);
    switch (code) {
    case KeyCodes.KEY_ENTER: {
      NativeEvent nativeEvent =
        Document.get().createClickEvent(
          0,
          0,
          0,
          0,
View Full Code Here

TOP

Related Classes of com.google.gwt.dom.client.NativeEvent

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.