S
- The type of the TreeTableView generic typeT
- The type of the item contained within the Cell.public class TreeTableCell<S,T> extends IndexedCell<T>
TreeTableView
. To
represent this intersection, a TreeTableCell contains an
index
property, as well as a
tableColumn
property. In addition, a TreeTableCell
instance knows what TreeTableRow
it exists in.
A note about selection: A TreeTableCell visually shows it is selected when two conditions are met:
TableSelectionModel.isSelected(int, TableColumnBase)
method
returns true for the row / column that this cell represents, andcell selection mode
property is set to true (to represent that it is allowable to select
individual cells (and not just rows of cells)).TreeTableView
,
TreeTableColumn
,
Cell
,
IndexedCell
,
TreeTableRow
Type | Property and Description |
---|---|
<any> |
tableColumn |
<any> |
tableRow |
<any> |
treeTableView
The TreeTableView associated with this TreeTableCell.
|
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 InvalidationListener |
columnIdListener |
private int |
columnIndex |
private <any> |
columnStyleClassListener |
private InvalidationListener |
columnStyleListener |
private <any> |
currentObservableValue |
private static java.lang.String |
DEFAULT_STYLE_CLASS
*
Stylesheet Handling *
*
|
private InvalidationListener |
editingListener |
private InvalidationListener |
focusedListener |
private boolean |
isFirstRun |
private boolean |
isLastVisibleColumn |
private boolean |
itemDirty
*
Callbacks and Events *
*
|
(package private) boolean |
lockItemOnEdit
*
Private fields *
*
|
private java.lang.ref.WeakReference<S> |
oldRowItemRef |
private static PseudoClass |
PSEUDO_CLASS_LAST_VISIBLE |
private InvalidationListener |
rootPropertyListener |
private <any> |
selectedListener |
private InvalidationListener |
tableRowUpdateObserver |
private <any> |
treeTableColumn
The TreeTableColumn instance that backs this TreeTableCell.
|
private <any> |
treeTableRow
The TreeTableRow that this TreeTableCell currently finds itself placed within.
|
private <any> |
treeTableView
The TreeTableView associated with this TreeTableCell.
|
private boolean |
updateEditingIndex |
private <any> |
visibleLeafColumnsListener |
private WeakInvalidationListener |
weakColumnIdListener |
private <any> |
weakColumnStyleClassListener |
private WeakInvalidationListener |
weakColumnStyleListener |
private WeakInvalidationListener |
weakEditingListener |
private WeakInvalidationListener |
weakFocusedListener |
private WeakInvalidationListener |
weakRootPropertyListener |
private <any> |
weakSelectedListener |
private WeakInvalidationListener |
weaktableRowUpdateObserver |
private <any> |
weakVisibleLeafColumnsListener |
Constructor and Description |
---|
TreeTableCell()
Constructs a default TreeTableCell instance with a style class of
'tree-table-cell'.
|
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.
|
void |
executeAccessibleAction(AccessibleAction action,
java.lang.Object... parameters) |
TreeTableColumn<S,T> |
getTableColumn()
Gets the value of the property tableColumn.
|
TreeTableRow<S> |
getTreeTableRow() |
TreeTableView<S> |
getTreeTableView()
Gets the value of the property treeTableView.
|
(package private) void |
indexChanged(int oldIndex,
int newIndex)
This method is called whenever the index is changed, regardless of whether
the new index is the same as the old index.
|
private boolean |
isInCellSelectionMode() |
protected void |
layoutChildren() |
private boolean |
match(TreeTablePosition pos) |
private void |
possiblySetId(java.lang.String idCandidate) |
private void |
possiblySetStyle(java.lang.String styleCandidate) |
java.lang.Object |
queryAccessibleAttribute(AccessibleAttribute attribute,
java.lang.Object... parameters) |
private void |
setTableColumn(TreeTableColumn<S,T> value) |
private void |
setTreeTableRow(TreeTableRow<S> value) |
private void |
setTreeTableView(TreeTableView<S> value) |
void |
startEdit()
Call this function to transition from a non-editing state into an editing
state, if the cell is editable.
|
<any> |
tableColumnProperty() |
<any> |
tableRowProperty() |
<any> |
treeTableViewProperty()
The TreeTableView associated with this TreeTableCell.
|
private <any> |
treeTableViewPropertyImpl() |
private void |
updateColumnIndex() |
private void |
updateEditing() |
private void |
updateFocus() |
private void |
updateItem(int oldIndex) |
void |
updateSelected(boolean selected)
Updates whether this cell is in a selected state or not.
|
private void |
updateSelection() |
void |
updateTreeTableColumn(TreeTableColumn<S,T> col)
Updates the TreeTableColumn associated with this TreeTableCell.
|
void |
updateTreeTableRow(TreeTableRow<S> treeTableRow)
Updates the TreeTableRow associated with this TreeTableCell.
|
void |
updateTreeTableView(TreeTableView<S> tv)
Updates the TreeTableView associated with this TreeTableCell.
|
getIndex, indexProperty, updateIndex
editableProperty, editingProperty, emptyProperty, getInitialFocusTraversable, getItem, isEditable, isEditing, isEmpty, isItemChanged, isSelected, itemProperty, selectedProperty, setEditable, setItem, setSelected, updateItem
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> tableColumnProperty
getTableColumn()
public final <any> treeTableViewProperty
getTreeTableView()
public final <any> tableRowProperty
boolean lockItemOnEdit
private boolean itemDirty
private <any> selectedListener
private final InvalidationListener focusedListener
private final InvalidationListener tableRowUpdateObserver
private final InvalidationListener editingListener
private <any> visibleLeafColumnsListener
private <any> columnStyleClassListener
private final InvalidationListener rootPropertyListener
private final InvalidationListener columnStyleListener
private final InvalidationListener columnIdListener
private final <any> weakSelectedListener
private final WeakInvalidationListener weakFocusedListener
private final WeakInvalidationListener weaktableRowUpdateObserver
private final WeakInvalidationListener weakEditingListener
private final <any> weakVisibleLeafColumnsListener
private final <any> weakColumnStyleClassListener
private final WeakInvalidationListener weakColumnStyleListener
private final WeakInvalidationListener weakColumnIdListener
private final WeakInvalidationListener weakRootPropertyListener
private <any> treeTableColumn
private <any> treeTableView
private <any> treeTableRow
private boolean isLastVisibleColumn
private int columnIndex
private boolean updateEditingIndex
private <any> currentObservableValue
private boolean isFirstRun
private java.lang.ref.WeakReference<S> oldRowItemRef
private static final java.lang.String DEFAULT_STYLE_CLASS
private static final PseudoClass PSEUDO_CLASS_LAST_VISIBLE
public TreeTableCell()
public final <any> tableColumnProperty()
getTableColumn()
private void setTableColumn(TreeTableColumn<S,T> value)
public final TreeTableColumn<S,T> getTableColumn()
private void setTreeTableView(TreeTableView<S> value)
public final TreeTableView<S> getTreeTableView()
public final <any> treeTableViewProperty()
getTreeTableView()
private <any> treeTableViewPropertyImpl()
private void setTreeTableRow(TreeTableRow<S> value)
public final TreeTableRow<S> getTreeTableRow()
public final <any> tableRowProperty()
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>
public void updateSelected(boolean selected)
updateSelected
in class Cell<T>
selected
- whether or not to select this cell.void indexChanged(int oldIndex, int newIndex)
indexChanged
in class IndexedCell<T>
private void updateColumnIndex()
private void updateSelection()
private void updateFocus()
private void updateEditing()
private boolean match(TreeTablePosition pos)
private boolean isInCellSelectionMode()
private void updateItem(int oldIndex)
protected void layoutChildren()
Cell
layoutChildren
in class Cell<T>
public final void updateTreeTableView(TreeTableView<S> tv)
tv
- the TreeTableView associated with this TreeTableCellpublic final void updateTreeTableRow(TreeTableRow<S> treeTableRow)
treeTableRow
- the TreeTableRow associated with this TreeTableCellpublic final void updateTreeTableColumn(TreeTableColumn<S,T> col)
col
- the TreeTableColumn associated with this TreeTableCellprotected Skin<?> createDefaultSkin()
-fx-skin
or set explicitly in a sub-class with setSkin(...)
.createDefaultSkin
in class Control
private void possiblySetId(java.lang.String idCandidate)
private void possiblySetStyle(java.lang.String styleCandidate)
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