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);
}
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);
}
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;
}
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());
}
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);
}
}
Aggregations