- All Superinterfaces:
Action,ActionListener,Control,EventListener
A collection of controls and separators, note that these can be nested controls.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceConfigures controls.static interfaceA builder for ControlsNested 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
FieldsModifier and TypeFieldDescriptionstatic final ActionA placeholder representing a separator in a Controls instance.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 TypeMethodDescriptionactions()static Controls.ControlsBuilderbuilder()static Controls.Configconfig(ControlSet controls, List<ControlId<?>> defaults) static ControlsConstructs a new Controls instance.static ControlsConstructs a new Controls instance.copy()Returns a newControl.Builderinstance, based on a copy of this control.booleanempty()get(int index) booleannotEmpty()intsize()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
background, description, enabled, font, foreground, keys, keyStroke, largeIcon, mnemonic, name, setEnabled, smallIcon
-
Field Details
-
SEPARATOR
A placeholder representing a separator in a Controls instance. All methods throwUnsupportedOperationException.
-
-
Method Details
-
actions
- Returns:
- an unmodifiable view of the actions in this set
-
size
int size()- Returns:
- the number of controls in this controls instance
-
empty
boolean empty()- Returns:
- true if this controls instance contains no controls (ignoring separators)
-
notEmpty
boolean notEmpty()- Returns:
- true if this controls instance contains controls (ignoring separators)
-
get
- Parameters:
index- the index- Returns:
- the action at the given index
-
copy
Controls.ControlsBuilder copy()Description copied from interface:ControlReturns a newControl.Builderinstance, based on a copy of this control. -
controls
Constructs a new Controls instance.- Parameters:
actions- the actions- Returns:
- a new Controls instance.
-
controls
Constructs a new Controls instance.- Parameters:
controls- the controls- Returns:
- a new Controls instance.
-
builder
- Returns:
- a new
Controls.ControlsBuilderinstance
-
config
- Parameters:
controls- the available controlsdefaults- the default controls layout- Returns:
- a new Config instance
-