Search in sources :

Example 6 with FullDateTimeLabel

use of org.ovirt.engine.ui.webadmin.widget.label.FullDateTimeLabel in project ovirt-engine by oVirt.

the class VMsTree method getRootItem.

@Override
protected TreeItem getRootItem(VM vm) {
    HorizontalPanel panel = new HorizontalPanel();
    panel.setSpacing(1);
    // $NON-NLS-1$
    panel.setWidth("100%");
    // $NON-NLS-1$
    addItemToPanel(panel, new Image(resources.vmImage()), "25px");
    // $NON-NLS-1$
    addTextBoxToPanel(panel, new StringValueLabel(), vm.getName(), "");
    // $NON-NLS-1$
    addTextBoxToPanel(panel, new StringValueLabel(), String.valueOf(vm.getDiskMap().size()), "80px");
    // $NON-NLS-1$
    addTextBoxToPanel(panel, new StringValueLabel(), vm.getVmtName(), "160px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new DiskSizeLabel<Double>(), vm.getDiskSize(), "110px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new DiskSizeLabel<Double>(), vm.getActualDiskWithSnapshotsSize(), "110px");
    // $NON-NLS-1$
    addValueLabelToPanel(panel, new FullDateTimeLabel(), vm.getVmCreationDate(), "140px");
    TreeItem treeItem = new TreeItem(panel);
    treeItem.setUserObject(vm.getId());
    return treeItem;
}
Also used : TreeItem(com.google.gwt.user.client.ui.TreeItem) HorizontalPanel(com.google.gwt.user.client.ui.HorizontalPanel) 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) FullDateTimeLabel(org.ovirt.engine.ui.webadmin.widget.label.FullDateTimeLabel)

Aggregations

HorizontalPanel (com.google.gwt.user.client.ui.HorizontalPanel)6 Image (com.google.gwt.user.client.ui.Image)6 TreeItem (com.google.gwt.user.client.ui.TreeItem)6 DiskImage (org.ovirt.engine.core.common.businessentities.storage.DiskImage)6 StringValueLabel (org.ovirt.engine.ui.common.widget.label.StringValueLabel)6 FullDateTimeLabel (org.ovirt.engine.ui.webadmin.widget.label.FullDateTimeLabel)6 ImageResource (com.google.gwt.resources.client.ImageResource)2 VerticalPanel (com.google.gwt.user.client.ui.VerticalPanel)2 Disk (org.ovirt.engine.core.common.businessentities.storage.Disk)1 DiskInterface (org.ovirt.engine.core.common.businessentities.storage.DiskInterface)1 DiskStorageType (org.ovirt.engine.core.common.businessentities.storage.DiskStorageType)1 DiskVmElement (org.ovirt.engine.core.common.businessentities.storage.DiskVmElement)1 ImageStatus (org.ovirt.engine.core.common.businessentities.storage.ImageStatus)1 LunDisk (org.ovirt.engine.core.common.businessentities.storage.LunDisk)1 VolumeType (org.ovirt.engine.core.common.businessentities.storage.VolumeType)1