Module is.codion.swing.common.ui
Interface Control.Builder
- All Known Subinterfaces:
Controls.Builder
,ToggleControl.Builder
- Enclosing interface:
- Control
public static interface Control.Builder
A builder for Control
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
description
(String description) enabled
(StateObserver enabled) mnemonic
(char mnemonic)
-
Method Details
-
name
- Parameters:
name
- the name of the control- Returns:
- this Builder instance
-
enabled
- Parameters:
enabled
- the state observer which controls the enabled state of the control- Returns:
- this Builder instance
-
mnemonic
- Parameters:
mnemonic
- the control mnemonic- Returns:
- this Builder instance
-
smallIcon
- Parameters:
smallIcon
- the small control icon- Returns:
- this Builder instance
-
largeIcon
- Parameters:
largeIcon
- the large control icon- Returns:
- this Builder instance
-
description
- Parameters:
description
- a string describing the control- Returns:
- this Builder instance
-
keyStroke
- Parameters:
keyStroke
- the keystroke to associate with the control- Returns:
- this Builder instance
-
build
Control build()- Returns:
- a new Control instance
- Throws:
IllegalStateException
- in case no command has been set
-