Class RibbonRadioButtonGroupModel
java.lang.Object
org.pushingpixels.radiance.component.api.ribbon.synapse.model.RibbonRadioButtonGroupModel
Group of ribbon radio buttons.
- Author:
- Kirill Grouchnikov
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(RibbonRadioButtonContentModel radioButtonContentModel) Adds the specified content model to the group.voidClears the selection of this content model toggle group model.Returns an unmodifiable collection with all the content models tracked by this model.Returns the selected content model of this group model.booleanReturns the current value for clearing selection.voidremove(RibbonRadioButtonContentModel radioButtonContentModel) Removes the specified content model from the group.voidvoidsetAllowsClearingSelection(boolean allowsClearingSelection) Sets the new value for clearing selection.voidsetSelected(RibbonRadioButtonContentModel radioButtonContentModel, boolean isSelected) Changes the selected status of the specified content model.
-
Constructor Details
-
RibbonRadioButtonGroupModel
public RibbonRadioButtonGroupModel()Creates a new radio button group.
-
-
Method Details
-
getRadioButtonModels
Returns an unmodifiable collection with all the content models tracked by this model.- Returns:
- An unmodifiable collection with all the content models tracked by this model.
-
setAllowsClearingSelection
public void setAllowsClearingSelection(boolean allowsClearingSelection) Sets the new value for clearing selection. Iftrueis passed, the selection can be cleared inclearSelection()orsetSelected(RibbonRadioButtonContentModel, boolean)(passing the currently selected content model andfalse).- Parameters:
allowsClearingSelection- The new value for clearing selection.
-
isAllowsClearingSelection
public boolean isAllowsClearingSelection()Returns the current value for clearing selection.trueis returned when selection can be cleared inclearSelection()orsetSelected(RibbonRadioButtonContentModel, boolean)(passing the currently selected content model andfalse).- Returns:
- The current value for clearing selection.
-
add
Adds the specified content model to the group. If the content model is selected, and the group has a selected content model, the newly added content model is marked as unselected.- Parameters:
radioButtonContentModel- The content model to be added.
-
remove
Removes the specified content model from the group.- Parameters:
radioButtonContentModel- The content model to be removed
-
removeAll
public void removeAll() -
setSelected
Changes the selected status of the specified content model.- Parameters:
radioButtonContentModel- Content model.isSelected- Selection indication.
-
getSelected
Returns the selected content model of this group model.- Returns:
- The selected content model of this group model. The result can be
null.
-
clearSelection
public void clearSelection()Clears the selection of this content model toggle group model.
-