Search in sources :

Example 16 with SmallHeading

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

the class ProjectInfoScreen method initProjectActions.

private void initProjectActions(ConfigInfo info) {
    actionsGrid.clear(true);
    actionsGrid.removeAllRows();
    boolean showCreateChange = Gerrit.isSignedIn();
    NativeMap<ActionInfo> actions = info.actions();
    if (actions == null) {
        actions = NativeMap.create().cast();
    }
    if (actions.isEmpty() && !showCreateChange) {
        return;
    }
    actions.copyKeysIntoChildren("id");
    actionsGrid.addHeader(new SmallHeading(AdminConstants.I.headingProjectCommands()));
    FlowPanel actionsPanel = new FlowPanel();
    actionsPanel.setStyleName(Gerrit.RESOURCES.css().projectActions());
    actionsPanel.setVisible(true);
    actionsGrid.add(AdminConstants.I.headingCommands(), actionsPanel);
    for (String id : actions.keySet()) {
        actionsPanel.add(new ActionButton(getProjectKey(), actions.get(id)));
    }
    // HEAD. This would have to happen on the server side.
    if (showCreateChange) {
        actionsPanel.add(createChangeAction());
    }
    if (isOwner && configVisible) {
        actionsPanel.add(createEditConfigAction());
    }
}
Also used : SmallHeading(com.google.gerrit.client.ui.SmallHeading) ActionButton(com.google.gerrit.client.actions.ActionButton) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) ActionInfo(com.google.gerrit.client.info.ActionInfo)

Example 17 with SmallHeading

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

the class AccountGroupMembersScreen method initNoMembersInfo.

private void initNoMembersInfo() {
    noMembersInfo = new FlowPanel();
    noMembersInfo.setVisible(false);
    noMembersInfo.add(new SmallHeading(AdminConstants.I.noMembersInfo()));
    add(noMembersInfo);
}
Also used : SmallHeading(com.google.gerrit.client.ui.SmallHeading) FlowPanel(com.google.gwt.user.client.ui.FlowPanel)

Aggregations

SmallHeading (com.google.gerrit.client.ui.SmallHeading)17 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)8 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)8 Button (com.google.gwt.user.client.ui.Button)7 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)7 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)6 OnEditEnabler (com.google.gerrit.client.ui.OnEditEnabler)4 GerritCallback (com.google.gerrit.client.rpc.GerritCallback)3 NpTextBox (com.google.gwtexpui.globalkey.client.NpTextBox)3 VoidResult (com.google.gerrit.client.VoidResult)2 AccountGroupSuggestOracle (com.google.gerrit.client.ui.AccountGroupSuggestOracle)2 AddMemberBox (com.google.gerrit.client.ui.AddMemberBox)2 FormPanel (com.google.gwt.user.client.ui.FormPanel)2 HTML (com.google.gwt.user.client.ui.HTML)2 InlineLabel (com.google.gwt.user.client.ui.InlineLabel)2 Label (com.google.gwt.user.client.ui.Label)2 RadioButton (com.google.gwt.user.client.ui.RadioButton)2 NpTextArea (com.google.gwtexpui.globalkey.client.NpTextArea)2 ActionButton (com.google.gerrit.client.actions.ActionButton)1 AccountInfo (com.google.gerrit.client.info.AccountInfo)1