private ButtonGroup getButtonGroup(final ShadowMenu shadow) { final String selectionGroup = shadow.getModuleInfo().getSelectionGroup(); ButtonGroup buttonGroup = buttonGroups.get(selectionGroup); if (buttonGroup == null) { buttonGroup = new ButtonGroup(); buttonGroups.put(selectionGroup, buttonGroup); } return buttonGroup; }
/** Returns true if this node is a radio button. */ public boolean isRadioButton() { if (!isToggle()) return false; final String selectionGroup = moduleInfo.getSelectionGroup(); return selectionGroup != null && !selectionGroup.isEmpty(); }
/** Returns true if this node is a checkbox. */ public boolean isCheckBox() { if (!isToggle()) return false; final String selectionGroup = moduleInfo.getSelectionGroup(); return selectionGroup == null || selectionGroup.isEmpty(); }
/** Returns true if this node is a radio button. */ public boolean isRadioButton() { if (!isToggle()) return false; final String selectionGroup = moduleInfo.getSelectionGroup(); return selectionGroup != null && !selectionGroup.isEmpty(); }
/** Returns true if this node is a checkbox. */ public boolean isCheckBox() { if (!isToggle()) return false; final String selectionGroup = moduleInfo.getSelectionGroup(); return selectionGroup == null || selectionGroup.isEmpty(); }