TreeItem property.
Cell type used with the TreeView control. In addition to
the API defined on IndexedCell, the TreeCell
exposes additional states and pseudo classes for use by CSS.
A TreeCell watches the selection model of the TreeView for which it is
associated, ensuring that it visually indicates to the user whether it is
selected. When a TreeCell is selected, this is exposed both via the
selected property, as well as via the 'selected'
CSS pseudo class state.
Due to the fact that TreeCell extends from IndexedCell, each TreeCell
also provides an index property. The index will be
updated as cells are expanded and collapsed, and therefore should be
considered a view index rather than a model index.
Finally, each TreeCell also has a reference back to the TreeView that it is being used with. Each TreeCell belongs to one and only one TreeView.
TreeView, TreeItem
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancelEdit()
Overrides javafx. Cancels an edit to the value of the cell. |
| public void | commitEdit(T newValue)
Overrides javafx. Commits an edit to the value of the cell. |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final ObjectProperty | Returns: the disclosure nodeThe disclosure node is commonly seen represented as a triangle that rotates on screen to indicate whether or not the TreeItem that it is placed beside is expanded or collapsed. |
| private void | |
| public void | executeAccessibleAction(AccessibleAction action, Object... parameters)
Overrides javafx. This method is called by the assistive technology to request the action indicated by the argument should be executed. |
| public final Node | Returns: the current disclosure node set in this TreeCellReturns the current disclosure node set in this TreeCell. |
| public final TreeItem | Returns: the TreeItem currently set in this TreeCellReturns the TreeItem currently set in this TreeCell. |
| public final TreeView | Returns: the TreeView associated with this TreeCellReturns the TreeView associated with this TreeCell. |
| pack-priv void | indexChanged(int oldIndex, int newIndex)
Overrides javafx. This method is called whenever the index is changed, regardless of whether the new index is the same as the old index. |
| public Object | queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
Overrides javafx. This method is called by the assistive technology to request the value for an attribute. |
| public final void | setDisclosureNode(Node
the disclosure node value)The node to use as the "disclosure" triangle, or toggle, used for expanding and collapsing items. |
| private void | |
| private void | |
| public void | |
| public final ReadOnlyObjectProperty | Returns: the TreeItem property representing this TreeCellEach TreeCell represents at most a single |
| public final ReadOnlyObjectProperty | Returns: the TreeView property of this TreeCellA TreeCell is explicitly linked to a single |
| private void | |
| private void | |
| private void | |
| private void | |
| public final void | updateTreeItem(TreeItem<T>
The new TreeItem that should be associated with this
TreeCell.
treeItem)Note This function is intended to be used by experts, primarily by those implementing new Skins. It is not common for developers or designers to access this function directly. Updates the TreeItem associated with this TreeCell. |
| public final void | updateTreeView(TreeView<T>
The new TreeView that should be associated with this TreeCell.
tree)Note This function is intended to be used by experts, primarily by those implementing new Skins. It is not common for developers or designers to access this function directly. Updates the TreeView associated with this TreeCell. |
| COLLAPSED_PSEUDOCLASS_STATE | back to summary |
|---|---|
| private static final PseudoClass COLLAPSED_PSEUDOCLASS_STATE | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS | |
| disclosureNode | back to summary |
|---|---|
| private ObjectProperty<Node> disclosureNode | |
| editingListener | back to summary |
|---|---|
| private final InvalidationListener editingListener | |
| EXPANDED_PSEUDOCLASS_STATE | back to summary |
|---|---|
| private static final PseudoClass EXPANDED_PSEUDOCLASS_STATE | |
| focusedListener | back to summary |
|---|---|
| private final InvalidationListener focusedListener | |
| focusModelPropertyListener | back to summary |
|---|---|
| private final ChangeListener<FocusModel<TreeItem<T>>> focusModelPropertyListener Listens to the focusModel property on the TreeView. Whenever the entire model is changed, we have to unhook the weakFocusedListener and update the focus. | |
| isFirstRun | back to summary |
|---|---|
| private boolean isFirstRun | |
| leafListener | back to summary |
|---|---|
| private final InvalidationListener leafListener | |
| oldIsExpanded | back to summary |
|---|---|
| private boolean oldIsExpanded | |
| rootPropertyListener | back to summary |
|---|---|
| private final InvalidationListener rootPropertyListener | |
| selectedListener | back to summary |
|---|---|
| private final ListChangeListener<Integer> selectedListener | |
| selectionModelPropertyListener | back to summary |
|---|---|
| private final ChangeListener<MultipleSelectionModel<TreeItem<T>>> selectionModelPropertyListener Listens to the selectionModel property on the TreeView. Whenever the entire model is changed, we have to unhook the weakSelectedListener and update the selection. | |
| treeItem | back to summary |
|---|---|
| private ReadOnlyObjectWrapper<TreeItem<T>> treeItem | |
| treeItemAtStartEdit | back to summary |
|---|---|
| private TreeItem<T> treeItemAtStartEdit | |
| treeItemExpandedInvalidationListener | back to summary |
|---|---|
| private final InvalidationListener treeItemExpandedInvalidationListener | |
| treeView | back to summary |
|---|---|
| private ReadOnlyObjectWrapper<TreeView<T>> treeView | |
| updateEditingIndex | back to summary |
|---|---|
| private boolean updateEditingIndex | |
| weakEditingListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakEditingListener | |
| weakFocusedListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakFocusedListener | |
| weakFocusModelPropertyListener | back to summary |
|---|---|
| private final WeakChangeListener<FocusModel<TreeItem<T>>> weakFocusModelPropertyListener | |
| weakLeafListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakLeafListener | |
| weakRootPropertyListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakRootPropertyListener | |
| weakSelectedListener | back to summary |
|---|---|
| private final WeakListChangeListener<Integer> weakSelectedListener | |
| weakSelectionModelPropertyListener | back to summary |
|---|---|
| private final WeakChangeListener<MultipleSelectionModel<TreeItem<T>>> weakSelectionModelPropertyListener | |
| weakTreeItemExpandedInvalidationListener | back to summary |
|---|---|
| private final WeakInvalidationListener weakTreeItemExpandedInvalidationListener | |
| TreeCell | back to summary |
|---|---|
| public TreeCell() Creates a default TreeCell instance. | |
| cancelEdit | back to summary |
|---|---|
| public void cancelEdit() Overrides javafx. Doc from javafx. Cancels an edit to the value of the cell. Call this function to transition from an editing state into a non-editing state, without saving any user input.
| |
| commitEdit | back to summary |
|---|---|
| public void commitEdit(T newValue) Overrides javafx. Doc from javafx. Commits an edit to the value of the cell. Call this function when appropriate (based on the user interaction requirements of your cell editing user interface) to do two things:
In general there is no need to override this method in custom cell
implementations - it should be sufficient to simply call this method
when appropriate (e.g., when the user pressed the Enter key, you may do something
like
| |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS
| |
| disclosureNodeProperty | back to summary |
|---|---|
| public final ObjectProperty The disclosure node is commonly seen represented as a triangle that rotates on screen to indicate whether or not the TreeItem that it is placed beside is expanded or collapsed.
| |
| doCancelEditing | back to summary |
|---|---|
| private void doCancelEditing() | |
| executeAccessibleAction | back to summary |
|---|---|
| public void executeAccessibleAction(AccessibleAction action, Object... parameters) Overrides javafx. Doc from javafx. This method is called by the assistive technology to request the action indicated by the argument should be executed.
This method is commonly overridden by subclasses to implement
action that are required for a specific role.
| |
| getDisclosureNode | back to summary |
|---|---|
| public final Node getDisclosureNode() Returns the current disclosure node set in this TreeCell.
| |
| getTreeItem | back to summary |
|---|---|
| public final TreeItem Returns the TreeItem currently set in this TreeCell.
| |
| getTreeView | back to summary |
|---|---|
| public final TreeView Returns the TreeView associated with this TreeCell.
| |
| indexChanged | back to summary |
|---|---|
| pack-priv void indexChanged(int oldIndex, int newIndex) Overrides javafx. Doc from javafx. This method is called whenever the index is changed, regardless of whether the new index is the same as the old index.
| |
| queryAccessibleAttribute | back to summary |
|---|---|
| public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) Overrides javafx. Doc from javafx. This method is called by the assistive technology to request the value for an attribute.
This method is commonly overridden by subclasses to implement
attributes that are required for a specific role.
| |
| setDisclosureNode | back to summary |
|---|---|
| public final void setDisclosureNode(Node value) The node to use as the "disclosure" triangle, or toggle, used for expanding and collapsing items. This is only used in the case of an item in the tree which contains child items. If not specified, the TreeCell's Skin implementation is responsible for providing a default disclosure node.
| |
| setTreeItem | back to summary |
|---|---|
| private void setTreeItem(TreeItem<T> value) | |
| setTreeView | back to summary |
|---|---|
| private void setTreeView(TreeView<T> value) | |
| startEdit | back to summary |
|---|---|
| public void startEdit() Overrides javafx. Doc from javafx. Starts an edit to the value of the cell. Call this function to transition from a non-editing state into an editing state, if the cell is editable. If this cell is already in an editing state, it will stay in it.
| |
| treeItemProperty | back to summary |
|---|---|
| public final ReadOnlyObjectProperty Each TreeCell represents at most a single
| |
| treeViewProperty | back to summary |
|---|---|
| public final ReadOnlyObjectProperty A TreeCell is explicitly linked to a single
| |
| updateEditing | back to summary |
|---|---|
| private void updateEditing() | |
| updateFocus | back to summary |
|---|---|
| private void updateFocus() | |
| updateItem | back to summary |
|---|---|
| private void updateItem(int oldIndex) | |
| updateSelection | back to summary |
|---|---|
| private void updateSelection() | |
| updateTreeItem | back to summary |
|---|---|
| public final void updateTreeItem(TreeItem<T> treeItem) Updates the TreeItem associated with this TreeCell.
| |
| updateTreeView | back to summary |
|---|---|
| public final void updateTreeView(TreeView<T> tree) Updates the TreeView associated with this TreeCell.
| |