Module org.controlsfx.controls
Package org.controlsfx.control.table
Class TableRowExpanderColumn.TableRowDataFeatures<S>
- java.lang.Object
-
- org.controlsfx.control.table.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 isgetValue()
} which returns the object represented by the current row. Further more, theexpandedProperty()
returns a boolean property indicating the current expansion state of the current row. You can use this, or thetoggleExpanded()
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 Summary
Properties Type Property Description BooleanProperty
expanded
The expanded property can be used to inspect or mutate the toggled state of this row editor.
-
Constructor Summary
Constructors Constructor Description TableRowDataFeatures(TableRow<S> tableRow, TableRowExpanderColumn<S> tableColumn, S value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanProperty
expandedProperty()
The expanded property can be used to inspect or mutate the toggled state of this row editor.TableRowExpanderColumn<S>
getTableColumn()
Return the TableColumn which contains the toggle button.TableRow<S>
getTableRow()
Return the current TableRow.S
getValue()
The value represented by the current table row.Boolean
isExpanded()
Returns a boolean indicating if the current row is expanded or notvoid
setExpanded(Boolean expanded)
Set the expanded state.void
toggleExpanded()
Toggle the expanded state of this row 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)
-
-
Constructor Detail
-
TableRowDataFeatures
public TableRowDataFeatures(TableRow<S> tableRow, TableRowExpanderColumn<S> tableColumn, S value)
-
-
Method Detail
-
getTableRow
public TableRow<S> getTableRow()
Return the current TableRow. It is safe to assume that the index returned byIndexedCell.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 theexpandedProperty()
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 theexpandedProperty()
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
-
-