Examples of preventDefault()


Examples of com.google.gwt.user.client.Event.preventDefault()

    @Override
    public void run(int i) {
        Event e = Event.getCurrentEvent();
        switch(i) {
        case 83: //CTRL+S
        if (e != null) e.preventDefault();
        CommandEvent.fire(new CurrentDocumentSaveCommand(false));
      break;
      case 79: //CTRL+O
        if (e != null) e.preventDefault();
        CommandEvent.fire(new SystemShowDialogCommand(DynamicFileListDialog.class));
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

        case 83: //CTRL+S
        if (e != null) e.preventDefault();
        CommandEvent.fire(new CurrentDocumentSaveCommand(false));
      break;
      case 79: //CTRL+O
        if (e != null) e.preventDefault();
        CommandEvent.fire(new SystemShowDialogCommand(DynamicFileListDialog.class));
      break;
      case 78: //CTRL+N
        if (e != null) e.preventDefault();
        CommandEvent.fire(new NewDocumentStartCommand());
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

      case 79: //CTRL+O
        if (e != null) e.preventDefault();
        CommandEvent.fire(new SystemShowDialogCommand(DynamicFileListDialog.class));
      break;
      case 78: //CTRL+N
        if (e != null) e.preventDefault();
        CommandEvent.fire(new NewDocumentStartCommand());
      break;
      }
    }
    };
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

                    if (display.hasElement(e) || browser.hasElement(e)
                            || DOM.eventGetType(event) == Event.ONMOUSEUP
                            || DOM.eventGetType(event) == Event.ONMOUSEMOVE) {

                        // Prevent default browser behaviour
                        event.preventDefault();

                        // Notify listeners of event
                        onBrowserEvent(event);
                    }
                }
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

    preview = new BaseEventPreview() {
      @Override
      public boolean onPreview(NativePreviewEvent event) {
        Event e = event.getNativeEvent().<Event> cast();
        e.preventDefault();
        switch (event.getTypeInt()) {
          case Event.ONKEYDOWN:
            if (dragging && e.getKeyCode() == KeyCodes.KEY_ESCAPE) {
              cancelDrag();
            }
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

  protected void onMouseDown(RowClickEvent event) {
    Event e = event.getEvent();
    XElement target = e.getEventTarget().cast();
    if (appearance.isExpandElement(target)) {
      e.stopPropagation();
      e.preventDefault();
      XElement row = grid.getView().findRow(target).cast();
      toggleRow(row);
    }
  }
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

  protected void onMouseDown(RowClickEvent event) {
    Event e = event.getEvent();
    XElement target = e.getEventTarget().cast();
    if (appearance.isExpandElement(target)) {
      e.stopPropagation();
      e.preventDefault();
      XElement row = grid.getView().findRow(target).cast();
      toggleRow(row);
    }
  }
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

    preview = new BaseEventPreview() {
      @Override
      public boolean onPreview(NativePreviewEvent event) {
        Event e = event.getNativeEvent().<Event> cast();
        e.preventDefault();
        switch (event.getTypeInt()) {
          case Event.ONKEYDOWN:
            if (dragging && e.getKeyCode() == KeyCodes.KEY_ESCAPE) {
              cancelDrag();
            }
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

                // a modifier key is held (ctrl to open in new tab etc)
                Event e = DOM.eventGetCurrentEvent();
                if (!e.getCtrlKey() && !e.getAltKey() && !e.getShiftKey()
                        && !e.getMetaKey()) {
                    Window.open(src, target, features);
                    e.preventDefault();
                }
            }
        }
    }
View Full Code Here

Examples of com.google.gwt.user.client.Event.preventDefault()

 
  protected void onContextMenu(int row) {
      if(contextMenu != null) {
          Event event = Event.getCurrentEvent();
            event.cancelBubble(true);
            event.preventDefault();
            contextMenuTarget = items.get(row);
            contextMenu.load(AsyncCallbackFactory.<Void>defaultNewInstance());
            contextMenu.showPopup(null);
      }
    }
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.