use of com.google.gwt.cell.client.TextInputCell in project ovirt-engine by oVirt.
the class GlusterVolumeSnapshotConfigureOptionsPopupView method initEditors.
private void initEditors() {
configsTable = new EntityModelCellTable<>(false, true);
configsTable.setSelectionModel(new NoSelectionModel());
configsTable.addColumn(new AbstractEntityModelTextColumn<VolumeSnapshotOptionModel>() {
@Override
public String getText(VolumeSnapshotOptionModel object) {
return object.getOptionName();
}
}, constants.volumeSnapshotConfigName(), // $NON-NLS-1$
"150px");
configsTable.addColumn(new AbstractEntityModelTextColumn<VolumeSnapshotOptionModel>() {
@Override
public String getText(VolumeSnapshotOptionModel object) {
return object.getCorrespodingClusterValue();
}
}, constants.clusterSnapshotConfigValue(), // $NON-NLS-1$
"200px");
Column<EntityModel<VolumeSnapshotOptionModel>, String> valueColumn = new Column<EntityModel<VolumeSnapshotOptionModel>, String>(new TextInputCell()) {
@Override
public String getValue(EntityModel<VolumeSnapshotOptionModel> object) {
return ((VolumeSnapshotOptionModel) object.getEntity()).getOptionValue();
}
};
// $NON-NLS-1$
configsTable.addColumn(valueColumn, constants.volumeSnapshotConfigValue(), "100px");
valueColumn.setFieldUpdater((index, object, value) -> object.getEntity().setOptionValue(value));
}
Aggregations