Search in sources :

Example 6 with CopyableLabel

use of com.google.gwtexpui.clippy.client.CopyableLabel in project gerrit by GerritCodeReview.

the class DownloadBox method renderCommands.

private void renderCommands() {
    commandTable.removeAllRows();
    if (scheme.getItemCount() > 0) {
        FetchInfo fetchInfo = fetch.get(scheme.getValue(scheme.getSelectedIndex()));
        for (String commandName : fetchInfo.commands().sortedKeys()) {
            CopyableLabel copyLabel = new CopyableLabel(fetchInfo.command(commandName));
            copyLabel.setStyleName(Gerrit.RESOURCES.css().downloadBoxCopyLabel());
            insertCommand(commandName, copyLabel);
        }
    }
    if (change.revision(revision).commit().parents().length() == 1) {
        insertPatch();
    }
    insertArchive();
    insertCommand(null, scheme);
}
Also used : FetchInfo(com.google.gerrit.client.info.ChangeInfo.FetchInfo) CopyableLabel(com.google.gwtexpui.clippy.client.CopyableLabel)

Aggregations

CopyableLabel (com.google.gwtexpui.clippy.client.CopyableLabel)6 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)3 Grid (com.google.gwt.user.client.ui.Grid)2 CellFormatter (com.google.gwt.user.client.ui.HTMLTable.CellFormatter)2 CommitInfo (com.google.gerrit.client.info.ChangeInfo.CommitInfo)1 FetchInfo (com.google.gerrit.client.info.ChangeInfo.FetchInfo)1 NativeString (com.google.gerrit.client.rpc.NativeString)1 SmallHeading (com.google.gerrit.client.ui.SmallHeading)1 Element (com.google.gwt.dom.client.Element)1 TableRowElement (com.google.gwt.dom.client.TableRowElement)1 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)1 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)1 Anchor (com.google.gwt.user.client.ui.Anchor)1 Button (com.google.gwt.user.client.ui.Button)1 Label (com.google.gwt.user.client.ui.Label)1 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)1