Search in sources :

Example 6 with FormPanel

use of com.google.gwt.user.client.ui.FormPanel 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)

Aggregations

FormPanel (com.google.gwt.user.client.ui.FormPanel)6 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)3 HTML (com.google.gwt.user.client.ui.HTML)3 AccountInfo (com.google.gerrit.client.info.AccountInfo)2 SmallHeading (com.google.gerrit.client.ui.SmallHeading)2 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)2 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)2 Button (com.google.gwt.user.client.ui.Button)2 SubmitCompleteEvent (com.google.gwt.user.client.ui.FormPanel.SubmitCompleteEvent)2 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)2 NpTextBox (com.google.gwtexpui.globalkey.client.NpTextBox)2 ErrorDialog (com.google.gerrit.client.ErrorDialog)1 GerritCallback (com.google.gerrit.client.rpc.GerritCallback)1 NativeString (com.google.gerrit.client.rpc.NativeString)1 InlineHyperlink (com.google.gerrit.client.ui.InlineHyperlink)1 OnEditEnabler (com.google.gerrit.client.ui.OnEditEnabler)1 ScheduledCommand (com.google.gwt.core.client.Scheduler.ScheduledCommand)1 Element (com.google.gwt.dom.client.Element)1 JSONString (com.google.gwt.json.client.JSONString)1 SubmitCompleteHandler (com.google.gwt.user.client.ui.FormPanel.SubmitCompleteHandler)1