Class TableRowExpanderColumn.TableRowDataFeatures<S>

  • Type Parameters:
    S - The type of items in the TableView
    Enclosing class:
    TableRowExpanderColumn<S>

    public static final class TableRowExpanderColumn.TableRowDataFeatures<S>
    extends Object
    This object is passed to the expanded node callback when it is time to create a Node to represent the expanded editor of a certain row. The most important method is getValue()} which returns the object represented by the current row. Further more, the expandedProperty() returns a boolean property indicating the current expansion state of the current row. You can use this, or the toggleExpanded() method to toggle and inspect the expanded state of the row, for example if you want an action inside the row editor to contract the editor.
    • Property Detail

      • expanded

        public BooleanProperty expandedProperty
        The expanded property can be used to inspect or mutate the toggled state of this row editor. You can also listen for changes to it's state if needed.
        See Also:
        isExpanded(), setExpanded(Boolean)
    • Method Detail

      • getTableRow

        public TableRow<S> getTableRow()
        Return the current TableRow. It is safe to assume that the index returned by IndexedCell.getIndex() is correct as long as you use it for the initial node creation. It is not safe to trust the result of this call at any later time, for example in a button action within the row editor.
        Returns:
        The current TableRow
      • getTableColumn

        public TableRowExpanderColumn<S> getTableColumn()
        Return the TableColumn which contains the toggle button. Normally you would not need to use this directly, but rather consult the expandedProperty() for inspection and mutation of the toggled state of this row.
        Returns:
        The TableColumn which contains the toggle button
      • expandedProperty

        public BooleanProperty expandedProperty()
        The expanded property can be used to inspect or mutate the toggled state of this row editor. You can also listen for changes to it's state if needed.
        See Also:
        isExpanded(), setExpanded(Boolean)
      • toggleExpanded

        public void toggleExpanded()
        Toggle the expanded state of this row editor.
      • isExpanded

        public Boolean isExpanded()
        Returns a boolean indicating if the current row is expanded or not
        Returns:
        A boolean indicating the expanded state of the current editor
      • setExpanded

        public void setExpanded​(Boolean expanded)
        Set the expanded state. This will update the expandedProperty() accordingly.
        Parameters:
        expanded - Wheter the row editor should be expanded or not
      • getValue

        public S getValue()
        The value represented by the current table row. It is important that the value has valid equals/hashCode methods, as the row value is used to keep track of the node editor for each row.
        Returns:
        The value represented by the current table row