use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class ProviderGeneralModel method setUrl.
public void setUrl(String value) {
if (!Objects.equals(url, value)) {
url = value;
onPropertyChanged(new PropertyChangedEventArgs(PROPERTY_URL));
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class ProviderGeneralModel method setType.
public void setType(ProviderType value) {
if (value != type) {
type = value;
onPropertyChanged(new PropertyChangedEventArgs(PROPERTY_TYPE));
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class VmImportGeneralModel method setCustomProperties.
public void setCustomProperties(String value) {
if (!Objects.equals(customProperties, value)) {
customProperties = value;
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("CustomProperties"));
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class VmImportGeneralModel method setTimeZone.
public void setTimeZone(String value) {
if (!Objects.equals(timeZone, value)) {
timeZone = value;
// $NON-NLS-1$
onPropertyChanged(new PropertyChangedEventArgs("TimeZone"));
}
}
use of org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs in project ovirt-engine by oVirt.
the class VmInterfaceModel method eventRaised.
@Override
public void eventRaised(Event<? extends EventArgs> ev, Object sender, EventArgs args) {
super.eventRaised(ev, sender, args);
if (sender == getMAC()) {
mAC_PropertyChanged((PropertyChangedEventArgs) args);
} else if (sender == getPlugged()) {
PropertyChangedEventArgs propArgs = (PropertyChangedEventArgs) args;
if (propArgs.propertyName.equals("Entity")) {
// $NON-NLS-1$
boolean plugged = getPlugged().getEntity();
getPlugged_IsSelected().setEntity(plugged);
getUnplugged_IsSelected().setEntity(!plugged);
} else if (propArgs.propertyName.equals("IsChangable")) {
// $NON-NLS-1$
boolean isPlugChangeable = getPlugged().getIsChangable();
getPlugged_IsSelected().setIsChangeable(isPlugChangeable);
getPlugged_IsSelected().setChangeProhibitionReason(getLinked().getChangeProhibitionReason());
getUnplugged_IsSelected().setIsChangeable(isPlugChangeable);
getUnplugged_IsSelected().setChangeProhibitionReason(getLinked().getChangeProhibitionReason());
} else if (propArgs.propertyName.equals("IsAvailable")) {
// $NON-NLS-1$
boolean isPlugAvailable = getPlugged().getIsAvailable();
getPlugged_IsSelected().setIsAvailable(isPlugAvailable);
getUnplugged_IsSelected().setIsAvailable(isPlugAvailable);
}
} else if (sender == getPlugged_IsSelected()) {
if (getPlugged_IsSelected().getEntity()) {
getPlugged().setEntity(true);
}
} else if (sender == getUnplugged_IsSelected()) {
if (getUnplugged_IsSelected().getEntity()) {
getPlugged().setEntity(false);
}
} else if (sender == getLinked()) {
PropertyChangedEventArgs propArgs = (PropertyChangedEventArgs) args;
if (propArgs.propertyName.equals("Entity")) {
// $NON-NLS-1$
boolean linked = getLinked().getEntity();
getLinked_IsSelected().setEntity(linked);
getUnlinked_IsSelected().setEntity(!linked);
} else if (propArgs.propertyName.equals("IsChangable")) {
// $NON-NLS-1$
boolean isLinkedChangeable = getLinked().getIsChangable();
getLinked_IsSelected().setIsChangeable(isLinkedChangeable);
getLinked_IsSelected().setChangeProhibitionReason(getLinked().getChangeProhibitionReason());
getUnlinked_IsSelected().setIsChangeable(isLinkedChangeable);
getUnlinked_IsSelected().setChangeProhibitionReason(getLinked().getChangeProhibitionReason());
} else if (propArgs.propertyName.equals("IsAvailable")) {
// $NON-NLS-1$
boolean isLinkedAvailable = getLinked().getIsAvailable();
getLinked_IsSelected().setIsAvailable(isLinkedAvailable);
getUnlinked_IsSelected().setIsAvailable(isLinkedAvailable);
}
} else if (sender == getLinked_IsSelected()) {
if (getLinked_IsSelected().getEntity()) {
getLinked().setEntity(true);
}
} else if (sender == getUnlinked_IsSelected()) {
if (getUnlinked_IsSelected().getEntity()) {
getLinked().setEntity(false);
}
}
}
Aggregations