Package com.google.gwt.user.client

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


  public boolean isAutoHideAllowEvent() {
    return autoHideAllowEvent;
  }

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

    PreviewEvent pe = new PreviewEvent(this, event);
    pe.setType(new EventType(e.getTypeInt()));
    pe.setEvent(e);

    lastX = pe.getClientX();
    lastY = pe.getClientY();
View Full Code Here


    grid.setCellSpacing(0);
    grid.setCellPadding(0);
    grid.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Event evt = DOM.eventGetCurrentEvent();
        ComponentEvent be = new ComponentEvent(DatePicker.this, evt);
        onDayClick(be);
      }
    });
    String s = GXT.isAriaEnabled() ? "<a role=gridcell tabindex=0><span role=presentation></span></a>"
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

    grid.setCellSpacing(0);
    grid.setCellPadding(0);
    grid.addClickHandler(new ClickHandler() {

      public void onClick(ClickEvent event) {
        Event evt = DOM.eventGetCurrentEvent();
        ComponentEvent be = new ComponentEvent(DatePicker.this, evt);
        onDayClick(be);
      }
    });
View Full Code Here

  public boolean isAutoHideAllowEvent() {
    return autoHideAllowEvent;
  }

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

    PreviewEvent pe = new PreviewEvent(this, event);
    pe.setType(new EventType(e.getTypeInt()));
    pe.setEvent(e);

    lastX = pe.getClientX();
    lastY = pe.getClientY();
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

            assertEquals(label.getElement(), event.getRelativeElement());
         }

      }, ClickEvent.getType());

      Event clickEvent = EventBuilder.create(Event.ONCLICK).build();

      // Act
      DomEvent.fireNativeEvent(clickEvent, label, label.getElement());

      // Assert
View Full Code Here

            assertEquals(label.getElement(), event.getRelativeElement());
         }

      }, ClickEvent.getType());

      Event clickEvent = EventBuilder.create(Event.ONCLICK).build();

      // Act
      DomEvent.fireNativeEvent(clickEvent, composite, composite.getElement());

      // Assert
View Full Code Here

    * @param suggestBox The targeted suggest box.
    * @param clickedItem The child widget to click inside the suggest box.
    *
    */
   public static void click(SuggestBox suggestBox, MenuItem clickedItem) {
      Event onClick = EventBuilder.create(Event.ONCLICK).setTarget(clickedItem).build();

      if (canApplyEvent(suggestBox, onClick)) {
         clickedItem.getScheduledCommand().execute();
      }
   }
View Full Code Here

   public static void emptyText(HasText hasTextWidget) {
      boolean changed = false;

      int baseLength = hasTextWidget.getText().length();
      for (int i = 0; i < baseLength; i++) {
         Event keyDownEvent = EventBuilder.create(Event.ONKEYDOWN).setKeyCode(
                  KeyCodes.KEY_BACKSPACE).build();
         dispatchEvent((IsWidget) hasTextWidget, keyDownEvent);

         boolean keyDownEventPreventDefault = JavaScriptObjects.getBoolean(keyDownEvent,
                  JsoProperties.EVENT_PREVENTDEFAULT);

         if (!keyDownEventPreventDefault) {
            hasTextWidget.setText(hasTextWidget.getText().substring(0,
                     hasTextWidget.getText().length() - 1));
            changed = true;
         }

      }

      // don't have to check if the event can be dispatch since it's check
      // before
      Event keyUpEvent = EventBuilder.create(Event.ONKEYUP).setKeyCode(KeyCodes.KEY_BACKSPACE).build();
      dispatchEvent((IsWidget) hasTextWidget, keyUpEvent);

      dispatchEvent((IsWidget) hasTextWidget, EventBuilder.create(Event.ONBLUR).build());

      if (changed) {
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.