use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.
the class ContainerConfigParamsView method addVersionColumn.
private void addVersionColumn() {
Column<ContainerConfig, String> column = new Column<ContainerConfig, String>(new TextCell()) {
@Override
public String getValue(ContainerConfig containerConfig) {
return containerConfig.getVersion();
}
};
dataGrid.addColumn(column, translationService.getTranslation(ContainerConfigParamsView_VersionColumn));
}
use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.
the class ProjectClassListViewImpl method addClassNameColumn.
private void addClassNameColumn() {
Column<ClassRow, String> column = new Column<ClassRow, String>(new TextCell()) {
@Override
public String getValue(ClassRow classRow) {
if (classRow.getClassName() != null) {
return classRow.getClassName();
} else {
return "";
}
}
};
dataGrid.addColumn(column, Constants.INSTANCE.project_class_list_class_name_column());
dataGrid.setColumnWidth(column, 90, Style.Unit.PCT);
}
use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.
the class DatabaseObjectExplorerViewImpl method addTypeColumn.
private void addTypeColumn() {
Column<DatabaseObjectRow, String> column = new Column<DatabaseObjectRow, String>(new TextCell()) {
@Override
public String getValue(DatabaseObjectRow row) {
return row.getType();
}
};
dataGrid.addColumn(column, translationService.getTranslation(DataSourceManagementConstants.DatabaseObjectExplorerViewImpl_dbObjectTypeColumn));
dataGrid.setColumnWidth(column, 10, Style.Unit.PCT);
}
use of com.google.gwt.cell.client.TextCell in project kie-wb-common by kiegroup.
the class DatabaseObjectExplorerViewImpl method addNameColumn.
private void addNameColumn() {
Column<DatabaseObjectRow, String> column = new Column<DatabaseObjectRow, String>(new TextCell()) {
@Override
public String getValue(DatabaseObjectRow row) {
return row.getName();
}
};
dataGrid.addColumn(column, translationService.getTranslation(DataSourceManagementConstants.DatabaseObjectExplorerViewImpl_dbObjectNameColumn));
dataGrid.setColumnWidth(column, 80, Style.Unit.PCT);
}
use of com.google.gwt.cell.client.TextCell 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;
}
});
}
Aggregations