Search in sources :

Example 51 with VerticalPanel

use of com.google.gwt.user.client.ui.VerticalPanel in project gerrit by GerritCodeReview.

the class NewAgreementScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    setPageTitle(Util.C.newAgreement());
    final FlowPanel formBody = new FlowPanel();
    radios = new VerticalPanel();
    formBody.add(radios);
    agreementGroup = new FlowPanel();
    agreementGroup.add(new SmallHeading(Util.C.newAgreementReviewLegalHeading()));
    agreementHtml = new HTML();
    agreementHtml.setStyleName(Gerrit.RESOURCES.css().contributorAgreementLegal());
    agreementGroup.add(agreementHtml);
    formBody.add(agreementGroup);
    finalGroup = new VerticalPanel();
    finalGroup.add(new SmallHeading(Util.C.newAgreementCompleteHeading()));
    final FlowPanel fp = new FlowPanel();
    yesIAgreeBox = new NpTextBox();
    yesIAgreeBox.setVisibleLength(Util.C.newAgreementIAGREE().length() + 8);
    yesIAgreeBox.setMaxLength(Util.C.newAgreementIAGREE().length());
    fp.add(yesIAgreeBox);
    fp.add(new InlineLabel(Util.M.enterIAGREE(Util.C.newAgreementIAGREE())));
    finalGroup.add(fp);
    submit = new Button(Util.C.buttonSubmitNewAgreement());
    submit.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(final ClickEvent event) {
            doSign();
        }
    });
    finalGroup.add(submit);
    formBody.add(finalGroup);
    new OnEditEnabler(submit, yesIAgreeBox);
    final FormPanel form = new FormPanel();
    form.add(formBody);
    add(form);
}
Also used : SmallHeading(com.google.gerrit.client.ui.SmallHeading) VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) FormPanel(com.google.gwt.user.client.ui.FormPanel) RadioButton(com.google.gwt.user.client.ui.RadioButton) Button(com.google.gwt.user.client.ui.Button) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) InlineLabel(com.google.gwt.user.client.ui.InlineLabel) HTML(com.google.gwt.user.client.ui.HTML) OnEditEnabler(com.google.gerrit.client.ui.OnEditEnabler) NpTextBox(com.google.gwtexpui.globalkey.client.NpTextBox)

Example 52 with VerticalPanel

use of com.google.gwt.user.client.ui.VerticalPanel in project gerrit by GerritCodeReview.

the class ProjectInfoScreen method initDescription.

private void initDescription() {
    final VerticalPanel vp = new VerticalPanel();
    vp.add(new SmallHeading(AdminConstants.I.headingDescription()));
    descTxt = new NpTextArea();
    descTxt.setVisibleLines(6);
    descTxt.setCharacterWidth(60);
    vp.add(descTxt);
    add(vp);
    saveEnabler = new OnEditEnabler(saveProject);
    saveEnabler.listenTo(descTxt);
}
Also used : SmallHeading(com.google.gerrit.client.ui.SmallHeading) VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) NpTextArea(com.google.gwtexpui.globalkey.client.NpTextArea) OnEditEnabler(com.google.gerrit.client.ui.OnEditEnabler)

Example 53 with VerticalPanel

use of com.google.gwt.user.client.ui.VerticalPanel in project gerrit by GerritCodeReview.

the class AccountGroupInfoScreen method initUUID.

private void initUUID() {
    final VerticalPanel groupUUIDPanel = new VerticalPanel();
    groupUUIDPanel.setStyleName(Gerrit.RESOURCES.css().groupUUIDPanel());
    groupUUIDPanel.add(new SmallHeading(AdminConstants.I.headingGroupUUID()));
    groupUUIDLabel = new CopyableLabel("");
    groupUUIDPanel.add(groupUUIDLabel);
    add(groupUUIDPanel);
}
Also used : SmallHeading(com.google.gerrit.client.ui.SmallHeading) VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) CopyableLabel(com.google.gwtexpui.clippy.client.CopyableLabel)

Example 54 with VerticalPanel

use of com.google.gwt.user.client.ui.VerticalPanel in project gerrit by GerritCodeReview.

the class AccountGroupInfoScreen method initDescription.

private void initDescription() {
    final VerticalPanel vp = new VerticalPanel();
    vp.setStyleName(Gerrit.RESOURCES.css().groupDescriptionPanel());
    vp.add(new SmallHeading(AdminConstants.I.headingDescription()));
    descTxt = new NpTextArea();
    descTxt.setVisibleLines(6);
    descTxt.setCharacterWidth(60);
    vp.add(descTxt);
    saveDesc = new Button(AdminConstants.I.buttonSaveDescription());
    saveDesc.setEnabled(false);
    saveDesc.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(final ClickEvent event) {
            final String txt = descTxt.getText().trim();
            GroupApi.setGroupDescription(getGroupUUID(), txt, new GerritCallback<VoidResult>() {

                @Override
                public void onSuccess(final VoidResult result) {
                    saveDesc.setEnabled(false);
                }
            });
        }
    });
    vp.add(saveDesc);
    add(vp);
}
Also used : SmallHeading(com.google.gerrit.client.ui.SmallHeading) GerritCallback(com.google.gerrit.client.rpc.GerritCallback) VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) VoidResult(com.google.gerrit.client.VoidResult) Button(com.google.gwt.user.client.ui.Button) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) NpTextArea(com.google.gwtexpui.globalkey.client.NpTextArea)

Example 55 with VerticalPanel

use of com.google.gwt.user.client.ui.VerticalPanel in project gerrit by GerritCodeReview.

the class AccountGroupInfoScreen method initName.

private void initName() {
    final VerticalPanel groupNamePanel = new VerticalPanel();
    groupNamePanel.setStyleName(Gerrit.RESOURCES.css().groupNamePanel());
    groupNameTxt = new NpTextBox();
    groupNameTxt.setStyleName(Gerrit.RESOURCES.css().groupNameTextBox());
    groupNameTxt.setVisibleLength(60);
    groupNamePanel.add(groupNameTxt);
    saveName = new Button(AdminConstants.I.buttonRenameGroup());
    saveName.setEnabled(false);
    saveName.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(final ClickEvent event) {
            final String newName = groupNameTxt.getText().trim();
            GroupApi.renameGroup(getGroupUUID(), newName, new GerritCallback<com.google.gerrit.client.VoidResult>() {

                @Override
                public void onSuccess(final com.google.gerrit.client.VoidResult result) {
                    saveName.setEnabled(false);
                    setPageTitle(AdminMessages.I.group(newName));
                    groupNameTxt.setText(newName);
                    if (getGroupUUID().equals(getOwnerGroupUUID())) {
                        ownerTxt.setText(newName);
                    }
                }
            });
        }
    });
    groupNamePanel.add(saveName);
    add(groupNamePanel);
}
Also used : VoidResult(com.google.gerrit.client.VoidResult) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) NpTextBox(com.google.gwtexpui.globalkey.client.NpTextBox) GerritCallback(com.google.gerrit.client.rpc.GerritCallback) VerticalPanel(com.google.gwt.user.client.ui.VerticalPanel) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) Button(com.google.gwt.user.client.ui.Button)

Aggregations

VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)63 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)19 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)19 Label (com.google.gwt.user.client.ui.Label)18 HTML (com.google.gwt.user.client.ui.HTML)14 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)12 CheckBox (com.google.gwt.user.client.ui.CheckBox)9 SmallHeading (com.google.gerrit.client.ui.SmallHeading)7 Button (com.google.gwt.user.client.ui.Button)7 ScrollPanel (com.google.gwt.user.client.ui.ScrollPanel)7 TextBox (com.google.gwt.user.client.ui.TextBox)7 FlexTable (com.google.gwt.user.client.ui.FlexTable)6 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)6 SimplePanel (com.google.gwt.user.client.ui.SimplePanel)6 GerritCallback (com.google.gerrit.client.rpc.GerritCallback)5 OnEditEnabler (com.google.gerrit.client.ui.OnEditEnabler)4 Grid (com.google.gwt.user.client.ui.Grid)4 Image (com.google.gwt.user.client.ui.Image)4 InlineLabel (com.google.gwt.user.client.ui.InlineLabel)4 TabMenu (cz.metacentrum.perun.webgui.widgets.TabMenu)4