use of org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel in project ovirt-engine by oVirt.
the class NetworkListModel method newNetwork.
public void newNetwork() {
if (getWindow() != null) {
return;
}
final NetworkModel networkModel = new NewNetworkModel(this);
setWindow(networkModel);
initDcList(networkModel);
}
use of org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel in project ovirt-engine by oVirt.
the class NetworkListModel method edit.
public void edit() {
final Network network = getSelectedItem();
if (getWindow() != null) {
return;
}
final NetworkModel networkModel = new EditNetworkModel(network, this);
setWindow(networkModel);
initDcList(networkModel);
}
use of org.ovirt.engine.ui.uicommonweb.models.datacenters.NetworkModel in project ovirt-engine by oVirt.
the class AbstractNetworkPopupPresenterWidget method init.
@Override
public void init(final T model) {
// Let the parent do its work
super.init(model);
// Listen to Properties
model.getPropertyChangedEvent().addListener((ev, sender, args) -> {
NetworkModel senderModel = (NetworkModel) sender;
String propertyName = args.propertyName;
if ("Message".equals(propertyName)) {
// $NON-NLS-1$
getView().setMessageLabel(senderModel.getMessage());
}
});
getView().toggleSubnetVisibility(model.getExternal().getEntity());
model.getExternal().getEntityChangedEvent().addListener((ev, sender, args) -> getView().toggleSubnetVisibility(isSubnetVisible(model)));
model.getExternalProviders().getSelectedItemChangedEvent().addListener((ev, sender, args) -> getView().toggleSubnetVisibility(isSubnetVisible(model)));
model.getProfiles().getPropertyChangedEvent().addListener((ev, sender, args) -> {
if ("IsAvailable".equals(args.propertyName)) {
// $NON-NLS-1$
getView().toggleProfilesVisibility(model.getProfiles().getIsAvailable());
}
});
getView().getQosButton().setCommand(model.getAddQosCommand());
getView().getQosButton().addClickHandler(event -> getView().getQosButton().getCommand().execute());
getView().addMtuEditor();
}
Aggregations