- All Superinterfaces:
Action
,ActionListener
,Control
,EventListener
A Control for toggling a boolean value.
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.swing.common.ui.control.Control
Control.ActionCommand, Control.Builder<C extends Control,
B extends Control.Builder<C, B>>, Control.BuilderFactory, 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_ICON
-
Method Summary
Modifier and TypeMethodDescriptioncopy()
Returns aToggleControl.ToggleControlBuilder
instance, based on a copy of this control, using the same valueReturns a newToggleControl.ToggleControlBuilder
instance, based on a copy of this control, using the given state.Returns a newToggleControl.ToggleControlBuilder
instance, based on a copy of this control, using the given value.static ControlKey<ToggleControl>
static ControlKey<ToggleControl>
value()
Methods inherited from interface javax.swing.Action
accept, addPropertyChangeListener, getValue, isEnabled, putValue, removePropertyChangeListener
Methods inherited from interface java.awt.event.ActionListener
actionPerformed
Methods inherited from interface is.codion.swing.common.ui.control.Control
background, description, enabled, font, foreground, keys, keyStroke, largeIcon, mnemonic, name, setEnabled, smallIcon
-
Method Details
-
value
- Returns:
- the value being toggled by this toggle control
-
copy
Returns aToggleControl.ToggleControlBuilder
instance, based on a copy of this control, using the same value -
copy
Returns a newToggleControl.ToggleControlBuilder
instance, based on a copy of this control, using the given value.- Parameters:
value
- the value for the resulting toggle control- Returns:
- a new builder
-
copy
Returns a newToggleControl.ToggleControlBuilder
instance, based on a copy of this control, using the given state.- Parameters:
state
- the state for the resulting toggle control- Returns:
- a new builder
-
key
- Parameters:
name
- the control name- Returns:
- a new
ControlKey
for identifying aToggleControl
instance
-
key
- Parameters:
name
- the control namedefaultKeyStroke
- the default keystroke- Returns:
- a new
ControlKey
for identifying aToggleControl
instance
-