use of org.gwtbootstrap3.client.ui.gwt.ButtonCell in project kie-wb-common by kiegroup.
the class DataObjectBrowserViewImpl method addRemoveRowColumn.
private void addRemoveRowColumn() {
ButtonCell buttonCell = new ButtonCell(IconType.TRASH, ButtonType.DANGER, ButtonSize.SMALL);
Column<ObjectProperty, String> column = new Column<ObjectProperty, String>(buttonCell) {
@Override
public String getValue(ObjectProperty objectProperty) {
return Constants.INSTANCE.objectBrowser_action_delete();
}
};
column.setFieldUpdater(new FieldUpdater<ObjectProperty, String>() {
@Override
public void update(int index, ObjectProperty objectProperty, String value) {
if (!readonly) {
presenter.onDeleteProperty(objectProperty, index);
}
}
});
propertiesTable.addColumn(column, "");
propertiesTable.setColumnWidth(column, calculateButtonSize(Constants.INSTANCE.objectBrowser_action_delete()), Style.Unit.PX);
}
use of org.gwtbootstrap3.client.ui.gwt.ButtonCell in project kie-wb-common by kiegroup.
the class PersistenceUnitPropertyGridViewImpl method addRemoveRowColumn.
private void addRemoveRowColumn() {
Column<PropertyRow, String> column = new Column<PropertyRow, String>(new ButtonCell(IconType.TRASH, ButtonType.DANGER, ButtonSize.SMALL)) {
@Override
public String getValue(PropertyRow propertyRow) {
return Constants.INSTANCE.persistence_unit_property_grid_action_delete();
}
};
column.setFieldUpdater(new FieldUpdater<PropertyRow, String>() {
@Override
public void update(int index, PropertyRow propertyRow, String value) {
if (!readOnly) {
onRemoveProperty(propertyRow);
}
}
});
dataGrid.addColumn(column, Constants.INSTANCE.persistence_unit_property_grid_property_action_column());
dataGrid.setColumnWidth(column, 10, Style.Unit.PCT);
}
use of org.gwtbootstrap3.client.ui.gwt.ButtonCell in project kie-wb-common by kiegroup.
the class ContainerConfigParamsView method addRemoveRowColumn.
private void addRemoveRowColumn() {
ButtonCell buttonCell = new ButtonCell(IconType.TRASH, ButtonType.DANGER, ButtonSize.SMALL);
Column<ContainerConfig, String> column = new Column<ContainerConfig, String>(buttonCell) {
@Override
public String getValue(ContainerConfig containerConfig) {
return translationService.getTranslation(ContainerConfigParamsView_Delete);
}
};
column.setFieldUpdater((index, containerConfig, value) -> presenter.onDeleteContainer(containerConfig));
dataGrid.addColumn(column, "");
dataGrid.setColumnWidth(column, 90, Style.Unit.PX);
}
use of org.gwtbootstrap3.client.ui.gwt.ButtonCell in project kie-wb-common by kiegroup.
the class CrudComponentViewImpl method showEditButtons.
@Override
public void showEditButtons() {
final Column<MODEL, String> column = new Column<MODEL, String>(new ButtonCell(IconType.EDIT, ButtonType.PRIMARY, ButtonSize.SMALL)) {
@Override
public String getValue(final Object model) {
return translationService.getTranslation(CrudComponentConstants.CrudComponentViewImplEditInstanceButton);
}
};
column.setFieldUpdater(new FieldUpdater<MODEL, String>() {
@Override
public void update(final int index, final Object model, final String s) {
presenter.editInstance(index);
}
});
table.addColumn(column, "");
}
use of org.gwtbootstrap3.client.ui.gwt.ButtonCell in project kie-wb-common by kiegroup.
the class DatabaseObjectExplorerViewImpl method addOpenColumn.
private void addOpenColumn() {
Column<DatabaseObjectRow, String> column = new Column<DatabaseObjectRow, String>(new ButtonCell(ButtonType.DEFAULT, ButtonSize.SMALL)) {
@Override
public String getValue(DatabaseObjectRow row) {
return translationService.getTranslation(DataSourceManagementConstants.DatabaseObjectExplorerViewImpl_dbObjectOpen);
}
};
column.setFieldUpdater(new FieldUpdater<DatabaseObjectRow, String>() {
@Override
public void update(int index, DatabaseObjectRow row, String value) {
onOpen(row);
}
});
dataGrid.addColumn(column, translationService.getTranslation(DataSourceManagementConstants.DatabaseObjectExplorerViewImpl_dbObjectActionColumn));
dataGrid.setColumnWidth(column, 10, Style.Unit.PCT);
}
Aggregations