Search in sources :

Example 51 with HorizontalPanel

use of com.google.gwt.user.client.ui.HorizontalPanel in project zxing by zxing.

the class Generator method onModuleLoad.

@Override
public void onModuleLoad() {
    loadGenerators();
    setupLeftPanel();
    topPanel.getElement().setId("leftpanel");
    Widget leftPanel = topPanel;
    HorizontalPanel mainPanel = new HorizontalPanel();
    mainPanel.add(leftPanel);
    SimplePanel div2 = new SimplePanel();
    div2.add(result);
    div2.getElement().setId("innerresult");
    SimplePanel div = new SimplePanel();
    div.add(div2);
    div.getElement().setId("imageresult");
    urlResult.getElement().setId("urlresult");
    rawTextResult.getElement().setId("rawtextresult");
    rawTextResult.setCharacterWidth(50);
    rawTextResult.setVisibleLines(8);
    downloadText.getElement().setId("downloadText");
    rightPanel.add(div);
    rightPanel.add(downloadText);
    rightPanel.add(urlResult);
    rightPanel.add(rawTextResult);
    mainPanel.add(rightPanel);
    mainPanel.getElement().setId("mainpanel");
    RootPanel.get("ui").add(mainPanel);
    setWidget(1);
    invalidateBarcode();
}
Also used : Widget(com.google.gwt.user.client.ui.Widget) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) SimplePanel(com.google.gwt.user.client.ui.SimplePanel)

Example 52 with HorizontalPanel

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

the class PagedSingleListScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    prev = new Hyperlink(Util.C.pagedChangeListPrev(), true, "");
    prev.setVisible(false);
    next = new Hyperlink(Util.C.pagedChangeListNext(), true, "");
    next.setVisible(false);
    table = new ChangeTable() {

        {
            keysNavigation.add(new DoLinkCommand(0, 'p', Util.C.changeTablePagePrev(), prev), new DoLinkCommand(0, 'n', Util.C.changeTablePageNext(), next));
            keysNavigation.add(new DoLinkCommand(0, '[', Util.C.changeTablePagePrev(), prev), new DoLinkCommand(0, ']', Util.C.changeTablePageNext(), next));
            keysNavigation.add(new KeyCommand(0, 'R', Util.C.keyReloadSearch()) {

                @Override
                public void onKeyPress(final KeyPressEvent event) {
                    Gerrit.display(getToken());
                }
            });
        }
    };
    section = new ChangeTable.Section();
    table.addSection(section);
    table.setSavePointerId(anchorPrefix);
    add(table);
    final HorizontalPanel buttons = new HorizontalPanel();
    buttons.setStyleName(Gerrit.RESOURCES.css().changeTablePrevNextLinks());
    buttons.add(prev);
    buttons.add(next);
    add(buttons);
}
Also used : KeyPressEvent(com.google.gwt.event.dom.client.KeyPressEvent) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) KeyCommand(com.google.gwtexpui.globalkey.client.KeyCommand) Hyperlink(com.google.gerrit.client.ui.Hyperlink)

Example 53 with HorizontalPanel

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

the class MenuScreen method onInitUI.

@Override
protected void onInitUI() {
    super.onInitUI();
    HorizontalPanel hp = new HorizontalPanel();
    hp.add(menu);
    hp.add(body);
    super.add(hp);
}
Also used : HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel)

Example 54 with HorizontalPanel

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

the class ProjectListPopup method createWidgets.

private void createWidgets(final String popupText, final String currentPageLink) {
    filterPanel = new HorizontalPanel();
    filterPanel.setStyleName(Gerrit.RESOURCES.css().projectFilterPanel());
    final Label filterLabel = new Label(com.google.gerrit.client.admin.AdminConstants.I.projectFilter());
    filterLabel.setStyleName(Gerrit.RESOURCES.css().projectFilterLabel());
    filterPanel.add(filterLabel);
    filterTxt = new NpTextBox();
    filterTxt.addKeyUpHandler(new KeyUpHandler() {

        @Override
        public void onKeyUp(KeyUpEvent event) {
            Query q = new Query(filterTxt.getValue());
            if (!match.equals(q.qMatch)) {
                if (query == null) {
                    q.run();
                }
                query = q;
            }
        }
    });
    filterPanel.add(filterTxt);
    projectsTab = new HighlightingProjectsTable() {

        @Override
        protected void movePointerTo(final int row, final boolean scroll) {
            super.movePointerTo(row, scroll);
            onMovePointerTo(getRowItem(row).name());
        }

        @Override
        protected void onOpenRow(final int row) {
            super.onOpenRow(row);
            openRow(getRowItem(row).name());
        }
    };
    projectsTab.setSavePointerId(currentPageLink);
    closeTop = createCloseButton();
    closeBottom = createCloseButton();
    popup = new DialogBox();
    popup.setModal(false);
    popup.setText(popupText);
}
Also used : KeyUpEvent(com.google.gwt.event.dom.client.KeyUpEvent) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) Label(com.google.gwt.user.client.ui.Label) KeyUpHandler(com.google.gwt.event.dom.client.KeyUpHandler) NpTextBox(com.google.gwtexpui.globalkey.client.NpTextBox) DialogBox(com.google.gwt.user.client.ui.DialogBox)

Example 55 with HorizontalPanel

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

the class ProjectBranchesScreen method onInitUI.

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

        @Override
        public void onKeyPress(KeyPressEvent event) {
            if (event.getNativeEvent().getKeyCode() == KeyCodes.KEY_ENTER) {
                doAddNewBranch();
            }
        }
    });
    addGrid.setText(0, 0, AdminConstants.I.columnBranchName() + ":");
    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) {
                doAddNewBranch();
            }
        }
    });
    addGrid.setText(1, 0, AdminConstants.I.initialRevision() + ":");
    addGrid.setWidget(1, 1, irevTxtBox);
    addBranch = new Button(AdminConstants.I.buttonAddBranch());
    addBranch.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(final ClickEvent event) {
            doAddNewBranch();
        }
    });
    addPanel.add(addGrid);
    addPanel.add(addBranch);
    branchTable = new BranchesTable();
    delBranch = new Button(AdminConstants.I.buttonDeleteBranch());
    delBranch.setStyleName(Gerrit.RESOURCES.css().branchTableDeleteButton());
    delBranch.addClickHandler(new ClickHandler() {

        @Override
        public void onClick(final ClickEvent event) {
            branchTable.deleteChecked();
        }
    });
    HorizontalPanel buttons = new HorizontalPanel();
    buttons.setStyleName(Gerrit.RESOURCES.css().branchTablePrevNextLinks());
    buttons.add(delBranch);
    buttons.add(prev);
    buttons.add(next);
    add(branchTable);
    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) ActionButton(com.google.gerrit.client.actions.ActionButton) 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)

Aggregations

HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)75 Label (com.google.gwt.user.client.ui.Label)25 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)24 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)21 Image (com.google.gwt.user.client.ui.Image)15 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)14 SmallLabel (org.uberfire.ext.widgets.common.client.common.SmallLabel)11 HTML (com.google.gwt.user.client.ui.HTML)8 FlowPanel (com.google.gwt.user.client.ui.FlowPanel)7 Widget (com.google.gwt.user.client.ui.Widget)7 NpTextBox (com.google.gwtexpui.globalkey.client.NpTextBox)7 Button (org.gwtbootstrap3.client.ui.Button)7 ChangeEvent (com.google.gwt.event.dom.client.ChangeEvent)6 ChangeHandler (com.google.gwt.event.dom.client.ChangeHandler)6 TextBox (com.google.gwt.user.client.ui.TextBox)6 KeyUpEvent (com.google.gwt.event.dom.client.KeyUpEvent)5 KeyUpHandler (com.google.gwt.event.dom.client.KeyUpHandler)5 TextBox (org.gwtbootstrap3.client.ui.TextBox)5 InfoPopup (org.uberfire.ext.widgets.common.client.common.InfoPopup)5 KeyPressEvent (com.google.gwt.event.dom.client.KeyPressEvent)4