Search in sources :

Example 26 with UiHandler

use of com.google.gwt.uibinder.client.UiHandler in project gerrit by GerritCodeReview.

the class ChangeScreen method onShowTaggedComments.

@UiHandler("showTaggedComments")
void onShowTaggedComments(@SuppressWarnings("unused") ClickEvent e) {
    showTaggedComments.setVisible(false);
    hideTaggedComments.setVisible(true);
    int n = history.getWidgetCount();
    for (int i = 0; i < n; i++) {
        Message m = ((Message) history.getWidget(i));
        m.setVisible(true);
    }
}
Also used : GerritUiExtensionPoint(com.google.gerrit.client.GerritUiExtensionPoint) UiHandler(com.google.gwt.uibinder.client.UiHandler)

Example 27 with UiHandler

use of com.google.gwt.uibinder.client.UiHandler in project gerrit by GerritCodeReview.

the class DraftBox method onSave.

@UiHandler("save")
void onSave(ClickEvent e) {
    e.stopPropagation();
    CallbackGroup group = new CallbackGroup();
    save(group);
    group.done();
}
Also used : CallbackGroup(com.google.gerrit.client.rpc.CallbackGroup) UiHandler(com.google.gwt.uibinder.client.UiHandler)

Example 28 with UiHandler

use of com.google.gwt.uibinder.client.UiHandler in project gerrit by GerritCodeReview.

the class PreferencesBox method onTheme.

@UiHandler("theme")
void onTheme(@SuppressWarnings("unused") ChangeEvent e) {
    Theme newTheme = getSelectedTheme();
    prefs.theme(newTheme);
    if (view != null) {
        ThemeLoader.loadTheme(newTheme, new GerritCallback<Void>() {

            @Override
            public void onSuccess(Void result) {
                view.operation(() -> {
                    if (getSelectedTheme() == newTheme && isAttached()) {
                        String t = newTheme.name().toLowerCase();
                        view.getCmFromSide(DisplaySide.A).setOption("theme", t);
                        view.getCmFromSide(DisplaySide.B).setOption("theme", t);
                        view.setThemeStyles(newTheme.isDark());
                    }
                });
            }
        });
    }
}
Also used : Theme(com.google.gerrit.extensions.client.Theme) UiHandler(com.google.gwt.uibinder.client.UiHandler)

Example 29 with UiHandler

use of com.google.gwt.uibinder.client.UiHandler in project GwtMobile by dennisjzh.

the class MainPage method onListSelectionChanged.

@UiHandler("list")
void onListSelectionChanged(SelectionChangedEvent e) {
    switch(e.getSelection()) {
        case 0:
            TransitionsPage transitions = new TransitionsPage();
            this.goTo(transitions);
            break;
        case 1:
            PanelsPage panels = new PanelsPage();
            this.goTo(panels);
            break;
        case 2:
            WidgetsPage widgets = new WidgetsPage();
            this.goTo(widgets);
            break;
        case 3:
            CommunicationPage comm = new CommunicationPage();
            this.goTo(comm);
            break;
    }
}
Also used : WidgetsPage(com.gwtmobile.ui.kitchensink.client.widget.WidgetsPage) PanelsPage(com.gwtmobile.ui.kitchensink.client.panel.PanelsPage) TransitionsPage(com.gwtmobile.ui.kitchensink.client.transition.TransitionsPage) CommunicationPage(com.gwtmobile.ui.kitchensink.client.communication.CommunicationPage) UiHandler(com.google.gwt.uibinder.client.UiHandler)

Example 30 with UiHandler

use of com.google.gwt.uibinder.client.UiHandler in project GwtMobile by dennisjzh.

the class RadioButtonPage method onRadioGroup2SelectionChanged.

@UiHandler("radiogroup2")
void onRadioGroup2SelectionChanged(SelectionChangedEvent e) {
    RadioButton radio = (RadioButton) radiogroup2.getWidget(e.getSelection());
    Utils.Console("group2 " + e.getSelection() + " " + radio.getText());
}
Also used : RadioButton(com.gwtmobile.ui.client.widgets.RadioButton) UiHandler(com.google.gwt.uibinder.client.UiHandler)

Aggregations

UiHandler (com.google.gwt.uibinder.client.UiHandler)30 GerritUiExtensionPoint (com.google.gerrit.client.GerritUiExtensionPoint)5 CallbackGroup (com.google.gerrit.client.rpc.CallbackGroup)3 Command (com.google.gwt.user.client.Command)3 AccessSection (com.google.gerrit.common.data.AccessSection)2 ProjectAccess (com.google.gerrit.common.data.ProjectAccess)2 Theme (com.google.gerrit.extensions.client.Theme)2 CheckBox (com.gwtmobile.ui.client.widgets.CheckBox)2 RadioButton (com.gwtmobile.ui.client.widgets.RadioButton)2 ErrorDialog (com.google.gerrit.client.ErrorDialog)1 EditPreferences (com.google.gerrit.client.account.EditPreferences)1 GerritCallback (com.google.gerrit.client.rpc.GerritCallback)1 NativeString (com.google.gerrit.client.rpc.NativeString)1 EditPreferencesInfo (com.google.gerrit.extensions.client.EditPreferencesInfo)1 KeyMapType (com.google.gerrit.extensions.client.KeyMapType)1 Change (com.google.gerrit.reviewdb.client.Change)1 JavaScriptObject (com.google.gwt.core.client.JavaScriptObject)1 JsArrayString (com.google.gwt.core.client.JsArrayString)1 DomEvent (com.google.gwt.event.dom.client.DomEvent)1 HasValueChangeHandlers (com.google.gwt.event.logical.shared.HasValueChangeHandlers)1