Search in sources :

Example 1 with DiskProgressColumn

use of org.ovirt.engine.ui.common.widget.table.column.DiskProgressColumn in project ovirt-engine by oVirt.

the class DisksViewColumns method getStatusColumn.

public static final AbstractColumn<Disk, Disk> getStatusColumn(String sortBy) {
    DiskTransferProgressColumn uploadImageProgressColumn = new DiskTransferProgressColumn();
    DiskProgressColumn diskProgressColumn = new DiskProgressColumn();
    List<HasCell<Disk, ?>> list = new ArrayList<>();
    list.add(getStatusOnlyColumn(null));
    list.add(uploadImageProgressColumn);
    list.add(diskProgressColumn);
    Cell<Disk> compositeCell = new StatusCompositeCell<>(list);
    AbstractColumn<Disk, Disk> column = new AbstractColumn<Disk, Disk>(compositeCell) {

        @Override
        public Disk getValue(Disk object) {
            return object;
        }
    };
    if (sortBy != null) {
        column.makeSortable(sortBy);
    }
    return column;
}
Also used : DiskProgressColumn(org.ovirt.engine.ui.common.widget.table.column.DiskProgressColumn) HasCell(com.google.gwt.cell.client.HasCell) ArrayList(java.util.ArrayList) StatusCompositeCell(org.ovirt.engine.ui.common.widget.table.cell.StatusCompositeCell) AbstractColumn(org.ovirt.engine.ui.common.widget.table.column.AbstractColumn) LunDisk(org.ovirt.engine.core.common.businessentities.storage.LunDisk) Disk(org.ovirt.engine.core.common.businessentities.storage.Disk) DiskTransferProgressColumn(org.ovirt.engine.ui.common.widget.table.column.DiskTransferProgressColumn)

Aggregations

HasCell (com.google.gwt.cell.client.HasCell)1 ArrayList (java.util.ArrayList)1 Disk (org.ovirt.engine.core.common.businessentities.storage.Disk)1 LunDisk (org.ovirt.engine.core.common.businessentities.storage.LunDisk)1 StatusCompositeCell (org.ovirt.engine.ui.common.widget.table.cell.StatusCompositeCell)1 AbstractColumn (org.ovirt.engine.ui.common.widget.table.column.AbstractColumn)1 DiskProgressColumn (org.ovirt.engine.ui.common.widget.table.column.DiskProgressColumn)1 DiskTransferProgressColumn (org.ovirt.engine.ui.common.widget.table.column.DiskTransferProgressColumn)1