Search in sources :

Example 11 with InlineLabel

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

the class Screen method onInitUI.

protected void onInitUI() {
    final FlowPanel me = (FlowPanel) getWidget();
    me.add(header = new Grid(1, Cols.values().length));
    me.add(body);
    headerText = new InlineLabel();
    if (titleWidget == null) {
        titleWidget = headerText;
    }
    FlowPanel title = new FlowPanel();
    title.add(titleWidget);
    title.setStyleName(Gerrit.RESOURCES.css().screenHeader());
    header.setWidget(0, Cols.Title.ordinal(), title);
    header.setStyleName(Gerrit.RESOURCES.css().screenHeader());
    header.getCellFormatter().setHorizontalAlignment(0, Cols.FarEast.ordinal(), HasHorizontalAlignment.ALIGN_RIGHT);
    // force FarEast all the way to the right
    header.getCellFormatter().setWidth(0, Cols.FarEast.ordinal(), "100%");
}
Also used : Grid(com.google.gwt.user.client.ui.Grid) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) InlineLabel(com.google.gwt.user.client.ui.InlineLabel)

Example 12 with InlineLabel

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

the class Gerrit method populateBottomMenu.

private static void populateBottomMenu(RootPanel btmmenu, HostPageData hpd) {
    String vs = hpd.version;
    if (vs == null || vs.isEmpty()) {
        vs = "dev";
    }
    btmmenu.add(new InlineHTML(M.poweredBy(vs)));
    if (info().gerrit().webUis().contains(UiType.POLYGERRIT)) {
        btmmenu.add(new InlineLabel(" | "));
        uiSwitcherLink = new Anchor(C.newUi(), getUiSwitcherUrl(History.getToken()));
        uiSwitcherLink.setStyleName("");
        btmmenu.add(uiSwitcherLink);
    }
    String reportBugUrl = info().gerrit().reportBugUrl();
    if (reportBugUrl != null) {
        String reportBugText = info().gerrit().reportBugText();
        Anchor a = new Anchor(reportBugText == null ? C.reportBug() : reportBugText, reportBugUrl);
        a.setTarget("_blank");
        a.setStyleName("");
        btmmenu.add(new InlineLabel(" | "));
        btmmenu.add(a);
    }
    btmmenu.add(new InlineLabel(" | "));
    btmmenu.add(new InlineLabel(C.keyHelp()));
}
Also used : Anchor(com.google.gwt.user.client.ui.Anchor) InlineHTML(com.google.gwt.user.client.ui.InlineHTML) InlineLabel(com.google.gwt.user.client.ui.InlineLabel)

Example 13 with InlineLabel

use of com.google.gwt.user.client.ui.InlineLabel 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 14 with InlineLabel

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

the class RelatedChangesTab method setError.

void setError(String message) {
    panel.setWidget(new InlineLabel(message));
    view = null;
    project = null;
}
Also used : InlineLabel(com.google.gwt.user.client.ui.InlineLabel)

Example 15 with InlineLabel

use of com.google.gwt.user.client.ui.InlineLabel in project openremote by openremote.

the class FormMessages method appendMessage.

public void appendMessage(Form form, String message) {
    if (getParent() == null)
        insertInto(form);
    panel.add(new InlineLabel(message));
    panel.getElement().appendChild(Document.get().createBRElement());
    setVisible(true);
}
Also used : InlineLabel(com.google.gwt.user.client.ui.InlineLabel)

Aggregations

InlineLabel (com.google.gwt.user.client.ui.InlineLabel)17 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)6 Anchor (com.google.gwt.user.client.ui.Anchor)4 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)4 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)4 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)3 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)3 RestApi (com.google.gerrit.client.rpc.RestApi)2 EntryPoint (com.google.gwt.core.client.EntryPoint)2 JSONValue (com.google.gwt.json.client.JSONValue)2 Grid (com.google.gwt.user.client.ui.Grid)2 Image (com.google.gwt.user.client.ui.Image)2 AccountInfo (com.google.gerrit.client.info.AccountInfo)1 LabelInfo (com.google.gerrit.client.info.ChangeInfo.LabelInfo)1 BranchLink (com.google.gerrit.client.ui.BranchLink)1 OnEditEnabler (com.google.gerrit.client.ui.OnEditEnabler)1 ProjectLink (com.google.gerrit.client.ui.ProjectLink)1 SmallHeading (com.google.gerrit.client.ui.SmallHeading)1 ReviewCategoryStrategy (com.google.gerrit.extensions.client.GeneralPreferencesInfo.ReviewCategoryStrategy)1 Change (com.google.gerrit.reviewdb.client.Change)1