- All Superinterfaces:
Action,ActionListener,Control,EventListener
A Control for toggling a boolean value.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceA builder for ToggleControlNested classes/interfaces inherited from interface is.codion.swing.common.ui.control.Control
Control.ActionCommand, Control.Command -
Field Summary
Fields inherited from interface javax.swing.Action
ACCELERATOR_KEY, ACTION_COMMAND_KEY, DEFAULT, DISPLAYED_MNEMONIC_INDEX_KEY, LARGE_ICON_KEY, LONG_DESCRIPTION, MNEMONIC_KEY, NAME, SELECTED_KEY, SHORT_DESCRIPTION, SMALL_ICONFields inherited from interface is.codion.swing.common.ui.control.Control
BACKGROUND, FONT, FOREGROUND -
Method Summary
Modifier and TypeMethodDescriptionstatic ToggleControl.Builderbuilder(is.codion.common.state.State state) static ToggleControl.Builderstatic ToggleControltoggleControl(is.codion.common.state.State state) Creates a new ToggleControl based on the given statestatic ToggleControltoggleControl(is.codion.common.value.Value<Boolean> value) Creates a new ToggleControl based on the given valueis.codion.common.value.Value<Boolean>value()Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListenerMethods inherited from interface java.awt.event.ActionListener
actionPerformedMethods inherited from interface is.codion.swing.common.ui.control.Control
enabled, getBackground, getDescription, getFont, getForeground, getKeyStroke, getLargeIcon, getMnemonic, getName, getSmallIcon, setBackground, setDescription, setEnabled, setFont, setForeground, setKeyStroke, setLargeIcon, setMnemonic, setName, setSmallIcon
-
Method Details
-
value
is.codion.common.value.Value<Boolean> value()- Returns:
- the value being toggled by this toggle control
-
toggleControl
Creates a new ToggleControl based on the given value- Parameters:
value- the value- Returns:
- a new ToggleControl
-
toggleControl
Creates a new ToggleControl based on the given state- Parameters:
state- the state- Returns:
- a new ToggleControl
-
builder
- Parameters:
value- the value to toggle- Returns:
- a new ToggleControl.Builder
-
builder
- Parameters:
state- the state to toggle- Returns:
- a new ToggleControl.Builder
-