Search in sources :

Example 1 with Button

use of com.gwtmobile.ui.client.widgets.Button in project GwtMobile by dennisjzh.

the class KitchenSink method emulateClickOnBackButton.

protected void emulateClickOnBackButton() {
    HTMLPanel current = (HTMLPanel) PageHistory.Instance.current().getWidget();
    HeaderPanel header = (HeaderPanel) current.getWidget(0);
    Button left = header.getLeftButton();
    NativeEvent event = Document.get().createClickEvent(1, 1, 1, 1, 1, false, false, false, false);
    left.getElement().dispatchEvent(event);
}
Also used : HeaderPanel(com.gwtmobile.ui.client.widgets.HeaderPanel) Button(com.gwtmobile.ui.client.widgets.Button) HTMLPanel(com.google.gwt.user.client.ui.HTMLPanel) NativeEvent(com.google.gwt.dom.client.NativeEvent)

Aggregations

NativeEvent (com.google.gwt.dom.client.NativeEvent)1 HTMLPanel (com.google.gwt.user.client.ui.HTMLPanel)1 Button (com.gwtmobile.ui.client.widgets.Button)1 HeaderPanel (com.gwtmobile.ui.client.widgets.HeaderPanel)1