更改展开和折叠图像TreeView JavaFX 2.2

Geo*_*lou 5 java expand image treeviewitem javafx-2

是否可以更改JavaFX 2.2 TreeVIew的展开和折叠图像?

更改此图片,

有效的XHTML

对于这样的图像(带+/-),

有效的XHTML

Kal*_*hni 8

当然,这可能只需要一点点css.CSS看起来像这样:

.tree-cell .tree-disclosure-node .arrow {
    -fx-shape: null;
    -fx-background-color: null;
    -fx-background-image: url("plus-arrow.png");
}
.tree-cell:expanded .tree-disclosure-node .arrow {
    -fx-shape: null;
    -fx-background-color: null;
    -fx-background-image: url("minus-arrow.png");
}
Run Code Online (Sandbox Code Playgroud)

lg Kalasch