List of usage examples for javafx.scene.control TreeView setStyle
public final void setStyle(String value)
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; }