use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class Model method setMessage.
public void setMessage(String value) {
if (!Objects.equals(message, value)) {
message = value;
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("Message"));
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class Model method setWidgetModel.
public void setWidgetModel(Model value) {
if (widgetModel != value) {
widgetModel = value;
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("WidgetModel"));
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class Model method setIsSelected.
public void setIsSelected(boolean value) {
if (isSelected != value) {
isSelected = value;
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("IsSelected"));
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class SearchableListModel method setItems.
@Override
public void setItems(Collection<T> value) {
if (items != value) {
T lastSelectedItem = getSelectedItem();
List<T> lastSelectedItems = new ArrayList<>();
if (getSelectedItems() != null) {
for (T item : getSelectedItems()) {
lastSelectedItems.add(item);
}
}
if (comparator == null || ((value instanceof SortedSet) && Objects.equals(((SortedSet<?>) value).comparator(), comparator))) {
itemsChanging(value, items);
items = value;
} else {
Collection<T> sortedItems = sortItems(value);
itemsChanging(sortedItems, items);
items = sortedItems;
}
updatePagingAvailability();
getItemsChangedEvent().raise(this, EventArgs.EMPTY);
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("Items"));
selectedItem = null;
if (getSelectedItems() != null) {
getSelectedItems().clear();
}
if (lastSelectedItem != null && items != null) {
T newSelectedItem = null;
List<T> newItems = new ArrayList<>();
for (T item : items) {
newItems.add(item);
}
if (newItems != null) {
newSelectedItem = determineSelectedItems(newItems, lastSelectedItem, lastSelectedItems);
}
if (newSelectedItem != null) {
selectedItem = newSelectedItem;
if (selectedItems != null) {
selectedItems.add(newSelectedItem);
}
}
}
onSelectedItemChanged();
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class PoolGeneralModel method setTemplate.
public void setTemplate(String value) {
if (!Objects.equals(template, value)) {
template = value;
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("Template"));
}
}
Aggregations