Search in sources :

Example 1 with DateLabel

use of com.google.gwt.user.client.ui.DateLabel in project ovirt-engine by oVirt.

the class StoragesTree method getNodeItem.

@Override
protected TreeItem getNodeItem(DiskModel diskModel) {
    HorizontalPanel panel = new HorizontalPanel();
    panel.setSpacing(1);
    // $NON-NLS-1$
    panel.setWidth("100%");
    DiskImage disk = (DiskImage) diskModel.getDisk();
    // $NON-NLS-1$
    addItemToPanel(panel, new Image(resources.diskImage()), "30px");
    // $NON-NLS-1$
    addTextBoxToPanel(panel, new StringValueLabel(), disk.getDiskAlias(), "");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new DiskSizeLabel<Long>(), disk.getSizeInGigabytes(), "120px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new EnumLabel<ImageStatus>(), disk.getImageStatus(), "120px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new EnumLabel<VolumeType>(), disk.getVolumeType(), "120px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new EnumLabel<DiskInterface>(), disk.getDiskVmElements().iterator().next().getDiskInterface(), "110px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new EnumLabel<DiskStorageType>(), disk.getDiskStorageType(), "110px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new DateLabel(), disk.getCreationDate(), "100px");
    TreeItem treeItem = new TreeItem(panel);
    treeItem.setUserObject(getEntityId(diskModel));
    return treeItem;
}
Also used : TreeItem(com.google.gwt.user.client.ui.TreeItem) ImageStatus(org.ovirt.engine.core.common.businessentities.storage.ImageStatus) DiskStorageType(org.ovirt.engine.core.common.businessentities.storage.DiskStorageType) Image(com.google.gwt.user.client.ui.Image) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage) StringValueLabel(org.ovirt.engine.ui.common.widget.label.StringValueLabel) DateLabel(com.google.gwt.user.client.ui.DateLabel) VolumeType(org.ovirt.engine.core.common.businessentities.storage.VolumeType) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) DiskInterface(org.ovirt.engine.core.common.businessentities.storage.DiskInterface) DiskImage(org.ovirt.engine.core.common.businessentities.storage.DiskImage)

Aggregations

DateLabel (com.google.gwt.user.client.ui.DateLabel)1 HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)1 Image (com.google.gwt.user.client.ui.Image)1 TreeItem (com.google.gwt.user.client.ui.TreeItem)1 DiskImage (org.ovirt.engine.core.common.businessentities.storage.DiskImage)1 DiskInterface (org.ovirt.engine.core.common.businessentities.storage.DiskInterface)1 DiskStorageType (org.ovirt.engine.core.common.businessentities.storage.DiskStorageType)1 ImageStatus (org.ovirt.engine.core.common.businessentities.storage.ImageStatus)1 VolumeType (org.ovirt.engine.core.common.businessentities.storage.VolumeType)1 StringValueLabel (org.ovirt.engine.ui.common.widget.label.StringValueLabel)1