Search in sources :

Example 6 with Row

use of org.gwtbootstrap3.client.ui.Row in project kie-wb-common by kiegroup.

the class DataSourceSelectorViewImpl method init.

@PostConstruct
private void init() {
    dataGrid.setHeight("200px");
    dataGrid.setColumnPickerButtonVisible(false);
    dataGrid.setEmptyTableCaption(translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_NoAvailableDataSourcesMessage));
    Column<DataSourceSelectorPageRow, String> nameColumn = new Column<DataSourceSelectorPageRow, String>(new TextCell()) {

        @Override
        public String getValue(DataSourceSelectorPageRow row) {
            return row.getDataSourceDefInfo().getName();
        }
    };
    dataGrid.addColumn(nameColumn, translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_DataSourceColumn));
    Column<DataSourceSelectorPageRow, String> selectorColumn = new Column<DataSourceSelectorPageRow, String>(new ButtonCell(ButtonType.PRIMARY, ButtonSize.SMALL)) {

        @Override
        public String getValue(DataSourceSelectorPageRow row) {
            return translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_SelectButton);
        }
    };
    selectorColumn.setFieldUpdater(new FieldUpdater<DataSourceSelectorPageRow, String>() {

        @Override
        public void update(int index, DataSourceSelectorPageRow row, String value) {
            selectedRow = row;
            cancelNextHiddenEvent = true;
            modal.hide();
            presenter.onSelect();
        }
    });
    dataGrid.addColumn(selectorColumn, "");
    mainPanel.add(dataGrid);
    this.modal = new BaseModal();
    this.modal.setTitle(translationService.getTranslation(DataSourceManagementConstants.DataSourceSelector_Title));
    this.modal.setBody(this);
    this.modal.addHiddenHandler(new ModalHiddenHandler() {

        @Override
        public void onHidden(ModalHiddenEvent evt) {
            if (!cancelNextHiddenEvent) {
                presenter.onClose();
            }
            cancelNextHiddenEvent = false;
        }
    });
}
Also used : BaseModal(org.uberfire.ext.widgets.common.client.common.popups.BaseModal) Column(com.google.gwt.user.cellview.client.Column) ModalHiddenHandler(org.gwtbootstrap3.client.shared.event.ModalHiddenHandler) ButtonCell(org.gwtbootstrap3.client.ui.gwt.ButtonCell) ModalHiddenEvent(org.gwtbootstrap3.client.shared.event.ModalHiddenEvent) TextCell(com.google.gwt.cell.client.TextCell) PostConstruct(javax.annotation.PostConstruct)

Example 7 with Row

use of org.gwtbootstrap3.client.ui.Row in project ovirt-engine by oVirt.

the class GuidePopupView method addButton.

private void addButton(final UICommand command, Div buttonsPanel, IconType buttonImage) {
    UiCommandButton button = new UiCommandButton(command.getTitle(), buttonImage);
    button.setCommand(command);
    // $NON-NLS-1$
    button.getElement().setId("UiCommandButton_guideButton_" + command.getTitle());
    button.setCustomContentStyle(style.actionButtonContent());
    button.addStyleName(style.actionButton());
    button.addClickHandler(event -> command.execute());
    Row row = new Row();
    Column column = new Column(ColumnSize.SM_12);
    column.add(button);
    row.add(column);
    buttonsPanel.add(row);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) UiCommandButton(org.ovirt.engine.ui.common.widget.UiCommandButton) Row(org.gwtbootstrap3.client.ui.Row)

Example 8 with Row

use of org.gwtbootstrap3.client.ui.Row in project ovirt-engine by oVirt.

the class AbstractMainWithDetailsTableView method addResultPanel.

private void addResultPanel(ActionPanelPresenterWidget<T, M> actionPanel) {
    resultRow = new Row();
    resultRow.addStyleName(PatternflyConstants.PF_TOOLBAR_RESULTS);
    FlowPanel resultColumn = new FlowPanel();
    resultRow.add(resultColumn);
    // $NON-NLS-1$
    resultColumn.add(new Paragraph(constants.activeTags() + ":"));
    resultList = new UnorderedList();
    resultList.addStyleName(Styles.LIST_INLINE);
    resultList.getElement().getStyle().setPaddingLeft(10, Unit.PX);
    resultColumn.add(resultList);
    resultRow.setVisible(false);
    actionPanel.setFilterResultPanel(resultRow);
}
Also used : FlowPanel(com.google.gwt.user.client.ui.FlowPanel) UnorderedList(org.gwtbootstrap3.client.ui.html.UnorderedList) Row(org.gwtbootstrap3.client.ui.Row) Paragraph(org.gwtbootstrap3.client.ui.html.Paragraph)

Example 9 with Row

use of org.gwtbootstrap3.client.ui.Row in project ovirt-engine by oVirt.

the class AbstractMainWithDetailsTableView method addBreadCrumbs.

private void addBreadCrumbs(FlowPanel container) {
    Row breadCrumbsRow = new Row();
    breadCrumbsColumn = new Column(ColumnSize.SM_12);
    breadCrumbsRow.add(breadCrumbsColumn);
    container.insert(breadCrumbsRow, 0);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row)

Example 10 with Row

use of org.gwtbootstrap3.client.ui.Row in project ovirt-engine by oVirt.

the class PatternflyListViewItem method createItemContainerPanel.

protected Container createItemContainerPanel(Row content, boolean hidden) {
    Container panel = new Container();
    panel.addStyleName(LIST_GROUP_ITEM_CONTAINER);
    if (hidden) {
        panel.addStyleName(ExpandableListViewItem.HIDDEN);
        panel.setFluid(true);
        Button closeButton = new Button();
        closeButton.addStyleName(Styles.CLOSE);
        getClickHandlerRegistrations().add(closeButton.addClickHandler(this));
        Span icon = new Span();
        icon.addStyleName(PatternflyConstants.PFICON);
        icon.addStyleName(PatternflyConstants.PFICON_CLOSE);
        closeButton.add(icon);
        panel.add(closeButton);
    }
    panel.add(content);
    return panel;
}
Also used : Container(org.gwtbootstrap3.client.ui.Container) Button(org.gwtbootstrap3.client.ui.Button) Span(org.gwtbootstrap3.client.ui.html.Span)

Aggregations

Row (org.gwtbootstrap3.client.ui.Row)26 Column (org.gwtbootstrap3.client.ui.Column)22 DListElement (com.google.gwt.dom.client.DListElement)7 ClickEvent (com.google.gwt.event.dom.client.ClickEvent)6 Button (org.gwtbootstrap3.client.ui.Button)5 Container (org.gwtbootstrap3.client.ui.Container)5 ClickHandler (com.google.gwt.event.dom.client.ClickHandler)4 Column (com.google.gwt.user.cellview.client.Column)4 ButtonCell (org.gwtbootstrap3.client.ui.gwt.ButtonCell)4 CellTable (com.google.gwt.user.cellview.client.CellTable)2 TextColumn (com.google.gwt.user.cellview.client.TextColumn)2 IsWidget (com.google.gwt.user.client.ui.IsWidget)2 Widget (com.google.gwt.user.client.ui.Widget)2 ListDataProvider (com.google.gwt.view.client.ListDataProvider)2 PostConstruct (javax.annotation.PostConstruct)2 Label (org.gwtbootstrap3.client.ui.Label)2 TextBox (org.gwtbootstrap3.client.ui.TextBox)2 ValueListBox (org.gwtbootstrap3.client.ui.ValueListBox)2 Span (org.gwtbootstrap3.client.ui.html.Span)2 Before (org.junit.Before)2