WorkingCopyFormat () { WorkingCopyFormat result = WorkingCopyFormat.UNKNOWN; for (JRadioButton button : formatButtons) { if (button.isSelected()) { result = getFormat(button); break; } } return result; }