package ${pkg};

import javafx.scene.control.Button;
import javafx.scene.layout.BorderPane;

import org.jrebirth.af.api.ui.annotation.OnAction;
import org.jrebirth.af.core.ui.DefaultView;

/**
 * ${Name} view. Builds nodes and binds them to the model. No business logic.
 */
public final class ${Name}View extends DefaultView<${Name}Model, BorderPane, ${Name}Controller> {

    @OnAction
    private Button okButton;

    public ${Name}View(final ${Name}Model model) {
        super(model);
    }

    @Override
    protected void initView() {
        super.initView();

        this.okButton = new Button("OK");
        node().setCenter(this.okButton);

        // View-local stylesheet (optional):
        // addCSS(Resources.create(new StyleSheet("${Name}")));
    }

    Button okButton() {
        return this.okButton;
    }
}
