use of org.ovirt.engine.ui.uicommonweb.models.vms.PreviewSnapshotModel in project ovirt-engine by oVirt.
the class VmSnapshotCustomPreviewPopupWidget method edit.
@Override
public void edit(PreviewSnapshotModel model) {
driver.edit(model);
previewSnapshotModel = model;
snapshotInfoContainer.add(vmSnapshotInfoPanel);
previewTable.asEditor().edit(previewSnapshotModel.getSnapshots());
// Add selection listener
model.getSnapshots().getSelectedItemChangedEvent().addListener((ev, sender, args) -> {
ListModel snapshots = (ListModel) sender;
SnapshotModel snapshotModel = (SnapshotModel) snapshots.getSelectedItem();
if (snapshotModel != null) {
vmSnapshotInfoPanel.updatePanel(snapshotModel);
}
});
model.getSnapshots().getItemsChangedEvent().addListener((ev, sender, args) -> createPreviewTable());
}
Aggregations