ButtonBase
The base class for Button, ToggleButton, RadioButton ...
Theme DSL
( "button" or "toggle_button" or "radio_button" or "check_box" ) {
":armed" { ... }
":focus" { ... }
":hover" { ... }
}
Content copied to clipboard
ButtonBase inherits all the features of Labelled.
Note, Glok's default theme also uses the style .tinted
to indicate that the button's graphic should be tinted with the theme's font color. When the button is disabled, the tinted color is semi-transparent, to make it look disabled. See ImageView.tint.
Class Diagram
╭╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┆ Labelled ┆
┆ text ┆
┆ graphic ┆
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╯
△
╭╌╌╌╌╌╌┴╌╌╌╌╌╌╮ ╭╌╌╌╌╌╌╌╌╌╌╌╌╌╌╮
┆ ButtonBase ┆ ┏━━━━━━━━━━━━━━━━┓ ┆ /Toggle/ ┆
┆ disabled ┆ ┃ToggleGroup ┃ ┆ selected ┆
┆ armed ┆ ┃ selectedToggle┃◇───────┤ toggleGroup┆
┆ onAction ┆ ┃ userData() ┃ ┆ userData ┆
╰╌╌╌╌╌╌╌╌╌╌╌╌╌╯ ┗━━━━━━━━━━━━━━━━┛ ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
△ △
┌─────────────────┬─────────────────┬────┴───────────────┬──────────────────┬───────────────┐ │
┏━━━━━━━━━┷━━━━━━━┓ ┏━━━━━┷━━━━━┓ ┏━━━━━━━┷━━━━━━━┓ ┏━━━━━━━━┷━━━━━━━━┓ ┏━━━━┷━━━━┓ ╭╌╌╌╌╌╌╌┴╌╌╌╌╌╌╌╌╮ │
┃Button ┃ ┃MenuButton ┃ ┃SplitMenuButton┃ ┃ColorButton ┃ ┃Menu ┃ ┆SelectButtonBase┆ │
┃ defaultButton ┃ ┃ items ┃ ┃ items ┃ ┃ color ┃ ┃ items ┃ ┆ selected ┆ │
┃ cancelButton ┃ ┃ ┃ ┃ ┃ ┃ ... ┃ ┃ ┃ ┆ ┆ │
┗━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━┛ ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯ │
(within a MenuBar) △ │
│ │
┌───────────────────────┬───────────────────────────┬─────────────────────┴──┐ ┌─────────┴───────┐
┏━━━━━━━━━┷━━━━━━━━━┓ ┏━━━━━━━━━┷━━━━━━━━━┓ ┏━━━━━━━━━━━━━┷━━━━━━┓ ╭╌╌╌╌╌╌╌╌╌┴╌╌┴╌╌╌╮ ╵
┃Checkbox ┃ ┃PropertyRadioButton┃ ┃PropertyToggleButton┃ ┆ToggleButtonBase┆ ToggleMenuItemBase
┃ intermediate ┃ ┃ property ┃ ┃ property ┃ ┆ ┆
┃ allowIndeterminate┃ ┃ value ┃ ┃ value ┃ ┆ ┆
┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━━━━━━━┛ ╰╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╯
(No menu-item equivalent) △
│
┌───────┴────────┐
┏━━━━━━━┷━━━━┓ ┏━━━━━━━┷━━━┓
┃ToggleButton┃ ┃RadioButton┃
┃ ┃ ┃ ┃
┗━━━━━━━━━━━━┛ ┗━━━━━━━━━━━┛
Content copied to clipboard
Created with Blokart.
Inheritors
Properties
Functions
Link copied to clipboard
fun onAction(handlerCombination: HandlerCombination = HandlerCombination.AFTER, block: (event: ActionEvent) -> Unit)
Usage :
Link copied to clipboard