2つのラジオボタンを使用してダイアログを設定し、ブール値を使用してプログラムでそれらを確認します。
// Not working day radio button
final Button notWorkingDayButton = new Button(mSelectedDayGroup, SWT.RADIO);
notWorkingDayButton.setSelection(isWorkingDay);
notWorkingDayButton.setText("Jour chômé"+(isHoliday ? deft : ""));
// Working day radio button
final Button workingDayButton = new Button(mSelectedDayGroup, SWT.RADIO);
workingDayButton.setText("Jour travaillé"+(isHoliday ? "" : deft));
workingDayButton.setSelection(!isWorkingDay);
ご覧のとおり、同じものを使用しているbooleanため、常に反対の状態になっています。
isWorkingDayの場合は次のようになりますtrue。
isWorkingDayの場合は次のようになりますfalse。
ご覧のとおり、最初の無線はある程度有効のままです。最初のものを完全に無効にし、2番目のものを完全に有効にしisWorkingDay = falseます。