T
- The type of the item contained within the Cell.public class TreeTableRow<T> extends IndexedCell<T>
TreeTableRow is an IndexedCell
, but
rarely needs to be used by developers creating TreeTableView instances. The only
time TreeTableRow is likely to be encountered at all by a developer is if they
wish to create a custom rowFactory
that replaces an entire row of a TreeTableView.
More often than not, it is actually easier for a developer to customize
individual cells in a row, rather than the whole row itself. To do this,
you can specify a custom cellFactory
on each TreeTableColumn instance.
TreeTableView
,
TreeTableColumn
,
TreeTableCell
,
IndexedCell
,
Cell
Type | Property and Description |
---|---|
<any> |
disclosureNode
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.
|
<any> |
treeItem
Each TreeTableCell represents at most a single
TreeItem , which is
represented by this property. |
<any> |
treeTableView
A TreeTableCell is explicitly linked to a single
TreeTableView instance,
which is represented by this property. |
indexProperty
editableProperty, editingProperty, emptyProperty, itemProperty, selectedProperty
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, graphicProperty, graphicTextGapProperty, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, underlineProperty, wrapTextProperty
contextMenuProperty, skinClassNameProperty, skinProperty, tooltipProperty
Modifier and Type | Field and Description |
---|---|
private static PseudoClass |
COLLAPSED_PSEUDOCLASS_STATE |
private static java.lang.String |
DEFAULT_STYLE_CLASS
*
Stylesheet Handling *
*
|
private <any> |
disclosureNode |
private InvalidationListener |
editingListener |
private static PseudoClass |
EXPANDED_PSEUDOCLASS_STATE |
private InvalidationListener |
focusedListener |
private int |
index
*
Private Implementation *
*
|
private boolean |
isFirstRun |
private InvalidationListener |
leafListener |
private boolean |
oldExpanded |
private <any> |
selectedListener
*
Callbacks and events *
*
|
private <any> |
treeItem
*
Properties *
*
|
private InvalidationListener |
treeItemExpandedInvalidationListener |
private <any> |
treeTableView |
private WeakInvalidationListener |
weakEditingListener |
private WeakInvalidationListener |
weakFocusedListener |
private WeakInvalidationListener |
weakLeafListener |
private <any> |
weakSelectedListener |
private WeakInvalidationListener |
weakTreeItemExpandedInvalidationListener |
Constructor and Description |
---|
TreeTableRow()
Creates a default TreeTableRow instance.
|
Modifier and Type | Method and Description |
---|---|
void |
cancelEdit()
Call this function to transition from an editing state into a non-editing
state, without saving any user input.
|
void |
commitEdit(T newValue)
Call this function when appropriate (based on the user interaction requirements
of your cell editing user interface) to do two things:
Fire the appropriate events back to the backing UI control (e.g.
|
protected Skin<?> |
createDefaultSkin()
Create a new instance of the default skin for this control.
|
<any> |
disclosureNodeProperty()
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.
|
void |
executeAccessibleAction(AccessibleAction action,
java.lang.Object... parameters) |
Node |
getDisclosureNode()
Returns the current disclosure node set in this TreeTableCell.
|
TreeItem<T> |
getTreeItem()
Returns the TreeItem currently set in this TreeTableRow.
|
TreeTableView<T> |
getTreeTableView()
Returns the TreeTableView associated with this TreeTableCell.
|
(package private) void |
indexChanged(int oldIndex,
int newIndex)
*
Public API *
*
|
java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
void |
setDisclosureNode(Node value)
The node to use as the "disclosure" triangle, or toggle, used for
expanding and collapsing items.
|
private void |
setTreeItem(TreeItem<T> value) |
private void |
setTreeTableView(TreeTableView<T> value) |
void |
startEdit()
Call this function to transition from a non-editing state into an editing
state, if the cell is editable.
|
<any> |
treeItemProperty()
Each TreeTableCell represents at most a single
TreeItem , which is
represented by this property. |
<any> |
treeTableViewProperty()
A TreeTableCell is explicitly linked to a single
TreeTableView instance,
which is represented by this property. |
private void |
updateEditing() |
private void |
updateFocus() |
private void |
updateItem() |
private void |
updateSelection() |
void |
updateTreeItem(TreeItem<T> treeItem)
Updates the TreeItem associated with this TreeTableCell.
|
void |
updateTreeTableView(TreeTableView<T> treeTable)
Updates the TreeTableView associated with this TreeTableCell.
|
getIndex, indexProperty, updateIndex
editableProperty, editingProperty, emptyProperty, getInitialFocusTraversable, getItem, isEditable, isEditing, isEmpty, isItemChanged, isSelected, itemProperty, layoutChildren, selectedProperty, setEditable, setItem, setSelected, updateItem, updateSelected
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, getAlignment, getClassCssMetaData, getContentBias, getContentDisplay, getControlCssMetaData, getEllipsisString, getFont, getGraphic, getGraphicTextGap, getInitialAlignment, getLabelPadding, getLineSpacing, getText, getTextAlignment, getTextFill, getTextOverrun, graphicProperty, graphicTextGapProperty, isMnemonicParsing, isUnderline, isWrapText, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, setAlignment, setContentDisplay, setEllipsisString, setFont, setGraphic, setGraphicTextGap, setLineSpacing, setMnemonicParsing, setText, setTextAlignment, setTextFill, setTextOverrun, setUnderline, setWrapText, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, toString, underlineProperty, wrapTextProperty
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getContextMenu, getControlChildren, getCssMetaData, getSkin, getTooltip, isResizable, loadSkinClass, setContextMenu, setSkin, setTooltip, skinClassNameProperty, skinProperty, tooltipProperty
public final <any> treeItemProperty
TreeItem
, which is
represented by this property.public final <any> disclosureNodeProperty
getDisclosureNode()
,
setDisclosureNode(Node)
public final <any> treeTableViewProperty
TreeTableView
instance,
which is represented by this property.getTreeTableView()
private final <any> selectedListener
private final InvalidationListener focusedListener
private final InvalidationListener editingListener
private final InvalidationListener leafListener
private boolean oldExpanded
private final InvalidationListener treeItemExpandedInvalidationListener
private final <any> weakSelectedListener
private final WeakInvalidationListener weakFocusedListener
private final WeakInvalidationListener weakEditingListener
private final WeakInvalidationListener weakLeafListener
private final WeakInvalidationListener weakTreeItemExpandedInvalidationListener
private <any> treeItem
private <any> disclosureNode
private <any> treeTableView
private int index
private boolean isFirstRun
private static final java.lang.String DEFAULT_STYLE_CLASS
private static final PseudoClass EXPANDED_PSEUDOCLASS_STATE
private static final PseudoClass COLLAPSED_PSEUDOCLASS_STATE
public final TreeItem<T> getTreeItem()
public final <any> treeItemProperty()
TreeItem
, which is
represented by this property.public final void setDisclosureNode(Node value)
value
- the disclosure nodepublic final Node getDisclosureNode()
public final <any> disclosureNodeProperty()
getDisclosureNode()
,
setDisclosureNode(Node)
private void setTreeTableView(TreeTableView<T> value)
public final TreeTableView<T> getTreeTableView()
public final <any> treeTableViewProperty()
TreeTableView
instance,
which is represented by this property.getTreeTableView()
void indexChanged(int oldIndex, int newIndex)
indexChanged
in class IndexedCell<T>
oldIndex
- newIndex
- public void startEdit()
public void commitEdit(T newValue)
ListView
). This will begin the process of pushing this edit
back to the relevant data source / property (although it does not
guarantee that this will be successful - that is dependent upon the
specific edit commit handler being used). Refer to the UI control
class javadoc for more detail.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 cell.commitEdit(converter.fromString(textField.getText()));
commitEdit
in class Cell<T>
newValue
- The value as input by the end user, which should be
persisted in the relevant way given the data source underpinning the
user interface and the install edit commit handler of the UI control.public void cancelEdit()
cancelEdit
in class Cell<T>
private void updateItem()
private void updateSelection()
private void updateFocus()
private void updateEditing()
public final void updateTreeTableView(TreeTableView<T> treeTable)
treeTable
- The new TreeTableView that should be associated with this
TreeTableCell.
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.public final void updateTreeItem(TreeItem<T> treeItem)
treeItem
- The new TreeItem that should be associated with this
TreeTableCell.
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.protected Skin<?> createDefaultSkin()
-fx-skin
or set explicitly in a sub-class with setSkin(...)
.createDefaultSkin
in class Control
public java.lang.Object queryAccessibleAttribute(AccessibleAttribute attribute, java.lang.Object... parameters)
queryAccessibleAttribute
in class Control
public void executeAccessibleAction(AccessibleAction action, java.lang.Object... parameters)
executeAccessibleAction
in class Control