Search in sources :

Example 6 with TextInputCell

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

Aggregations

TextInputCell (com.google.gwt.cell.client.TextInputCell)6 Column (com.google.gwt.user.cellview.client.Column)6 ListHandler (com.google.gwt.user.cellview.client.ColumnSortEvent.ListHandler)3 AbstractEntityModelTextColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractEntityModelTextColumn)3 EntityModel (org.ovirt.engine.ui.uicommonweb.models.EntityModel)3 NoSelectionModel (com.google.gwt.view.client.NoSelectionModel)2 FieldUpdater (com.google.gwt.cell.client.FieldUpdater)1 AttributeDefinition (cz.metacentrum.perun.webgui.model.AttributeDefinition)1 ResourceTag (cz.metacentrum.perun.webgui.model.ResourceTag)1 ServicesPackage (cz.metacentrum.perun.webgui.model.ServicesPackage)1 CustomClickableTextCell (cz.metacentrum.perun.webgui.widgets.cells.CustomClickableTextCell)1 PerunAttributeFriendlyNameCell (cz.metacentrum.perun.webgui.widgets.cells.PerunAttributeFriendlyNameCell)1 GlusterVolumeSnapshotConfig (org.ovirt.engine.core.common.businessentities.gluster.GlusterVolumeSnapshotConfig)1 NameRenderer (org.ovirt.engine.ui.common.widget.renderer.NameRenderer)1 PasswordTextInputCell (org.ovirt.engine.ui.common.widget.table.cell.PasswordTextInputCell)1 VolumeSnapshotOptionModel (org.ovirt.engine.ui.uicommonweb.models.gluster.VolumeSnapshotOptionModel)1 HostDetailModel (org.ovirt.engine.ui.uicommonweb.models.hosts.HostDetailModel)1