package _VisualDVM.TestingSystem.SAPFOR.SapforConfiguration.UI;
import Common.Visual.Windows.Dialog.DBObjectDialog;
import _VisualDVM.TestingSystem.SAPFOR.SapforConfiguration.SapforConfiguration;
public class SapforConfigurationDialog extends DBObjectDialog<SapforConfiguration, SapforConfigurationFields> {
    public SapforConfigurationDialog() {
        super(SapforConfigurationFields.class);
    }
    @Override
    public int getDefaultHeight() {
        return 250;
    }
    @Override
    public int getDefaultWidth() {
        return 450;
    }
    @Override
    public void validateFields() {
    }
    @Override
    public void fillFields() {
        fields.tfName.setText(Result.description);
        fields.sKernels.setValue(Result.kernels);
        fields.cbGroupsOnly.setSelected(Result.groupsOnly != 0);
    }
    @Override
    public void ProcessResult() {
        Result.description = fields.tfName.getText();
        Result.kernels = (int) fields.sKernels.getValue();
        Result.groupsOnly = fields.cbGroupsOnly.isSelected() ? 1 : 0;
    }
    @Override
    public void SetReadonly() {
        fields.tfName.setEnabled(false);
        fields.sKernels.setEnabled(false);
        fields.cbGroupsOnly.setEnabled(false);
    }
}
