void () { myOutputFile.setEnabled(mySaveToFile.isSelected()); myOpenOutputFile.setEnabled(mySaveToFile.isEnabled() && mySaveToFile.isSelected()); myOpenInBrowser.setEnabled(mySaveToFile.isEnabled() && mySaveToFile.isSelected()); final int selectedIndex = getSelectedIndex(myOutputOptions); final boolean b = selectedIndex == XsltRunConfiguration.OutputType.CONSOLE.ordinal(); myFileType.setEnabled(b); }