Package com.google.gwt.dom.client

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


               int mod = KeyboardShortcut.getModifierValue(ne);
               if ((mod == KeyboardShortcut.META ||
                   (mod == KeyboardShortcut.CTRL && !BrowseCap.hasMetaKey()))
                   && ne.getKeyCode() == 'R')
               {
                  ne.preventDefault();
                  ne.stopPropagation();
                  commands.refreshHtmlPreview().execute();
               }
            }
         }
View Full Code Here


               ThemedButton defaultButton = defaultOverrideButton_ == null
                                            ? okButton_
                                            : defaultOverrideButton_;
               if ((defaultButton != null) && defaultButton.isEnabled())
               {
                  nativeEvent.preventDefault();
                  nativeEvent.stopPropagation();
                  event.cancel();
                  defaultButton.click();
               }
               break;
View Full Code Here

      NativeEvent nativeEvent = event.getNativeEvent();
      if (cancelButton_ == null)
      {
         if ((okButton_ != null) && okButton_.isEnabled())
         {
            nativeEvent.preventDefault();
            nativeEvent.stopPropagation();
            event.cancel();
            okButton_.click();
         }
      }
View Full Code Here

            okButton_.click();
         }
      }
      else if (cancelButton_.isEnabled())
      {
         nativeEvent.preventDefault();
         nativeEvent.stopPropagation();
         event.cancel();
         cancelButton_.click();
      }
   }
View Full Code Here

        return;
      final Element target = event.getEventTarget().cast();

      // always squelch default handling (when there is a handler)
      event.stopPropagation();
      event.preventDefault();
     
      // find the table cell element then get its parent and cast to row
      TableCellElement tableCell = findNearestParentCell(target);
      if (tableCell == null)
         return;        
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

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

                break;

            case Event.ONMOUSEUP:
                endDrag();
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

        void dragFinished();
    }

    private static NativeEvent getEventAndPreventPropagation( final NativePreviewEvent event ) {
        final NativeEvent nativeEvent = event.getNativeEvent();
        nativeEvent.preventDefault();
        nativeEvent.stopPropagation();
        return nativeEvent;
    }

    private static void setLine( final Style style,
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.