public final class TreeTableViewUtil extends Object
TreeTableView
Modifier and Type | Method and Description |
---|---|
static void |
addCtrlShiftSelectionRangeMode(javafx.scene.control.TreeTableView<?> pTreeTableView)
Support Ctrl-Shift selection.
|
static <S> void |
checkPositions(javafx.scene.control.TreeTableView<S> pTable,
javafx.scene.control.TreeTablePosition<S,?> pFromPos,
javafx.scene.control.TreeTablePosition<S,?> pToPos) |
static List<org.controlsfx.control.action.Action> |
configureCopyAccelerators(javafx.scene.control.TreeTableView<?> pTreeTableView)
Configure Ctrl-C and Ctrl-Shift-C keyboard shortcuts.
|
static void |
copy(javafx.scene.control.TreeTableView<?> pTreeTableView)
Copy selected treetable rows to clipboard.
|
static void |
ensureRowIsVisible(javafx.scene.control.TreeTableView<?> pTable,
int pRow) |
static <T> javafx.collections.ObservableList<T> |
getExpandedItems(javafx.scene.control.TreeTableView<T> pTreeTableView) |
static <T> javafx.collections.ObservableList<T> |
getExpandedItems(javafx.scene.control.TreeTableView<T> pTreeTableView,
boolean pUpdateLater) |
static <S> javafx.scene.control.TreeTablePosition<S,?> |
getFirstCellPos(javafx.scene.control.TreeTableView<S> pTable)
Returns the first cell or row position, depending on whether cell selection is enabled,
or
null if the table is empty or has no columns. |
static int |
getFirstVisibleRow(javafx.scene.control.TreeTableView<?> pTable)
Returns the first visible row or
-1 if there are no visible rows. |
static <S> javafx.scene.control.TreeTablePosition<S,?> |
getLastCellPos(javafx.scene.control.TreeTableView<S> pTable)
Returns the last cell or row position, depending on whether cell selection is enabled,
or
null if the table is empty or has no columns. |
static <T> javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>> |
getSelectedItems(javafx.scene.control.TreeTableView<T> pTreeTable) |
static <S> javafx.scene.control.TreeTablePosition<S,?> |
nextPosition(javafx.scene.control.TreeTableView<S> pTable,
javafx.scene.control.TreeTablePosition<S,?> pPos)
Returns the position of the next cell or
null if there is no next cell. |
static <S> Stream<javafx.scene.control.TreeTablePosition<S,?>> |
positionStream(javafx.scene.control.TreeTableView<S> pTable,
javafx.scene.control.TreeTablePosition<S,?> pFromPos,
javafx.scene.control.TreeTablePosition<S,?> pToPos)
Returns a stream of positions from
pFromPos (inclusive) to
pToPos (inclusive). |
static <S> javafx.scene.control.TreeTablePosition<S,?> |
prevPosition(javafx.scene.control.TreeTableView<S> pTable,
javafx.scene.control.TreeTablePosition<S,?> pPos)
Returns the position of the previous cell or
null
if there is no previous cell or if the specified position is null . |
static <T> void |
selectPosition(javafx.scene.control.TreeTableView<T> pTable,
javafx.scene.control.TreeTablePosition<T,?> pPos)
Selects the specified cell/row and ensures that it's visible.
|
static void |
selectRow(javafx.scene.control.TreeTableView<?> pTable,
int pRow)
Selects the specified row and ensures that it's visible.
|
static String |
toString(javafx.scene.control.TreeTableView<?> pTreeTableView)
Export selected rows to a string.
|
public static String toString(javafx.scene.control.TreeTableView<?> pTreeTableView)
public static void copy(javafx.scene.control.TreeTableView<?> pTreeTableView)
toString(TreeTableView)
public static List<org.controlsfx.control.action.Action> configureCopyAccelerators(javafx.scene.control.TreeTableView<?> pTreeTableView)
public static void addCtrlShiftSelectionRangeMode(javafx.scene.control.TreeTableView<?> pTreeTableView)
public static <T> javafx.collections.ObservableList<T> getExpandedItems(javafx.scene.control.TreeTableView<T> pTreeTableView)
public static <T> javafx.collections.ObservableList<T> getExpandedItems(javafx.scene.control.TreeTableView<T> pTreeTableView, boolean pUpdateLater)
public static <S> void checkPositions(javafx.scene.control.TreeTableView<S> pTable, javafx.scene.control.TreeTablePosition<S,?> pFromPos, javafx.scene.control.TreeTablePosition<S,?> pToPos)
IllegalArgumentException
- if any of the specified positions is null
,
or if an invalid position is specified as an argument, or if one of the specified
positions is row based and the other is not.public static <S> Stream<javafx.scene.control.TreeTablePosition<S,?>> positionStream(javafx.scene.control.TreeTableView<S> pTable, javafx.scene.control.TreeTablePosition<S,?> pFromPos, javafx.scene.control.TreeTablePosition<S,?> pToPos)
pFromPos
(inclusive) to
pToPos
(inclusive). If pFromPos
is greater than pToPos
,
the elements in the stream are provided in backward order.IllegalArgumentException
- if any of the specified positions is null
,
or if an invalid position is specified as an argument, or if one of the specified
positions is row based and the other is not.public static <S> javafx.scene.control.TreeTablePosition<S,?> getFirstCellPos(javafx.scene.control.TreeTableView<S> pTable)
null
if the table is empty or has no columns.public static <S> javafx.scene.control.TreeTablePosition<S,?> getLastCellPos(javafx.scene.control.TreeTableView<S> pTable)
null
if the table is empty or has no columns.public static <S> javafx.scene.control.TreeTablePosition<S,?> prevPosition(javafx.scene.control.TreeTableView<S> pTable, javafx.scene.control.TreeTablePosition<S,?> pPos)
null
if there is no previous cell or if the specified position is null
.public static <S> javafx.scene.control.TreeTablePosition<S,?> nextPosition(javafx.scene.control.TreeTableView<S> pTable, javafx.scene.control.TreeTablePosition<S,?> pPos)
null
if there is no next cell.
If the specified position is null
and the table is not empty and
there is at least one column in the table, the first cell is returned.public static <T> void selectPosition(javafx.scene.control.TreeTableView<T> pTable, javafx.scene.control.TreeTablePosition<T,?> pPos)
null
.public static void selectRow(javafx.scene.control.TreeTableView<?> pTable, int pRow)
public static void ensureRowIsVisible(javafx.scene.control.TreeTableView<?> pTable, int pRow)
public static int getFirstVisibleRow(javafx.scene.control.TreeTableView<?> pTable)
-1
if there are no visible rows.public static <T> javafx.collections.ObservableList<javafx.scene.control.TreeItem<T>> getSelectedItems(javafx.scene.control.TreeTableView<T> pTreeTable)
Copyright © 2023. All rights reserved.