Tabnine Logo
Element.dispatchEvent
Code IndexAdd Tabnine to your IDE (free)

How to use
dispatchEvent
method
in
com.google.gwt.user.client.Element

Best Java code snippets using com.google.gwt.user.client.Element.dispatchEvent (Showing top 11 results out of 315)

origin: com.google.gwt/gwt-servlet

/**
 * Called when the user finishes clicking on this button. The default behavior
 * is to fire the click event to listeners. Subclasses that override
 * {@link #onClickStart()} should override this method to restore the normal
 * widget display.
 */
protected void onClick() {
 // Allow the click we're about to synthesize to pass through to the
 // superclass and containing elements. Element.dispatchEvent() is
 // synchronous, so we simply set and clear the flag within this method.
 allowClick = true;
 // Mouse coordinates are not always available (e.g., when the click is
 // caused by a keyboard event).
 NativeEvent evt = Document.get().createClickEvent(1, 0, 0, 0, 0, false,
   false, false, false);
 getElement().dispatchEvent(evt);
 allowClick = false;
}
origin: geogebra/geogebra

/**
 * Called when the user finishes clicking on this button. The default
 * behavior is to fire the click event to listeners. Subclasses that
 * override {@link #onClickStart()} should override this method to restore
 * the normal widget display.
 */
protected void onClick() {
  // Allow the click we're about to synthesize to pass through to the
  // superclass and containing elements. Element.dispatchEvent() is
  // synchronous, so we simply set and clear the flag within this method.
  allowClick = true;
  // Mouse coordinates are not always available (e.g., when the click is
  // caused by a keyboard event).
  NativeEvent evt = Document.get().createClickEvent(1, 0, 0, 0, 0, false,
      false, false, false);
  getElement().dispatchEvent(evt);
  allowClick = false;
}
origin: net.wetheinter/gwt-user

/**
 * Called when the user finishes clicking on this button. The default behavior
 * is to fire the click event to listeners. Subclasses that override
 * {@link #onClickStart()} should override this method to restore the normal
 * widget display.
 */
protected void onClick() {
 // Allow the click we're about to synthesize to pass through to the
 // superclass and containing elements. Element.dispatchEvent() is
 // synchronous, so we simply set and clear the flag within this method.
 allowClick = true;
 // Mouse coordinates are not always available (e.g., when the click is
 // caused by a keyboard event).
 NativeEvent evt = Document.get().createClickEvent(1, 0, 0, 0, 0, false,
   false, false, false);
 getElement().dispatchEvent(evt);
 allowClick = false;
}
origin: com.vaadin.external.gwt/gwt-user

/**
 * Called when the user finishes clicking on this button. The default behavior
 * is to fire the click event to listeners. Subclasses that override
 * {@link #onClickStart()} should override this method to restore the normal
 * widget display.
 */
protected void onClick() {
 // Allow the click we're about to synthesize to pass through to the
 // superclass and containing elements. Element.dispatchEvent() is
 // synchronous, so we simply set and clear the flag within this method.
 allowClick = true;
 // Mouse coordinates are not always available (e.g., when the click is
 // caused by a keyboard event).
 NativeEvent evt = Document.get().createClickEvent(1, 0, 0, 0, 0, false,
   false, false, false);
 getElement().dispatchEvent(evt);
 allowClick = false;
}
origin: sk.seges.acris/acris-recorder-client-core

public void fireEvent() {
  prepareEvent();
  NativeEvent event = createEvent(el);
  if (el != null) {
    el.dispatchEvent(event);
  } else {
    //well, probably generated id - bad luck
    GWT.log("Element was not found for event: " + toString(true, false));
  }
}
origin: com.vaadin.addon/vaadin-touchkit-agpl

public void onTouchEnd(TouchEndEvent event) {
  if (touchStarted) {
    event.preventDefault();
    event.stopPropagation();
    NativeEvent nativeEvent = event.getNativeEvent();
    NativeEvent evt = Document.get().createClickEvent(1,
        nativeEvent.getScreenX(), nativeEvent.getScreenY(),
        nativeEvent.getClientX(), nativeEvent.getClientY(), false,
        false, false, false);
    getElement().dispatchEvent(evt);
    touchStarted = false;
    fastClickAt = new Date();
  }
}
origin: com.vaadin.addon/vaadin-touchkit-agpl

@Override
public void onTouchEnd(TouchEndEvent event) {
  if (touchStarted) {
    event.preventDefault();
    event.stopPropagation();
    NativeEvent nativeEvent = event.getNativeEvent();
    NativeEvent evt = Document.get().createClickEvent(1,
        nativeEvent.getScreenX(), nativeEvent.getScreenY(),
        nativeEvent.getClientX(), nativeEvent.getClientY(), false,
        false, false, false);
    getElement().dispatchEvent(evt);
    touchStarted = false;
    fastClickAt = new Date();
  }
}
origin: dennisjzh/GwtMobile-UI

public static void loadUrl(String url) {
  Anchor a = new Anchor("", url);
  RootLayoutPanel.get().add(a);
  NativeEvent event = Document.get().createClickEvent(1, 1, 1, 1, 1, false, false, false, false);
  a.getElement().dispatchEvent(event);
  RootLayoutPanel.get().remove(a);
}
origin: info.magnolia.ui/magnolia-ui-vaadin-common-widgets

  @Override
  public void onMultiTap(MultiTapEvent event) {
    if (BrowserInfo.get().isTouchDevice()) {
      final NativeEvent doubleClickEvent =
          Document.get().createDblClickEvent(
              0,
              event.getTouchStarts().get(0).get(0).getPageX(),
              event.getTouchStarts().get(0).get(0).getPageY(),
              event.getTouchStarts().get(0).get(0).getPageX(),
              event.getTouchStarts().get(0).get(0).getPageY(),
              false,
              false,
              false,
              false);
      getElement().dispatchEvent(doubleClickEvent);
    }
  }
}, MultiTapEvent.getType());
origin: com.haulmont.cuba/cuba-web-toolkit

target.getElement().dispatchEvent(createMouseDownEvent(event));
return null;
origin: org.vaadin.addons/dragdroplayouts

target.getElement().dispatchEvent(createMouseDownEvent(event));
return null;
com.google.gwt.user.clientElementdispatchEvent

Popular methods of Element

  • getStyle
  • setAttribute
  • appendChild
  • setId
  • getParentElement
  • cast
  • setInnerText
  • getId
  • setInnerHTML
  • addClassName
  • getAttribute
  • getInnerHTML
  • getAttribute,
  • getInnerHTML,
  • getFirstChildElement,
  • getInnerText,
  • getClientWidth,
  • removeChild,
  • getChildCount,
  • getOffsetHeight,
  • removeAttribute,
  • removeClassName

Popular in Java

  • Creating JSON documents from java classes using gson
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • getApplicationContext (Context)
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • ResultSet (java.sql)
    An interface for an object which represents a database table entry, returned as the result of the qu
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • 14 Best Plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now