Search in sources :

Example 6 with InlineHyperlink

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

the class Header method init.

void init(PreferencesAction pa, List<InlineHyperlink> links, List<WebLinkInfo> webLinks) {
    prefsAction = pa;
    prefsAction.setPartner(preferences);
    for (InlineHyperlink link : links) {
        linkPanel.add(link);
    }
    for (WebLinkInfo webLink : webLinks) {
        linkPanel.add(webLink.toAnchor());
    }
}
Also used : InlineHyperlink(com.google.gerrit.client.ui.InlineHyperlink) WebLinkInfo(com.google.gerrit.client.info.WebLinkInfo)

Example 7 with InlineHyperlink

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

the class Unified method getSideBySideDiffLink.

private List<InlineHyperlink> getSideBySideDiffLink() {
    InlineHyperlink toSideBySideDiffLink = new InlineHyperlink();
    toSideBySideDiffLink.setHTML(new ImageResourceRenderer().render(Gerrit.RESOURCES.sideBySideDiff()));
    toSideBySideDiffLink.setTargetHistoryToken(Dispatcher.toSideBySide(base, revision, path));
    toSideBySideDiffLink.setTitle(PatchUtil.C.sideBySideDiff());
    return Collections.singletonList(toSideBySideDiffLink);
}
Also used : InlineHyperlink(com.google.gerrit.client.ui.InlineHyperlink) ImageResourceRenderer(com.google.gwt.user.client.ui.ImageResourceRenderer)

Example 8 with InlineHyperlink

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

the class SideBySide method getUnifiedDiffLink.

private List<InlineHyperlink> getUnifiedDiffLink() {
    InlineHyperlink toUnifiedDiffLink = new InlineHyperlink();
    toUnifiedDiffLink.setHTML(new ImageResourceRenderer().render(Gerrit.RESOURCES.unifiedDiff()));
    toUnifiedDiffLink.setTargetHistoryToken(Dispatcher.toUnified(base, revision, path));
    toUnifiedDiffLink.setTitle(PatchUtil.C.unifiedDiff());
    return Collections.singletonList(toUnifiedDiffLink);
}
Also used : InlineHyperlink(com.google.gerrit.client.ui.InlineHyperlink) ImageResourceRenderer(com.google.gwt.user.client.ui.ImageResourceRenderer)

Example 9 with InlineHyperlink

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

the class AccountDashboardScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    table = new ChangeTable() {

        {
            keysNavigation.add(new KeyCommand(0, 'R', Util.C.keyReloadSearch()) {

                @Override
                public void onKeyPress(final KeyPressEvent event) {
                    Gerrit.display(getToken());
                }
            });
        }
    };
    table.addStyleName(Gerrit.RESOURCES.css().accountDashboard());
    outgoing = new ChangeTable.Section();
    incoming = new ChangeTable.Section();
    closed = new ChangeTable.Section();
    String who = mine ? "self" : ownerId.toString();
    outgoing.setTitleWidget(new InlineHyperlink(Util.C.outgoingReviews(), PageLinks.toChangeQuery(queryOutgoing(who))));
    incoming.setTitleWidget(new InlineHyperlink(Util.C.incomingReviews(), PageLinks.toChangeQuery(queryIncoming(who))));
    incoming.setHighlightUnreviewed(mine);
    closed.setTitleWidget(new InlineHyperlink(Util.C.recentlyClosed(), PageLinks.toChangeQuery(queryClosed(who))));
    table.addSection(outgoing);
    table.addSection(incoming);
    table.addSection(closed);
    add(table);
    table.setSavePointerId("owner:" + ownerId);
}
Also used : KeyPressEvent(com.google.gwt.event.dom.client.KeyPressEvent) InlineHyperlink(com.google.gerrit.client.ui.InlineHyperlink) KeyCommand(com.google.gwtexpui.globalkey.client.KeyCommand)

Aggregations

InlineHyperlink (com.google.gerrit.client.ui.InlineHyperlink)9 ImageResourceRenderer (com.google.gwt.user.client.ui.ImageResourceRenderer)3 WebLinkInfo (com.google.gerrit.client.info.WebLinkInfo)2 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)2 DiffObject (com.google.gerrit.client.DiffObject)1 AccountInfo (com.google.gerrit.client.info.AccountInfo)1 RevisionInfo (com.google.gerrit.client.info.ChangeInfo.RevisionInfo)1 SmallHeading (com.google.gerrit.client.ui.SmallHeading)1 PatchSet (com.google.gerrit.reviewdb.client.PatchSet)1 KeyPressEvent (com.google.gwt.event.dom.client.KeyPressEvent)1 FormPanel (com.google.gwt.user.client.ui.FormPanel)1 Grid (com.google.gwt.user.client.ui.Grid)1 HTML (com.google.gwt.user.client.ui.HTML)1 CellFormatter (com.google.gwt.user.client.ui.HTMLTable.CellFormatter)1 GlobalKey (com.google.gwtexpui.globalkey.client.GlobalKey)1 KeyCommand (com.google.gwtexpui.globalkey.client.KeyCommand)1