Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val body = VerticalLayout().apply {
- isSpacing = true
- val isButtonEnabledProperty = objectProperty(false)
- val isButtonVisibleProperty = objectProperty(true)
- val showHelloWorldCommand = SimpleCommand(
- action = { Notification.show("Hello World!!!") },
- isEnabledPredicate = { isButtonEnabledProperty.value },
- isVisiblePredicate = { isButtonVisibleProperty.value }
- ).apply {
- bindNotifier(isButtonEnabledProperty)
- bindNotifier(isButtonVisibleProperty)
- }
- this += CheckBox("Hello World enabled?", isButtonEnabledProperty).apply { isImmediate = true }
- this += CheckBox("Hello World visible?", isButtonVisibleProperty).apply { isImmediate = true }
- this += button("Hello World!!!", MadosTheme.FontIcons.SUBMIT, showHelloWorldCommand)
- }
- this += body
- this.setExpandRatio(body, 1f)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement