Package com.google.gwt.dom.client

Examples of com.google.gwt.dom.client.NativeEvent.preventDefault()


          if (event.getTypeInt() == com.google.gwt.user.client.Event.ONKEYDOWN)
          {
            NativeEvent nEvent = event.getNativeEvent();
            if (nEvent.getCtrlKey() && nEvent.getKeyCode() == 'R')
            {
              nEvent.preventDefault();
            }
           
            if (nEvent.getKeyCode() == 116)//F5
            {
              nEvent.preventDefault();
View Full Code Here


              nEvent.preventDefault();
            }
           
            if (nEvent.getKeyCode() == 116)//F5
            {
              nEvent.preventDefault();
            }
          }
        }
      });
    }
View Full Code Here

    NativeEvent nativeEvent = event.getNativeEvent();

    if (!event.isCanceled()
        && (event.getTypeInt() == Event.ONMOUSEDOWN)
        && isCaptionEvent(nativeEvent)) {
      nativeEvent.preventDefault();
    }

    super.onPreviewNativeEvent(event);
  }
View Full Code Here

                        String url = element.getAttribute("href");
                        String viewPath = getViewPath(url);
                        if (viewPath != null) {
                            GWT.log("Forcing History.newItem(\"" + viewPath + "\")...");
                            History.newItem(viewPath);
                            nativeEvent.preventDefault();
                        }
                    }
                }
            }
        }
View Full Code Here

        // We need to preventDefault() on mouseDown events (outside of the
        // DialogBox content) to keep text from being selected when it
        // is dragged.
        if(target.isOrHasChild(dragTarget)) {
          // Log.debug("ViewContainer.onPreviewNativeEvent() - preventing default..");
          ne.preventDefault();
        }
      case Event.ONMOUSEUP:
      case Event.ONMOUSEMOVE:
      case Event.ONCLICK:
      case Event.ONDBLCLICK: {
View Full Code Here

                                currentDrag
                                        .setElementOver((com.google.gwt.user.client.Element) targetElement);
                                currentDropHandler.dragOver(currentDrag);
                            }
                            // prevent text selection on IE
                            nativeEvent.preventDefault();
                            return;
                        default:
                            // just update element over and let the actual
                            // handling code do the thing
                            // ApplicationConnection.getConsole().log(
View Full Code Here

            case Event.ONMOUSEMOVE:
            case Event.ONTOUCHMOVE:
                if (currentDropHandler != null) {
                    currentDropHandler.dragOver(currentDrag);
                }
                nativeEvent.preventDefault();

                break;

            case Event.ONTOUCHEND:
                /* Avoid simulated event on drag end */
 
View Full Code Here

                                currentDrag
                                        .setElementOver((com.google.gwt.user.client.Element) targetElement);
                                currentDropHandler.dragOver(currentDrag);
                            }
                            // prevent text selection on IE
                            nativeEvent.preventDefault();
                            return;
                        default:
                            // just update element over and let the actual
                            // handling code do the thing
                            // ApplicationConnection.getConsole().log(
View Full Code Here

                if (currentDropHandler != null) {
                    currentDrag
                            .setElementOver((com.google.gwt.user.client.Element) targetElement);
                    currentDropHandler.dragOver(currentDrag);
                }
                nativeEvent.preventDefault();

                break;

            case Event.ONTOUCHEND:
                /* Avoid simulated event on drag end */
 
View Full Code Here

    NativeEvent nativeEvent = event.getNativeEvent();

    if (!event.isCanceled()
        && (event.getTypeInt() == Event.ONMOUSEDOWN)
        && isCaptionEvent(nativeEvent)) {
      nativeEvent.preventDefault();
    }

    super.onPreviewNativeEvent(event);
  }
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.