Created
December 5, 2016 15:08
-
-
Save AndrewShitsko/b09027a8dc02ae01fb1a8afa2217837c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.example | |
import griffon.core.artifact.GriffonView | |
import griffon.inject.MVCMember | |
import griffon.metadata.ArtifactProviderFor | |
import javax.annotation.Nonnull | |
@ArtifactProviderFor(GriffonView) | |
class HomeView { | |
@MVCMember @Nonnull | |
FactoryBuilderSupport builder | |
@MVCMember @Nonnull | |
HomeModel model | |
void initUI() { | |
// builder to create UI, it’s window of the application | |
builder.application(title: application.configuration['application.title'], | |
sizeToScene: true, centerOnScreen: true, name: 'mainWindow') { | |
// container for all content | |
scene(fill: WHITE, width: 200, height: 60) { | |
// one from type of layouts | |
gridPane { | |
label(id: 'clickLabel', row: 0, column: 0, | |
text: bind(model.clickCountProperty())) | |
button(row: 1, column: 0, prefWidth: 200, | |
id: 'clickActionTarget', clickAction) | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment