MixedTreeView

Similar to TreeView, but this is better suited to trees, where each item in the tree structure contains different types of data.

For example, you may have a MixedTreeView which shows the structure of a document, and an item in the tree could be a page, a layer, text, an image, meta-data...

I is the base class of MixedTreeItem. If each node has no common attributes or behaviour, then I may be MixedTreeItem itself.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
open override val children: ObservableList<ScrollPane>

The base class Node has no children, so this is an empty list.

Link copied to clipboard
Link copied to clipboard

At a later date, MixedTreeView may support variable size cells, and a negative number would indicate that each cell has its own custom height. But for now, this should always be set to greater than zero (either directly in code, or via the scene's Theme).

Link copied to clipboard
Link copied to clipboard
var root: I?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
fun dumpFlat()

Prints the root node, and then all descendant MixedTreeItem.children for MixedTreeItems which are expanded. i.e. The MixedTreeItems that are visible if you scroll from the top of the MixedTreeView to the bottom, plus the root node (even when showRoot == true).

Link copied to clipboard
fun dumpItems()

Prints the tree starting at the root, and descending into all descendant TreeItem.children.

Link copied to clipboard
fun ensureVisible(item: I)

Expands all ancestor TreeItems, and repositions the vertical scroll bar, if needed, so that item is available, and then scroll the tree to make it visible.

Link copied to clipboard
open override fun nodePrefHeight(): Float

By default, MixedTreeViews have an arbitrary prefHeight. Set evalPrefHeight, or add the MixedTreeView to a layout control which will allocate a sensible area regardless of evalPrefWidth.

Link copied to clipboard
open override fun nodePrefWidth(): Float

By default, MixedTreeViews have an arbitrary prefWidth. Set evalPrefWidth, or add the MixedTreeView to a layout control which will allocate a sensible area regardless of evalPrefWidth.

Link copied to clipboard
fun scrollTo(treeItem: I)
fun scrollTo(row: Int)