Search in sources :

Example 26 with FlowPanel

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

the class ProjectListPopup method initPopup.

public void initPopup(final String popupText, final String currentPageLink) {
    createWidgets(popupText, currentPageLink);
    final FlowPanel pfp = new FlowPanel();
    pfp.add(filterPanel);
    pfp.add(closeTop);
    sp = new ScrollPanel(projectsTab);
    sp.setSize("100%", "100%");
    pfp.add(sp);
    pfp.add(closeBottom);
    popup.setWidget(pfp);
    popup.setHeight("100%");
    popupPosition = getPositionCallback();
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel) ScrollPanel(com.google.gwt.user.client.ui.ScrollPanel)

Example 27 with FlowPanel

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

the class CommitBox method setParents.

private void setParents(JsArray<CommitInfo> commits) {
    setVisible(firstParent, true);
    TableRowElement next = firstParent;
    TableRowElement previous = null;
    for (CommitInfo c : Natives.asList(commits)) {
        if (next == firstParent) {
            CopyableLabel copyLabel = getCommitLabel(c);
            parentCommits.add(copyLabel);
            setWebLinks(parentWebLinks, c);
        } else {
            next.appendChild(DOM.createTD());
            Element td1 = DOM.createTD();
            td1.appendChild(getCommitLabel(c).getElement());
            next.appendChild(td1);
            FlowPanel linksPanel = new FlowPanel();
            linksPanel.addStyleName(style.parentWebLink());
            setWebLinks(linksPanel, c);
            Element td2 = DOM.createTD();
            td2.appendChild(linksPanel.getElement());
            next.appendChild(td2);
            previous.getParentElement().insertAfter(next, previous);
        }
        previous = next;
        next = DOM.createTR().cast();
    }
}
Also used : TableRowElement(com.google.gwt.dom.client.TableRowElement) TableRowElement(com.google.gwt.dom.client.TableRowElement) Element(com.google.gwt.dom.client.Element) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) CommitInfo(com.google.gerrit.client.info.ChangeInfo.CommitInfo) CopyableLabel(com.google.gwtexpui.clippy.client.CopyableLabel)

Example 28 with FlowPanel

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

the class ProjectTagsScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    initPageHeader();
    prev = PagingHyperlink.createPrev();
    prev.setVisible(false);
    next = PagingHyperlink.createNext();
    next.setVisible(false);
    addPanel = new FlowPanel();
    Grid addGrid = new Grid(2, 2);
    addGrid.setStyleName(Gerrit.RESOURCES.css().addBranch());
    int texBoxLength = 50;
    nameTxtBox = new HintTextBox();
    nameTxtBox.setVisibleLength(texBoxLength);
    nameTxtBox.setHintText(AdminConstants.I.defaultTagName());
    nameTxtBox.addKeyPressHandler(new KeyPressHandler() {

        @Override
        public void onKeyPress(KeyPressEvent event) {
            if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
                doAddNewTag();
            }
        }
    });
    addGrid.setText(0, 0, AdminConstants.I.columnTagName() + ":");
    addGrid.setWidget(0, 1, nameTxtBox);
    irevTxtBox = new HintTextBox();
    irevTxtBox.setVisibleLength(texBoxLength);
    irevTxtBox.setHintText(AdminConstants.I.defaultRevisionSpec());
    irevTxtBox.addKeyPressHandler(new KeyPressHandler() {

        @Override
        public void onKeyPress(KeyPressEvent event) {
            if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
                doAddNewTag();
            }
        }
    });
    addGrid.setText(1, 0, AdminConstants.I.initialRevision() + ":");
    addGrid.setWidget(1, 1, irevTxtBox);
    addTag = new Button(AdminConstants.I.buttonAddTag());
    addTag.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            doAddNewTag();
        }
    });
    addPanel.add(addGrid);
    addPanel.add(addTag);
    tagTable = new TagsTable();
    delTag = new Button(AdminConstants.I.buttonDeleteTag());
    delTag.setStyleName(Gerrit.RESOURCES.css().branchTableDeleteButton());
    delTag.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(ClickEvent event) {
            tagTable.deleteChecked();
        }
    });
    HorizontalPanel buttons = new HorizontalPanel();
    buttons.setStyleName(Gerrit.RESOURCES.css().branchTablePrevNextLinks());
    buttons.add(delTag);
    buttons.add(prev);
    buttons.add(next);
    add(tagTable);
    add(buttons);
    add(addPanel);
}
Also used : HintTextBox(com.google.gerrit.client.ui.HintTextBox) KeyPressHandler(com.google.gwt.event.dom.client.KeyPressHandler) ClickHandler(com.google.gwt.event.dom.client.ClickHandler) KeyPressEvent(com.google.gwt.event.dom.client.KeyPressEvent) Button(com.google.gwt.user.client.ui.Button) Grid(com.google.gwt.user.client.ui.Grid) ClickEvent(com.google.gwt.event.dom.client.ClickEvent) FlowPanel(com.google.gwt.user.client.ui.FlowPanel) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel)

Example 29 with FlowPanel

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

the class ProjectDashboardsScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    dashes = new DashboardsTable(project);
    FlowPanel fp = new FlowPanel();
    fp.add(dashes);
    add(fp);
    dashes.setSavePointerId("dashboards/project/" + getProjectKey().get());
    display();
}
Also used : DashboardsTable(com.google.gerrit.client.dashboards.DashboardsTable) FlowPanel(com.google.gwt.user.client.ui.FlowPanel)

Example 30 with FlowPanel

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

the class DownloadPanel method setupWidgets.

private void setupWidgets() {
    if (!urls.isEmpty()) {
        urls.select(Gerrit.getUserPreferences().downloadScheme());
        FlowPanel p = new FlowPanel();
        p.setStyleName(Gerrit.RESOURCES.css().downloadLinkHeader());
        p.add(commands);
        final InlineLabel glue = new InlineLabel();
        glue.setStyleName(Gerrit.RESOURCES.css().downloadLinkHeaderGap());
        p.add(glue);
        p.add(urls);
        add(p);
        add(copyLabel);
    }
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel) InlineLabel(com.google.gwt.user.client.ui.InlineLabel)

Aggregations

FlowPanel (com.google.gwt.user.client.ui.FlowPanel)68 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)15 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)15 Button (com.google.gwt.user.client.ui.Button)14 Grid (com.google.gwt.user.client.ui.Grid)10 Label (com.google.gwt.user.client.ui.Label)7 SmallHeading (com.google.gerrit.client.ui.SmallHeading)6 Element (com.google.gwt.dom.client.Element)6 CheckBox (com.google.gwt.user.client.ui.CheckBox)6 CellFormatter (com.google.gwt.user.client.ui.HTMLTable.CellFormatter)6 InlineLabel (com.google.gwt.user.client.ui.InlineLabel)6 ComplexPanel (com.google.gwt.user.client.ui.ComplexPanel)5 HTML (com.google.gwt.user.client.ui.HTML)5 Image (com.google.gwt.user.client.ui.Image)5 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)5 Test (org.junit.Test)5 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)4 ActionButton (com.google.gerrit.client.actions.ActionButton)3 AccountInfo (com.google.gerrit.client.info.AccountInfo)3 NativeString (com.google.gerrit.client.rpc.NativeString)3