Package snap.view
Class ToggleGroup
java.lang.Object
snap.view.ToggleGroup
A class to manage a single selection for a group of objects that can each be selected.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(ToggleButton aToggle) Add adds a toggle.protected void
buttonSelectionDidChange
(PropChange anEvent) PropChangeListener method.Returns the buttons.getName()
Returns the name.Returns the selected toggle.boolean
Returns whether group can be empty.void
remove
(ToggleButton aToggle) Removes a toggle.void
setAllowEmpty
(boolean aValue) Sets whether group can be empty.void
Sets the name.void
setSelected
(ToggleButton aToggle) Sets the selected toggle.
-
Constructor Details
-
ToggleGroup
public ToggleGroup()
-
-
Method Details
-
getName
Returns the name. -
setName
Sets the name. -
isAllowEmpty
public boolean isAllowEmpty()Returns whether group can be empty. -
setAllowEmpty
public void setAllowEmpty(boolean aValue) Sets whether group can be empty. -
getSelected
Returns the selected toggle. -
setSelected
Sets the selected toggle. -
getButtons
Returns the buttons. -
add
Add adds a toggle. -
remove
Removes a toggle. -
buttonSelectionDidChange
PropChangeListener method.
-