Search in sources :

Example 1 with Column

use of org.gwtbootstrap3.client.ui.Column 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 2 with Column

use of org.gwtbootstrap3.client.ui.Column 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 3 with Column

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

the class AbstractFormPanel method createRow.

private Row createRow(int numOfColumns) {
    Row row = new Row();
    // Evenly distribute by default.
    String columnSize = COL_PREFIX + (BOOTSTRAP_GRID_SIZE / numOfColumns);
    for (int i = 0; i < numOfColumns; i++) {
        Column column = new Column(columnSize);
        row.add(column);
    }
    return row;
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row)

Example 4 with Column

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

the class AbstractFormPanel method addFormItem.

/**
 * Adds new item to the form panel.
 */
public void addFormItem(FormItem item, int labelWidth, int valueWidth) {
    updateItemSizes(item, labelWidth, valueWidth);
    // Create item label
    Label itemLabel = new Label(item.getName());
    itemLabel.getElement().setId(ElementIdUtils.createFormGridElementId(elementId, item.getColumn(), item.getRow(), // $NON-NLS-1$
    "_label"));
    itemLabel.setStyleName(style.formPanelLabel());
    Row itemRow = new Row();
    Column labelColumn = new Column(COL_PREFIX + labelWidth);
    labelColumn.add(itemLabel);
    itemRow.add(labelColumn);
    Column itemColumn = findColumn(item.getRow(), item.getColumn());
    if (itemColumn != null) {
        itemColumn.add(itemRow);
    }
    // Update the item
    updateFormItem(item, valueWidth);
    // Update auto placement data
    incNextAvailableRow(item.getColumn());
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Label(com.google.gwt.user.client.ui.Label) Row(org.gwtbootstrap3.client.ui.Row)

Example 5 with Column

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

the class HostPopupView method createSpmControls.

private void createSpmControls(final HostModel object) {
    Row labelRow = (Row) spmContainer.getWidget(0);
    spmContainer.clear();
    spmContainer.add(labelRow);
    Iterable<?> items = object.getSpmPriority().getItems();
    if (items == null) {
        return;
    }
    // Recreate SPM related controls.
    for (Object item : items) {
        @SuppressWarnings("unchecked") final EntityModel<Integer> model = (EntityModel<Integer>) item;
        // $//$NON-NLS-1$
        RadioButton rb = new RadioButton("spm");
        rb.setText(model.getTitle());
        Element labelElement = (Element) rb.getElement().getChild(1);
        labelElement.addClassName(style.patternFlyRadio());
        rb.setValue(object.getSpmPriority().getSelectedItem() == model);
        rb.addValueChangeHandler(e -> object.getSpmPriority().setSelectedItem(model));
        Row row = new Row();
        Column column = new Column(ColumnSize.SM_12, rb);
        row.add(column);
        spmContainer.add(row);
    }
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Element(com.google.gwt.dom.client.Element) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) Row(org.gwtbootstrap3.client.ui.Row) RadioButton(com.google.gwt.user.client.ui.RadioButton)

Aggregations

Column (org.gwtbootstrap3.client.ui.Column)30 Row (org.gwtbootstrap3.client.ui.Row)24 Column (com.google.gwt.user.cellview.client.Column)17 ButtonCell (org.gwtbootstrap3.client.ui.gwt.ButtonCell)12 DListElement (com.google.gwt.dom.client.DListElement)10 Button (org.gwtbootstrap3.client.ui.Button)9 TextColumn (com.google.gwt.user.cellview.client.TextColumn)8 Element (com.google.gwt.dom.client.Element)5 IsWidget (com.google.gwt.user.client.ui.IsWidget)5 AbstractIconTypeColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractIconTypeColumn)5 AbstractCell (com.google.gwt.cell.client.AbstractCell)4 ValueUpdater (com.google.gwt.cell.client.ValueUpdater)4 NativeEvent (com.google.gwt.dom.client.NativeEvent)4 SafeHtmlBuilder (com.google.gwt.safehtml.shared.SafeHtmlBuilder)4 HTMLButtonElement (elemental2.dom.HTMLButtonElement)4 Container (org.gwtbootstrap3.client.ui.Container)4 Icon (org.gwtbootstrap3.client.ui.Icon)4 Label (org.gwtbootstrap3.client.ui.Label)4 CellTable (com.google.gwt.user.cellview.client.CellTable)3 ListDataProvider (com.google.gwt.view.client.ListDataProvider)3