Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.