Usage example:
TreeGridPluginAll rows in the DataTable can be expanded or collapsed at once using the expandAllRows and collapseAllRows methods. You can also expand or collapse individual rows using the expandRow and collapseRow methods.treeGridPlugin = new TreeGridPlugin< >(); treeGridPlugin.expandAllRows(true); DataTable dataTable = DataTable.create(); dataTable.addPlugin(treeGridPlugin);
public void TreeGridPlugin()
public void init(DataTable<T> dataTable)
dataTable
The DataTable to which this plugin is being added.
public boolean requiresUtilityColumn()
true if a utility column is required, false otherwise.
public void expandRow(TableRow<T> row, boolean recursive)
row
The TableRow to expand.
recursive
Whether to recursively expand child rows.
public void onRowAdded(DataTable<T> dataTable, TableRow<T> tableRow)
dataTable
The DataTable to which the row is added.
tableRow
The TableRow that was added.
public void onAllRowsAdded(DataTable<T> dataTable)
dataTable
The DataTable to which rows are added.
public void expandRow(TableRow<T> row)
row
The TableRow to expand.
public void expandAllRows(boolean recursive)
recursive
If true, child rows will also be expanded; otherwise, only the parent rows are expanded.
public void collapseRow(TableRow<T> row)
row
The TableRow to collapse.
public void collapseAllRows()
public Optional<List<HTMLElement>> getUtilityElements(DataTable<T> dataTable, RowCell<T> rowCell)
dataTable
The DataTable instance.
rowCell
Information about the cell.
A list of utility elements to be displayed in the cell.
public void onHeaderAdded(DataTable<T> dataTable, ColumnConfig<T> column)
dataTable
The DataTable instance.
column
The ColumnConfig that was added as a header.
public void onBeforeAddRow(DataTable<T> dataTable, TableRow<T> tableRow)
dataTable
The DataTable instance.
tableRow
The TableRow to be added.
public void handleEvent(DominoEvent event)
event
The table event to handle.
public TreeGridPlugin<T> setConfig(TreePluginConfig<T> config)
config
The configuration to set.
The TreeGridPlugin instance.
public TreePluginConfig<T> getConfig()
The current TreePluginConfig instance.
public void TreePluginConfig()
public boolean isLazy()
true if lazy loading is enabled; otherwise, false .
public TreePluginConfig<T> setLazy(boolean lazy)
lazy
true to enable lazy loading; false to disable it.
The TreePluginConfig instance.
public ParentRowCellsSupplier<T> getParentRowCellsSupplier()
The supplier for parent row cells.
public TreePluginConfig<T> setParentRowCellsSupplier(ParentRowCellsSupplier<T> parentRowCellsSupplier)
parentRowCellsSupplier
The supplier for parent row cells.
The TreePluginConfig instance.
public Supplier<ToggleIcon<?, ?>> getExpandToggleIconSupplier()
The supplier for the expand/collapse toggle icon.
public TreePluginConfig<T> setExpandToggleIconSupplier(Supplier<ToggleIcon<?, ?>> expandIconSupplier)
expandIconSupplier
The supplier for the expand/collapse toggle icon.
The TreePluginConfig instance.
public Supplier<Icon<?>> getLeafIconSupplier()
The supplier for the leaf icon.
public TreePluginConfig<T> setLeafIconSupplier(Supplier<Icon<?>> leafIconSupplier)
leafIconSupplier
The supplier for the leaf icon.
The TreePluginConfig instance.
public Function<TableRow<T>, Node> getIndentColumnElementSupplier()
The supplier for the indent column element.
public TreePluginConfig<T> setIndentColumnElementSupplier(Function<TableRow<T>, Node> indentColumnElementSupplier)
indentColumnElementSupplier
The supplier for the indent column element.
The TreePluginConfig instance.
public int getIndent()
The indentation value.
public TreePluginConfig<T> setIndent(int indent)
indent
The indentation value.
The TreePluginConfig instance.