Search in sources :

Example 1 with Hyperlink

use of com.google.gerrit.client.ui.Hyperlink in project gerrit by GerritCodeReview.

the class MyAgreementsScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    agreements = new AgreementTable();
    add(agreements);
    add(new Hyperlink(Util.C.newAgreement(), PageLinks.SETTINGS_NEW_AGREEMENT));
}
Also used : Hyperlink(com.google.gerrit.client.ui.Hyperlink)

Example 2 with Hyperlink

use of com.google.gerrit.client.ui.Hyperlink in project gerrit by GerritCodeReview.

the class PagedSingleListScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    prev = new Hyperlink(Util.C.pagedChangeListPrev(), true, "");
    prev.setVisible(false);
    next = new Hyperlink(Util.C.pagedChangeListNext(), true, "");
    next.setVisible(false);
    table = new ChangeTable() {

        {
            keysNavigation.add(new DoLinkCommand(0, 'p', Util.C.changeTablePagePrev(), prev), new DoLinkCommand(0, 'n', Util.C.changeTablePageNext(), next));
            keysNavigation.add(new DoLinkCommand(0, '[', Util.C.changeTablePagePrev(), prev), new DoLinkCommand(0, ']', Util.C.changeTablePageNext(), next));
            keysNavigation.add(new KeyCommand(0, 'R', Util.C.keyReloadSearch()) {

                @Override
                public void onKeyPress(final KeyPressEvent event) {
                    Gerrit.display(getToken());
                }
            });
        }
    };
    section = new ChangeTable.Section();
    table.addSection(section);
    table.setSavePointerId(anchorPrefix);
    add(table);
    final HorizontalPanel buttons = new HorizontalPanel();
    buttons.setStyleName(Gerrit.RESOURCES.css().changeTablePrevNextLinks());
    buttons.add(prev);
    buttons.add(next);
    add(buttons);
}
Also used : KeyPressEvent(com.google.gwt.event.dom.client.KeyPressEvent) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) KeyCommand(com.google.gwtexpui.globalkey.client.KeyCommand) Hyperlink(com.google.gerrit.client.ui.Hyperlink)

Aggregations

Hyperlink (com.google.gerrit.client.ui.Hyperlink)2 KeyPressEvent (com.google.gwt.event.dom.client.KeyPressEvent)1 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)1 KeyCommand (com.google.gwtexpui.globalkey.client.KeyCommand)1