Package com.google.gwt.user.client

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


        } else if (localName.equals("page")) {
            return SingletonIterator.makeIterator(context.getConfiguration().getHostPage());
        } else if (localName.equals("source")) {
            return SingletonIterator.makeIterator(context.getController().getSourceNode());
        } else if (localName.equals("event")) {
            Event event = (Event)context.getController().getUserData("Saxon-CE", "current-event");
            return SingletonIterator.makeIterator(new JSObjectValue(event));
        } else if (localName.equals("parse-xml")) {
          String data = argument[0].evaluateAsString(context).toString();
          return convertFromJavaScript(XMLDOM.parseXML(data), context.getConfiguration());
        }else {
View Full Code Here


    if (dragging == ACTIVELY_DRAGGING || dragging == DRAGGING_NO_MOVEMENT_YET) {
      // Ignore additional mouse buttons depressed while still dragging
      return;
    }

    Event event = DOM.eventGetCurrentEvent();
    int button = DOM.eventGetButton(event);
    // TODO remove Event.UNDEFINED after GWT Issue 1535 is fixed
    if (button != Event.BUTTON_LEFT && button != Event.UNDEFINED) {
      return;
    }
View Full Code Here

    //      throw ex;
    //    }
  }

  public void onMouseUp(Widget sender, int x, int y) {
    Event event = DOM.eventGetCurrentEvent();
    int button = DOM.eventGetButton(event);
    // TODO Remove Event.UNDEFINED after GWT Issue 1535 is fixed
    if (button != Event.BUTTON_LEFT && button != Event.UNDEFINED) {
      return;
    }
View Full Code Here

            }

            if (features.length() > 0) {
                // if 'special features' are set, use window.open(), unless
                // 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

            handledByFocus = false;
            handleHideEvent();
        }

        private void handleShowHide(DomEvent domEvent, boolean isFocused) {
            Event event = Event.as(domEvent.getNativeEvent());
            Element element = Element.as(event.getEventTarget());

            // We can ignore move event if it's handled by move or over already
            if (currentElement == element && handledByFocus == true) {
                return;
            }
View Full Code Here

    root.add(contentPane);
    FocusPanel wrap = new FocusPanel(root);
    controlKeyHandler = new IntRunnable() {
    @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));
      break;
      case 78: //CTRL+N
        if (e != null) e.preventDefault();
        CommandEvent.fire(new NewDocumentStartCommand());
      break;
      }
    }
    };
View Full Code Here

     
       menu.setPopupPositionAndShow(new PositionCallback() {
          @Override
          public void setPosition(int offsetWidth, int offsetHeight)
          {
             Event event = Event.getCurrentEvent();
             menu.setPopupPosition(event.getClientX(), event.getClientY());    
          }
       });
   }
View Full Code Here

      DNDManager.get().handleDragEnd(this, e);
    }
  }

  private void onDraggableDragMove(DragMoveEvent de) {
    Event e = de.getNativeEvent().cast();
    de.setX(e.getClientX() + 12 + XDOM.getBodyScrollLeft());
    de.setY(e.getClientY() + 12 + XDOM.getBodyScrollTop());

    DndDragMoveEvent me = new DndDragMoveEvent(widget, this, de, statusProxy, data);
    DNDManager.get().handleDragMove(this, me);
  }
View Full Code Here

  public boolean isAutoHideAllowEvent() {
    return autoHideAllowEvent;
  }

  public void onPreviewNativeEvent(NativePreviewEvent event) {
    Event e = event.getNativeEvent().cast();

    lastX = e.getClientX();
    lastY = e.getClientY();

    if (autoHide && onAutoHidePreview(event)) {
      if (autoHideAllowEvent) {
        event.cancel();
      }
View Full Code Here

        if (!cm.isHidden(i)) {
          before = i;
          break;
        }
      }
      Event event = ce.getEvent();
      int x = event.getClientX();
      Region r = header.el().getRegion();
      int hw = splitterWidth;

      el().setY(container.el().getY());
      el().setHeight(container.getHeight());
View Full Code Here

TOP

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

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.