Search in sources :

Example 31 with Column

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

the class AbstractFormPanel method addFormDetailView.

/**
 * Adds new detail view (column) to the form panel.
 */
public void addFormDetailView(int numOfRows, int numOfColumns) {
    container.clear();
    for (int i = 0; i < numOfRows; i++) {
        Row row = createRow(numOfColumns);
        container.add(row);
    }
}
Also used : Row(org.gwtbootstrap3.client.ui.Row)

Example 32 with Column

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

the class AbstractFormPanel method setRelativeColumnWidth.

public void setRelativeColumnWidth(int columnNum, int widthInGridColumns) {
    for (int i = 0; i < container.getWidgetCount(); i++) {
        Row row = (Row) container.getWidget(i);
        Column column = (Column) row.getWidget(columnNum);
        column.setSize(COL_PREFIX + widthInGridColumns);
    }
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Row(org.gwtbootstrap3.client.ui.Row)

Example 33 with Column

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

the class ProjectClassListViewImpl method addRemoveRowColumn.

private void addRemoveRowColumn() {
    Column<ClassRow, String> column = new Column<ClassRow, String>(new ButtonCell(IconType.TRASH, ButtonType.DANGER, ButtonSize.SMALL)) {

        @Override
        public String getValue(ClassRow classRow) {
            return Constants.INSTANCE.project_class_list_action_delete();
        }
    };
    column.setFieldUpdater(new FieldUpdater<ClassRow, String>() {

        @Override
        public void update(int index, ClassRow classRow, String value) {
            if (!readOnly) {
                onRemoveClass(classRow);
            }
        }
    });
    dataGrid.addColumn(column, Constants.INSTANCE.project_class_list_action_column());
    dataGrid.setColumnWidth(column, 10, Style.Unit.PCT);
}
Also used : Column(com.google.gwt.user.cellview.client.Column) ButtonCell(org.gwtbootstrap3.client.ui.gwt.ButtonCell)

Example 34 with Column

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

the class DatabaseSchemaExplorerViewImpl method addOpenColumn.

private void addOpenColumn() {
    Column<DatabaseSchemaRow, String> column = new Column<DatabaseSchemaRow, String>(new ButtonCell(ButtonType.DEFAULT, ButtonSize.SMALL)) {

        @Override
        public String getValue(DatabaseSchemaRow row) {
            return translationService.getTranslation(DataSourceManagementConstants.DatabaseSchemaExplorerViewImpl_schemaOpenAction);
        }
    };
    column.setFieldUpdater(new FieldUpdater<DatabaseSchemaRow, String>() {

        @Override
        public void update(int index, DatabaseSchemaRow row, String value) {
            onOpen(row);
        }
    });
    dataGrid.addColumn(column, translationService.getTranslation(DataSourceManagementConstants.DatabaseSchemaExplorerViewImpl_actionColumn));
    dataGrid.setColumnWidth(column, 10, Style.Unit.PCT);
}
Also used : Column(com.google.gwt.user.cellview.client.Column) ButtonCell(org.gwtbootstrap3.client.ui.gwt.ButtonCell)

Example 35 with Column

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

the class ImportsEditorViewImpl method init.

@Override
public void init(Presenter presenter) {
    this.presenter = presenter;
    container.setFluid(true);
    container.add(row);
    row.add(column);
    setTitle(StunnerFormsClientFieldsConstants.CONSTANTS.Imports());
    column.add(defaultImportsEditorWidget.getWidget());
    column.add(wsdlImportsEditorWidget.getWidget());
    final Row btnRow = new Row();
    btnRow.getElement().getStyle().setMarginTop(10, Style.Unit.PX);
    final Column btnColumn = new Column(ColumnSize.MD_12);
    btnRow.add(btnColumn);
    btnOk = new Button(StunnerFormsClientFieldsConstants.CONSTANTS.Ok());
    btnOk.getElement().getStyle().setMarginLeft(5, Style.Unit.PX);
    btnOk.setType(ButtonType.PRIMARY);
    btnOk.setPull(Pull.RIGHT);
    btnOk.addClickHandler(clickEvent -> {
        presenter.ok();
        defaultImportsEditorWidget.addDataTypes(presenter.getImports());
    });
    btnColumn.add(btnOk);
    btnCancel = new Button(StunnerFormsClientFieldsConstants.CONSTANTS.Cancel());
    btnCancel.setPull(Pull.RIGHT);
    btnCancel.addClickHandler(clickEvent -> presenter.cancel());
    btnColumn.add(btnCancel);
    container.add(btnRow);
    setBody(container);
}
Also used : Column(org.gwtbootstrap3.client.ui.Column) Button(org.gwtbootstrap3.client.ui.Button) Row(org.gwtbootstrap3.client.ui.Row)

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