- All Superinterfaces:
Action,ActionListener,Control,EventListener
A collection of controls and separators, note that these can be nested controls.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface is.codion.swing.common.ui.control.Control
Control.ActionCommand, 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_ICONFields inherited from interface is.codion.swing.common.ui.control.Control
BACKGROUND, FONT, FOREGROUND -
Method Summary
Modifier and TypeMethodDescriptionactions()Adds the given action to this Controls instance, adding a null action has the same effect as addSeparator()Adds all actions found incontrolsto this controls instanceAdds the given action to this Controls instance at the specified index, adding a null action has the same effect as addSeparator()Adds a separator to the end of this controls instanceaddSeparatorAt(int index) Adds a separator at the given indexstatic Controls.Builderbuilder()static Controlscontrols()Constructs a new Controls instance.static ControlsConstructs a new Controls instance.static ControlsConstructs a new Controls instance.booleanempty()get(int index) booleannotEmpty()Removes all actions from this controls instanceintsize()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
copy, copy, copy, enabled, getBackground, getDescription, getFont, getForeground, getKeyStroke, getLargeIcon, getMnemonic, getName, getSmallIcon, setBackground, setDescription, setEnabled, setFont, setForeground, setKeyStroke, setLargeIcon, setMnemonic, setName, setSmallIcon
-
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
-
add
Adds the given action to this Controls instance, adding a null action has the same effect as addSeparator()- Parameters:
action- the action to add- Returns:
- this Controls instance
-
addAt
Adds the given action to this Controls instance at the specified index, adding a null action has the same effect as addSeparator()- Parameters:
index- the indexaction- the action to add at the specified index- Returns:
- this Controls instance
-
remove
- Parameters:
action- the action to remove- Returns:
- this Controls instance
-
removeAll
Controls removeAll()Removes all actions from this controls instance- Returns:
- this Controls instance
-
size
int size()- Returns:
- the number of controls in this controls instance
-
empty
boolean empty()- Returns:
- true if this controls instance contains no controls (or separators)
-
notEmpty
boolean notEmpty()- Returns:
- true if this controls instance contains controls (or separators)
-
get
- Parameters:
index- the index- Returns:
- the action at the given index
-
add
- Parameters:
controls- the controls to add- Returns:
- this Control instance
-
addAt
- Parameters:
index- the indexcontrols- the controls to add at the specified index- Returns:
- this Controls instance
-
addSeparator
Controls addSeparator()Adds a separator to the end of this controls instance- Returns:
- this Controls instance
-
addSeparatorAt
Adds a separator at the given index- Parameters:
index- the index- Returns:
- this Controls instance
-
addAll
Adds all actions found incontrolsto this controls instance- Parameters:
controls- the source list- Returns:
- this Controls instance
-
controls
Constructs a new Controls instance.- Returns:
- a new Controls instance.
-
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.Builder instance
-