use of org.ovirt.engine.ui.common.widget.table.cell.PasswordTextInputCell in project ovirt-engine by oVirt.
the class MultipleHostsPopupView method initTableColumns.
private void initTableColumns() {
Column<EntityModel, String> nameColumn = new Column<EntityModel, String>(new TextInputCell()) {
@Override
public String getValue(EntityModel object) {
return ((HostDetailModel) object.getEntity()).getName();
}
};
// $NON-NLS-1$
hostsTable.addColumn(nameColumn, constants.nameHost(), "50px");
nameColumn.setFieldUpdater((index, object, value) -> ((HostDetailModel) object.getEntity()).setName(value));
hostsTable.addColumn(new AbstractEntityModelTextColumn<HostDetailModel>() {
@Override
public String getText(HostDetailModel hostModel) {
return hostModel.getAddress();
}
}, constants.ipHost(), // $NON-NLS-1$
"100px");
Column<EntityModel, String> passwordColumn = new Column<EntityModel, String>(new PasswordTextInputCell()) {
@Override
public String getValue(EntityModel object) {
return ((HostDetailModel) object.getEntity()).getPassword();
}
};
// $NON-NLS-1$
hostsTable.addColumn(passwordColumn, constants.hostPopupPasswordLabel(), "100px");
passwordColumn.setFieldUpdater((index, object, value) -> ((HostDetailModel) object.getEntity()).setPassword(value));
hostsTable.addColumn(new AbstractEntityModelTextColumn<HostDetailModel>() {
@Override
public String getText(HostDetailModel hostModel) {
return hostModel.getFingerprint();
}
}, constants.hostsPopupFingerprint(), // $NON-NLS-1$
"300px");
}
Aggregations