- 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.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 aToggleControlBuilder
instance, based on a copy of this control, using the same valueReturns a newToggleControlBuilder
instance, based on a copy of this control, using the given state.Returns a newToggleControlBuilder
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, caption, description, enabled, font, foreground, keys, keyStroke, largeIcon, mnemonic, setEnabled, smallIcon
-
Method Details
-
value
- Returns:
- the value being toggled by this toggle control
-
copy
ToggleControlBuilder copy()Returns aToggleControlBuilder
instance, based on a copy of this control, using the same value -
copy
Returns a newToggleControlBuilder
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 newToggleControlBuilder
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
-