Search in sources :

Example 6 with NativeEvent

use of com.google.gwt.dom.client.NativeEvent in project rstudio by rstudio.

the class ModalDialogBase method onEscapeKeyDown.

protected void onEscapeKeyDown(Event.NativePreviewEvent event) {
    NativeEvent nativeEvent = event.getNativeEvent();
    if (cancelButton_ == null) {
        if ((okButton_ != null) && okButton_.isEnabled()) {
            nativeEvent.preventDefault();
            nativeEvent.stopPropagation();
            event.cancel();
            okButton_.click();
        }
    } else if (cancelButton_.isEnabled()) {
        nativeEvent.preventDefault();
        nativeEvent.stopPropagation();
        event.cancel();
        cancelButton_.click();
    }
}
Also used : NativeEvent(com.google.gwt.dom.client.NativeEvent)

Example 7 with NativeEvent

use of com.google.gwt.dom.client.NativeEvent in project rstudio by rstudio.

the class InlineToolbarButton method click.

public void click() {
    NativeEvent clickEvent = Document.get().createClickEvent(1, 0, 0, 0, 0, false, false, false, false);
    DomEvent.fireNativeEvent(clickEvent, hasHandlers_);
}
Also used : NativeEvent(com.google.gwt.dom.client.NativeEvent)

Example 8 with NativeEvent

use of com.google.gwt.dom.client.NativeEvent in project rstudio by rstudio.

the class ManipulatorPopupPanel method onPreviewNativeEvent.

@Override
public void onPreviewNativeEvent(Event.NativePreviewEvent event) {
    if (event.getTypeInt() == Event.ONKEYDOWN) {
        NativeEvent nativeEvent = event.getNativeEvent();
        switch(nativeEvent.getKeyCode()) {
            case KeyCodes.KEY_ESCAPE:
                nativeEvent.preventDefault();
                nativeEvent.stopPropagation();
                event.cancel();
                hideMiniDialog();
                break;
        }
    }
}
Also used : NativeEvent(com.google.gwt.dom.client.NativeEvent)

Example 9 with NativeEvent

use of com.google.gwt.dom.client.NativeEvent in project rstudio by rstudio.

the class WindowEx method fireFocusHandlers.

private static void fireFocusHandlers() {
    NativeEvent nativeEvent = Document.get().createFocusEvent();
    FocusEvent.fireNativeEvent(nativeEvent, new HasHandlers() {

        public void fireEvent(GwtEvent<?> event) {
            handlers_.fireEvent(event);
        }
    });
}
Also used : HasHandlers(com.google.gwt.event.shared.HasHandlers) NativeEvent(com.google.gwt.dom.client.NativeEvent)

Example 10 with NativeEvent

use of com.google.gwt.dom.client.NativeEvent in project rstudio by rstudio.

the class AceEditorBackgroundLinkHighlighter method onAceClick.

@Override
public void onAceClick(AceClickEvent clickEvent) {
    NativeEvent event = clickEvent.getNativeEvent();
    if (!isRequiredClickModifier(event))
        return;
    MarkerRegistration marker = getTargetedMarker(event);
    if (marker == null)
        return;
    clickEvent.stopPropagation();
    clickEvent.preventDefault();
    // will be opened in the background
    if (BrowseCap.isMacintosh() && !BrowseCap.isMacintoshDesktop()) {
        endDetectClickTarget();
        String url = editor_.getTextForRange(marker.getRange());
        navigateToUrl(url);
    }
}
Also used : NativeEvent(com.google.gwt.dom.client.NativeEvent)

Aggregations

NativeEvent (com.google.gwt.dom.client.NativeEvent)35 Element (com.google.gwt.dom.client.Element)7 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)3 JsArrayString (com.google.gwt.core.client.JsArrayString)3 TableRowElement (com.google.gwt.dom.client.TableRowElement)3 Column (com.google.gwt.user.cellview.client.Column)3 D3 (org.opennms.features.topology.app.internal.gwt.client.d3.D3)3 MarqueeSelectHandler (org.opennms.features.topology.app.internal.gwt.client.handler.MarqueeSelectHandler)3 PanHandler (org.opennms.features.topology.app.internal.gwt.client.handler.PanHandler)3 SVGGElement (org.opennms.features.topology.app.internal.gwt.client.svg.SVGGElement)3 Context (com.google.gwt.cell.client.Cell.Context)2 ValueUpdater (com.google.gwt.cell.client.ValueUpdater)2 JsArray (com.google.gwt.core.client.JsArray)2 ScheduledCommand (com.google.gwt.core.client.Scheduler.ScheduledCommand)2 EventTarget (com.google.gwt.dom.client.EventTarget)2 ImageElement (com.google.gwt.dom.client.ImageElement)2 HasHandlers (com.google.gwt.event.shared.HasHandlers)2 ImageResource (com.google.gwt.resources.client.ImageResource)2 ListHandler (com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler)2 HTML (com.google.gwt.user.client.ui.HTML)2