* Bug 13962 fixed: preselecting a groupnamed radiobutton impossible after exec>1
[scilab.git] / scilab / modules / gui / src / java / org / scilab / modules / gui / bridge / groupmanager / GroupManager.java
index 71da651..2018d8c 100644 (file)
@@ -30,6 +30,7 @@ public class GroupManager {
         removeFromGroup(obj);
 
         ButtonGroup group = buttonGroup.get(groupName);
+
         if (group == null) {
             group = new ButtonGroup();
             buttonGroup.put(groupName, group);
@@ -54,4 +55,10 @@ public class GroupManager {
         ButtonGroup group = buttonGroup.get(groupname);
         group.setSelected(model, status);
     }
+
+    public boolean isSelected(String groupname) {
+        ButtonGroup group = buttonGroup.get(groupname);
+        ButtonModel model = group.getSelection();
+        return group.isSelected(model);
+    }
 }