Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: TreeTableView

[19:7] extends: Control

TreeTableView wraps javafx.scene.control.TreeTableView, a table whose rows form an expandable tree. Rows come from a root TreeItem and its children; columns are TreeTableColumns laid across them. Columns can be simple descriptors (display plus colName, bound to a key in each TreeItem's value map) or fully configured TreeTableColumn wrappers, and the two may be mixed. Sorting mirrors TableView: use the one-call sortBy(display, sortType) or the sort-order API for multi-column sorts.

Members

  • cols

Methods

  • TreeTableView (RootItem = null)

    Creates a TreeTableView with an optional root TreeItem.

    • @p RootItem is an optional TreeItem to use as the root.
  • setRoot (RootItem)

    Sets the root TreeItem whose children become the table rows.

    • @p RootItem is a TreeItem wrapper (or TreeItem AJO).
    • @r this object for chaining
  • getRoot ()

    Returns the root TreeItem.

    • @r An AJO around the root TreeItem, or null.
  • setShowRoot (bool Show)

    Sets whether the root TreeItem is shown.

    • @p Show is true to show the root row.
    • @r this object for chaining
  • isShowRoot ()

    Returns whether the root TreeItem is shown.

    • @r A bool, true when the root is shown.
  • showRootProperty ()

    Returns the showRoot BooleanProperty for binding.

    • @r An AJO around the BooleanProperty.
  • setColumns (list Cols)

    Sets the columns. Each element may be a descriptor with display and colName fields (bound to a key in each TreeItem's value map) or a fully configured TreeTableColumn wrapper. The two forms may be mixed.

    • @p Cols is a list of column descriptors and/or TreeTableColumn wrappers.
    • @r this object for chaining
  • onCellValueFactoryCall (Param)

  • addColumn (Column)

    Adds a single configured TreeTableColumn to the table.

    • @p Column is a TreeTableColumn wrapper (or column AJO).
    • @r this object for chaining
  • getColumn (string Display)

    Returns the column whose header text matches Display as a TreeTableColumn wrapper, or null when none matches.

    • @p Display is the column header text.
    • @r A TreeTableColumn wrapper, or null.
  • adoptColumn (Ajo)

  • getColumns ()

    Returns the table columns as TreeTableColumn wrappers.

    • @r A list of TreeTableColumn wrappers.
  • getColumnsRaw ()

    Returns the raw ObservableList of columns.

    • @r An AJO around the ObservableList.
  • sortBy (string Display, SortType)

    Sorts the table by the column with the given header text, setting its sort direction and making it the active sort column.

    • @p Display is the header text of the column to sort by.
    • @p SortType is an fxsorttype value or name string ("ASCENDING" or "DESCENDING").
    • @r this object for chaining
  • clearSort ()

    Clears all sorting.

    • @r this object for chaining
  • getSortOrder ()

    Returns the sort-order columns, in priority order, as TreeTableColumn wrappers.

    • @r A list of TreeTableColumn wrappers (empty when no sort is set).
  • getSortOrderRaw ()

    Returns the raw ObservableList of sort-order columns.

    • @r An AJO around the ObservableList.
  • addToSortOrder (Column)

    Adds a column to the sort order without clearing the existing sort.

    • @p Column is a TreeTableColumn wrapper (or column AJO).
    • @r this object for chaining
  • removeFromSortOrder (Column)

    Removes a column from the sort order.

    • @p Column is a TreeTableColumn wrapper (or column AJO).
    • @r this object for chaining
  • sort ()

    Re-runs the sort using the current sort order.

    • @r this object for chaining
  • setEditable (bool Value)

    Sets whether cells in the table can be edited.

    • @p Value is true to allow editing.
    • @r this object for chaining
  • isEditable ()

    Returns whether the table is editable.

    • @r A bool, true when editable.
  • editableProperty ()

    Returns the editable BooleanProperty for binding.

    • @r An AJO around the BooleanProperty.
  • getSelectionModel ()

    Returns the selection model.

    • @r An AJO around the TreeTableView.TreeTableViewSelectionModel.
  • getSelectedItem ()

    Returns the currently selected TreeItem, or null when nothing is selected.

    • @r An AJO around the selected TreeItem, or null.
  • getSelectedValue ()

    Returns the value of the currently selected TreeItem, or null.

    • @r The selected item's value, or null when nothing is selected.
  • onChange (callback OnChange)

    Sets a callback that fires when the selected item changes.

    • @p OnChange is the callback for the selection change event.
    • @r this object for chaining