Search in sources :

Example 1 with PasswordTextInputCell

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");
}
Also used : PasswordTextInputCell(org.ovirt.engine.ui.common.widget.table.cell.PasswordTextInputCell) HostDetailModel(org.ovirt.engine.ui.uicommonweb.models.hosts.HostDetailModel) AbstractEntityModelTextColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractEntityModelTextColumn) Column(com.google.gwt.user.cellview.client.Column) EntityModel(org.ovirt.engine.ui.uicommonweb.models.EntityModel) TextInputCell(com.google.gwt.cell.client.TextInputCell) PasswordTextInputCell(org.ovirt.engine.ui.common.widget.table.cell.PasswordTextInputCell)

Aggregations

TextInputCell (com.google.gwt.cell.client.TextInputCell)1 Column (com.google.gwt.user.cellview.client.Column)1 PasswordTextInputCell (org.ovirt.engine.ui.common.widget.table.cell.PasswordTextInputCell)1 AbstractEntityModelTextColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractEntityModelTextColumn)1 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)1 HostDetailModel (org.ovirt.engine.ui.uicommonweb.models.hosts.HostDetailModel)1