Search in sources :

Example 46 with PropertyChangedEventArgs

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));
    }
}
Also used : PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)

Example 47 with PropertyChangedEventArgs

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));
    }
}
Also used : PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)

Example 48 with PropertyChangedEventArgs

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"));
    }
}
Also used : PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)

Example 49 with PropertyChangedEventArgs

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"));
    }
}
Also used : PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)

Example 50 with PropertyChangedEventArgs

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);
        }
    }
}
Also used : PropertyChangedEventArgs(org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)

Aggregations

PropertyChangedEventArgs (org.ovirt.engine.ui.uicompat.PropertyChangedEventArgs)374 ArrayList (java.util.ArrayList)3 DiskImage (org.ovirt.engine.core.common.businessentities.storage.DiskImage)3 Collections (java.util.Collections)2 Comparator (java.util.Comparator)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)2 StatsInfo (org.ovirt.engine.core.common.businessentities.gluster.StatsInfo)2 IdQueryParameters (org.ovirt.engine.core.common.queries.IdQueryParameters)2 QueryType (org.ovirt.engine.core.common.queries.QueryType)2 Guid (org.ovirt.engine.core.compat.Guid)2 Frontend (org.ovirt.engine.ui.frontend.Frontend)2 UICommand (org.ovirt.engine.ui.uicommonweb.UICommand)2 AsyncDataProvider (org.ovirt.engine.ui.uicommonweb.dataprovider.AsyncDataProvider)2 DiskModel (org.ovirt.engine.ui.uicommonweb.models.vms.DiskModel)2 ConstantsManager (org.ovirt.engine.ui.uicompat.ConstantsManager)2 EventArgs (org.ovirt.engine.ui.uicompat.EventArgs)2 Collection (java.util.Collection)1