I have defined images for the two states of a disclosure node (collapse/expand) according to Change expand and collapse image TreeView JavaFX 2.2
But I would like to have a third image for folder nodes, which still haven't any children nodes. It should not possible to expand/collapse such nodes, but it should display an image too (i.e. a minus.png for expanded nodes, a plus.png for collapsed nodes and an empty rectangle for folder nodes without any children).
Is it possible?
Having no children means that tree item is leaf node with type of "folder". You can utilize graphic property of tree item to show "empty rectangle" image:
Don't forget to create new imageviews for every treeitem added to treeView and which needs that image.