use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor in project ovirt-engine by oVirt.
the class ClusterPopupView method initRadioButtonEditors.
private void initRadioButtonEditors() {
// $NON-NLS-1$
enableOvirtServiceOptionEditor = new EntityModelRadioButtonEditor("service");
// $NON-NLS-1$
enableGlusterServiceOptionEditor = new EntityModelRadioButtonEditor("service");
// $NON-NLS-1$
optimizationNoneEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
optimizationForServerEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
optimizationForDesktopEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
optimizationCustomEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
migrateOnErrorOption_YESEditor = new EntityModelRadioButtonEditor("2");
// $NON-NLS-1$
migrateOnErrorOption_HA_ONLYEditor = new EntityModelRadioButtonEditor("2");
// $NON-NLS-1$
migrateOnErrorOption_NOEditor = new EntityModelRadioButtonEditor("2");
// $NON-NLS-1$
optimizeForUtilizationEditor = new EntityModelRadioButtonEditor("3");
// $NON-NLS-1$
optimizeForSpeedEditor = new EntityModelRadioButtonEditor("3");
// $NON-NLS-1$
guarantyResourcesEditor = new EntityModelRadioButtonEditor("4");
// $NON-NLS-1$
allowOverbookingEditor = new EntityModelRadioButtonEditor("4");
}
use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor in project ovirt-engine by oVirt.
the class ManageGlusterSwiftPopupView method initEditors.
private void initEditors() {
swiftStatusEditor = new EntityModelLabelEditor<>(new EnumRenderer<GlusterServiceStatus>());
// $NON-NLS-1$
startSwift = new EntityModelRadioButtonEditor("swift_action", Align.RIGHT);
// $NON-NLS-1$
stopSwift = new EntityModelRadioButtonEditor("swift_action", Align.RIGHT);
// $NON-NLS-1$
restartSwift = new EntityModelRadioButtonEditor("swift_action", Align.RIGHT);
manageSwiftServerLevel = new EntityModelCheckBoxEditor(Align.RIGHT);
hostServicesTable = new EntityModelCellTable<>(false, true);
hostServicesTable.addColumn(new AbstractEntityModelTextColumn<GlusterServerService>() {
@Override
public String getText(GlusterServerService entity) {
return entity.getHostName();
}
}, constants.hostGlusterSwift());
hostServicesTable.addColumn(new AbstractEnumColumn<EntityModel, ServiceType>() {
@Override
protected ServiceType getRawValue(EntityModel object) {
return ((GlusterSwiftServiceModel) object).getEntity().getServiceType();
}
}, constants.serviceNameGlusterSwift());
hostServicesTable.addColumn(new AbstractEnumColumn<EntityModel, GlusterServiceStatus>() {
@Override
protected GlusterServiceStatus getRawValue(EntityModel object) {
return ((GlusterSwiftServiceModel) object).getEntity().getStatus();
}
}, constants.serviceStatusGlusterSwift());
Column<EntityModel, Boolean> startSwiftColumn = new Column<EntityModel, Boolean>(new RadioboxCell(false, true)) {
@Override
public Boolean getValue(EntityModel object) {
GlusterSwiftServiceModel swiftServiceModel = (GlusterSwiftServiceModel) object;
return swiftServiceModel.getStartSwift().getEntity();
}
@Override
public void render(Context context, EntityModel object, SafeHtmlBuilder sb) {
GlusterSwiftServiceModel swiftServiceModel = (GlusterSwiftServiceModel) object;
if (swiftServiceModel.getStartSwift().getIsChangable()) {
super.render(context, object, sb);
}
}
};
startSwiftColumn.setFieldUpdater((index, object, value) -> {
GlusterSwiftServiceModel swiftModel = (GlusterSwiftServiceModel) object;
swiftModel.getStartSwift().setEntity(value);
if (value) {
swiftModel.getStopSwift().setEntity(false);
swiftModel.getRestartSwift().setEntity(false);
hostServicesTable.redraw();
}
});
hostServicesTable.addColumn(startSwiftColumn, constants.startGlusterSwift());
Column<EntityModel, Boolean> stopSwiftColumn = new Column<EntityModel, Boolean>(new RadioboxCell(false, true)) {
@Override
public Boolean getValue(EntityModel object) {
GlusterSwiftServiceModel swiftServiceModel = (GlusterSwiftServiceModel) object;
return swiftServiceModel.getStopSwift().getEntity();
}
@Override
public void render(Context context, EntityModel object, SafeHtmlBuilder sb) {
GlusterSwiftServiceModel swiftServiceModel = (GlusterSwiftServiceModel) object;
if (swiftServiceModel.getStopSwift().getIsChangable()) {
super.render(context, object, sb);
}
}
};
stopSwiftColumn.setFieldUpdater((index, object, value) -> {
GlusterSwiftServiceModel swiftModel = (GlusterSwiftServiceModel) object;
if (swiftModel.getStopSwift().getIsChangable()) {
swiftModel.getStopSwift().setEntity(value);
if (value) {
swiftModel.getStartSwift().setEntity(false);
swiftModel.getRestartSwift().setEntity(false);
hostServicesTable.redraw();
}
}
});
hostServicesTable.addColumn(stopSwiftColumn, constants.stopGlusterSwift());
Column<EntityModel, Boolean> restartSwiftColumn = new Column<EntityModel, Boolean>(new RadioboxCell(false, true)) {
@Override
public Boolean getValue(EntityModel object) {
GlusterSwiftServiceModel swiftServiceModel = (GlusterSwiftServiceModel) object;
return swiftServiceModel.getRestartSwift().getEntity();
}
@Override
public void render(Context context, EntityModel object, SafeHtmlBuilder sb) {
GlusterSwiftServiceModel swiftServiceModel = (GlusterSwiftServiceModel) object;
if (swiftServiceModel.getRestartSwift().getIsChangable()) {
super.render(context, object, sb);
}
}
};
restartSwiftColumn.setFieldUpdater((index, object, value) -> {
GlusterSwiftServiceModel swiftModel = (GlusterSwiftServiceModel) object;
swiftModel.getRestartSwift().setEntity(value);
if (value) {
swiftModel.getStartSwift().setEntity(false);
swiftModel.getStopSwift().setEntity(false);
hostServicesTable.redraw();
}
});
hostServicesTable.addColumn(restartSwiftColumn, constants.restartGlusterSwift());
}
use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor in project ovirt-engine by oVirt.
the class ImportCloneDialogPopupView method initSelectWidgets.
private void initSelectWidgets() {
applyToAllEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
// $NON-NLS-1$
cloneEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
noCloneEditor = new EntityModelRadioButtonEditor("1");
}
use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor in project ovirt-engine by oVirt.
the class HostConfigureLocalStoragePopupView method initialize.
private void initialize() {
dataCenterVersionEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<Version>() {
@Override
public String renderNullSafe(Version object) {
return object.getValue();
}
});
clusterCpuTypeEditor = new ListModelListBoxEditor<>(new NullSafeRenderer<ServerCpu>() {
@Override
public String renderNullSafe(ServerCpu object) {
return object.getCpuName();
}
});
// Optimization options.
// $NON-NLS-1$
optimizationNoneEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
optimizationForServerEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
optimizationForDesktopEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
optimizationCustomEditor = new EntityModelRadioButtonEditor("1");
optimizationCustomEditor.setVisible(false);
countThreadsAsCoresEditor = new EntityModelCheckBoxEditor(Align.RIGHT);
memoryOptimizationInfo = new InfoIcon(templates.italicText(constants.clusterPopupMemoryOptimizationInfo()));
memoryOptimizationInfo.setTooltipMaxWidth(TooltipWidth.W520);
cpuThreadsInfo = new InfoIcon(templates.italicText(constants.clusterPopupCpuThreadsInfo()));
cpuThreadsInfo.setTooltipMaxWidth(TooltipWidth.W620);
}
use of org.ovirt.engine.ui.common.widget.editor.generic.EntityModelRadioButtonEditor in project ovirt-engine by oVirt.
the class VmMigratePopupView method initEditors.
void initEditors() {
// $NON-NLS-1$
selectHostAutomaticallyEditor = new EntityModelRadioButtonEditor("1");
// $NON-NLS-1$
selectDestinationHostEditor = new EntityModelRadioButtonEditor("1");
hostsListEditor = new ListModelListBoxEditor<>(new NameRenderer<VDS>());
}
Aggregations