Interface ControlBuilder<C extends Control, B extends ControlBuilder<C,B>>
- Type Parameters:
C- the Control typeB- the builder type
- All Superinterfaces:
Supplier<C>
- All Known Subinterfaces:
CommandControl.CommandControlBuilder, ControlsBuilder, ToggleControlBuilder
-
Method Summary
Modifier and TypeMethodDescriptionbackground(@Nullable Color background) build()caption(@Nullable Observable<String> caption) Overridescaption(String).Overridden bycaption(Observable).description(@Nullable String description) enabled(@Nullable ObservableState enabled) foreground(@Nullable Color foreground) default Cget()icon(@Nullable ControlIcon icon) Sets both the small and large icons.mnemonic(int mnemonic) Note that any values added will overwrite the property, if already present, i.e.
-
Method Details
-
caption
Overridden bycaption(Observable).- Parameters:
caption- the caption for the control- Returns:
- this Builder instance
-
caption
Overridescaption(String). The control caption follows the given observable, updated on the Event Dispatch Thread, as does the text of the buttons and menu items based on the control.- Parameters:
caption- a dynamic caption for 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
-
icon
Sets both the small and large icons.- Parameters:
icon- the control icon- Returns:
- this Builder instance
- See Also:
-
smallIcon
-
largeIcon
-
description
-
foreground
-
background
-
font
-
keyStroke
-
value
Note that any values added will overwrite the property, if already present, i.e. setting the 'SmallIcon' value via this method will overwrite the one set viasmallIcon(Icon).- Parameters:
key- the keyvalue- the value- Returns:
- this builder
- See Also:
-
build
C build()- Returns:
- a new Control instance
-
get
-