Example usage for javafx.scene.control TreeView setStyle

List of usage examples for javafx.scene.control TreeView setStyle

Introduction

In this page you can find the example usage for javafx.scene.control TreeView setStyle.

Prototype

public final void setStyle(String value) 

Source Link

Document

A string representation of the CSS style associated with this specific Node .

Usage

From source file:utilitybasedfx.MainGUIController.java

private CheckBoxTreeItem<String> preSetupOpsTree(TreeView tree) {
    CheckBoxTreeItem<String> root = new CheckBoxTreeItem("root");

    root.setExpanded(true);/*from   www . jav  a 2s .c om*/

    tree.setStyle("-fx-font-size: 11; ");

    //tree.getStylesheets().add("/css/treeViewColouredSelection.css"); // [FIXME] make the color change! WHY IT NO WORK

    tree.setRoot(root);
    tree.setShowRoot(false);
    tree.setCellFactory(CheckBoxTreeCell.<String>forTreeView());

    return root;
}