- java.lang.Object
-
- javafx.scene.Node
-
- javafx.scene.Parent
-
- javafx.scene.layout.Region
-
- javafx.scene.control.Control
-
- javafx.scene.control.Labeled
-
- javafx.scene.control.Cell<T>
-
- javafx.scene.control.IndexedCell<T>
-
- javafx.scene.control.TreeTableRow<T>
-
- 参数类型
-
T
- 单元格中包含的项目的类型。
- All Implemented Interfaces:
-
Styleable
,EventTarget
,Skinnable
public class TreeTableRow<T> extends IndexedCell<T>
TreeTableRow是一个
IndexedCell
,但很少需要由开发人员使用创建TreeTableView实例。 TreeTableRow在开发人员完全可能遇到的唯一时间是,如果他们希望创建一个自定义的rowFactory
来替代TreeTableView的整个行。通常情况下,开发人员更容易定制行中的单个单元格,而不是整行。 为此,您可以在每个TreeTableColumn实例上指定一个自定义的
cellFactory
。- 从以下版本开始:
- JavaFX 8.0
- 另请参见:
-
TreeTableView
,TreeTableColumn
,TreeTableCell
,IndexedCell
,Cell
-
-
Property Summary
Properties Type Property 描述 ObjectProperty<Node>
disclosureNode
公开节点通常被视为在屏幕上旋转的三角形,以指示其旁边放置的TreeItem是否被展开或折叠。ReadOnlyObjectProperty<TreeItem<T>>
treeItem
每个TreeTableCell最多代表一个TreeItem
,由该属性表示。ReadOnlyObjectProperty<TreeTableView<T>>
treeTableView
TreeTableCell显式链接到一个TreeTableView
实例,由该属性表示。-
Properties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltip
-
Properties inherited from class javafx.scene.control.IndexedCell
index
-
Properties inherited from class javafx.scene.control.Labeled
alignment, contentDisplay, ellipsisString, font, graphic, graphicTextGap, labelPadding, lineSpacing, mnemonicParsing, textAlignment, textFill, textOverrun, text, underline, wrapText
-
Properties inherited from class javafx.scene.Node
accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
-
Properties inherited from class javafx.scene.Parent
needsLayout
-
Properties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
-
-
Field Summary
-
Fields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT
-
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZE
-
-
构造方法摘要
构造方法 Constructor 描述 TreeTableRow()
创建一个默认的TreeTableRow实例。
-
方法摘要
所有方法 接口方法 具体的方法 Modifier and Type 方法 描述 void
cancelEdit()
调用此功能从编辑状态转换为非编辑状态,而不保存任何用户输入。void
commitEdit(T newValue)
在适当的时候调用此功能(根据您的单元格编辑用户界面的用户交互需求)来执行以下两件事:将相应的事件反馈回支持UI控件(例如protected Skin<?>
createDefaultSkin()
为此控件创建一个新的默认皮肤实例。ObjectProperty<Node>
disclosureNodeProperty()
公开节点通常被视为在屏幕上旋转的三角形,以指示其旁边放置的TreeItem是否被展开或折叠。void
executeAccessibleAction(AccessibleAction action, Object... parameters)
该方法由辅助技术调用,请求执行由参数指示的动作。Node
getDisclosureNode()
返回此TreeTableCell中设置的当前披露节点。TreeItem<T>
getTreeItem()
返回当前在此TreeTableRow中设置的TreeItem。TreeTableView<T>
getTreeTableView()
返回与此TreeTableCell关联的TreeTableView。Object
queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
该方法由辅助技术调用以请求属性的值。void
setDisclosureNode(Node value)
用作“披露”三角形的节点,或用于展开和折叠项目的切换。void
startEdit()
调用此功能从非编辑状态转换到编辑状态,如果单元格是可编辑的。ReadOnlyObjectProperty<TreeItem<T>>
treeItemProperty()
每个TreeTableCell最多代表一个TreeItem
,由该属性表示。ReadOnlyObjectProperty<TreeTableView<T>>
treeTableViewProperty()
TreeTableCell显式链接到一个TreeTableView
实例,由该属性表示。void
updateTreeItem(TreeItem<T> treeItem)
更新与此TreeTableCell关联的TreeItem。void
updateTreeTableView(TreeTableView<T> treeTable)
更新与此TreeTableCell关联的TreeTableView。-
Methods inherited from class javafx.scene.control.Cell
editableProperty, editingProperty, emptyProperty, getInitialFocusTraversable, getItem, isEditable, isEditing, isEmpty, isItemChanged, isSelected, itemProperty, layoutChildren, selectedProperty, setEditable, setItem, updateItem, updateSelected
-
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getContextMenu, getCssMetaData, getSkin, getTooltip, isResizable, setContextMenu, setSkin, setTooltip, skinProperty, tooltipProperty
-
Methods inherited from class javafx.scene.control.IndexedCell
getIndex, indexProperty, updateIndex
-
Methods inherited from class javafx.scene.control.Labeled
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
-
Methods inherited from class javafx.scene.Node
accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBounds
-
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
-
Methods inherited from interface javafx.css.Styleable
getStyleableNode
-
-
-
-
Property Detail
-
treeItem
public final ReadOnlyObjectProperty<TreeItem<T>> treeItemProperty
每个TreeTableCell最多代表一个TreeItem
,由该属性表示。- 结果
- 树项属性
-
disclosureNode
public final ObjectProperty<Node> disclosureNodeProperty
公开节点通常被视为在屏幕上旋转的三角形,以指示其旁边放置的TreeItem是否被展开或折叠。
-
treeTableView
public final ReadOnlyObjectProperty<TreeTableView<T>> treeTableViewProperty
TreeTableCell显式链接到一个TreeTableView
实例,由该属性表示。- 另请参见:
-
getTreeTableView()
-
-
方法详细信息
-
getTreeItem
public final TreeItem<T> getTreeItem()
返回当前在此TreeTableRow中设置的TreeItem。- 结果
- 当前TreeTableRow中设置了TreeItem
-
treeItemProperty
public final ReadOnlyObjectProperty<TreeItem<T>> treeItemProperty()
每个TreeTableCell最多代表一个TreeItem
,由该属性表示。- 结果
- 树项属性
-
setDisclosureNode
public final void setDisclosureNode(Node value)
用作“披露”三角形的节点,或用于展开和折叠项目的切换。 这仅在包含子项目的树中的项目的情况下使用。 如果没有指定,TreeTableCell的Skin实现负责提供默认的公开节点。- 参数
-
value
- 披露节点
-
getDisclosureNode
public final Node getDisclosureNode()
返回此TreeTableCell中设置的当前披露节点。- 结果
- 披露节点
-
disclosureNodeProperty
public final ObjectProperty<Node> disclosureNodeProperty()
公开节点通常被视为在屏幕上旋转的三角形,以指示其旁边放置的TreeItem是否被展开或折叠。
-
getTreeTableView
public final TreeTableView<T> getTreeTableView()
返回与此TreeTableCell关联的TreeTableView。- 结果
- 树表视图
-
treeTableViewProperty
public final ReadOnlyObjectProperty<TreeTableView<T>> treeTableViewProperty()
TreeTableCell显式链接到一个TreeTableView
实例,由该属性表示。- 另请参见:
-
getTreeTableView()
-
startEdit
public void startEdit()
调用此功能从非编辑状态转换到编辑状态,如果单元格是可编辑的。 如果这个单元格已经处于编辑状态,它将保留在它中。
-
commitEdit
public void commitEdit(T newValue)
在适当的时候调用此功能(基于您的单元格编辑用户界面的用户交互要求)来做两件事情:- 将适当的事件触发回到支持UI控件(例如
ListView
)。 这将开始将此编辑推回相关数据源/属性(尽管不能保证这将成功 - 这取决于正在使用的特定编辑提交处理程序)。 有关更多详细信息,请参阅UI控件类javadoc。 - 开始从编辑状态转换到非编辑状态。
一般来说,在自定义单元实现中无需重写此方法 - 在适当的时候简单地调用此方法就足够了(例如,当用户按Enter键时,可以执行像
cell.commitEdit(converter.fromString(textField.getText()));
- 重写:
-
commitEdit
在Cell<T>
- 参数
-
newValue
- 作为最终用户输入的值,应该以相关的方式持续提供支持用户界面的数据源和UI控件的安装编辑提交处理程序。
- 将适当的事件触发回到支持UI控件(例如
-
cancelEdit
public void cancelEdit()
调用此功能从编辑状态转换为非编辑状态,而不保存任何用户输入。- 重写:
-
cancelEdit
在Cell<T>
-
updateTreeTableView
public final void updateTreeTableView(TreeTableView<T> treeTable)
更新与此TreeTableCell关联的TreeTableView。- 参数
-
treeTable
- 应该与此TreeTableCell相关联的新TreeTableView。 注意:此功能主要由专家使用,主要由实施新皮肤的人员使用。 开发人员或设计师直接访问此功能并不常见。
-
updateTreeItem
public final void updateTreeItem(TreeItem<T> treeItem)
更新与此TreeTableCell关联的TreeItem。- 参数
-
treeItem
- 应该与此TreeTableCell相关联的新TreeItem。 注意:此功能主要由专家使用,主要由实施新皮肤的人员使用。 开发人员或设计师直接访问此功能并不常见。
-
createDefaultSkin
protected Skin<?> createDefaultSkin()
为此控件创建一个新的默认皮肤实例。 如果没有通过CSS-fx-skin
提供皮肤,或者在具有setSkin(...)
的子类中显式设置,则调用它来创建控件的皮肤。- 重写:
-
createDefaultSkin
在Control
- 结果
- 此控件的默认皮肤的新实例。 如果为null,则控件将没有皮肤,除非由css提供。
-
queryAccessibleAttribute
public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters)
该方法由辅助技术调用以请求属性的值。子类通常覆盖此方法来实现特定角色所需的属性。
如果未处理特定属性,则必须调用超类实现。- 重写:
-
queryAccessibleAttribute
在Control
- 参数
-
attribute
- 请求的属性 -
parameters
- 可选参数列表 - 结果
- 请求的属性的值
- 另请参见:
-
AccessibleAttribute
-
executeAccessibleAction
public void executeAccessibleAction(AccessibleAction action, Object... parameters)
该方法由辅助技术调用,请求执行由参数指示的动作。此方法通常被子类覆盖,以实现特定角色所需的操作。
如果未处理特定操作,则必须调用超类实现。- 重写:
-
executeAccessibleAction
在Control
- 参数
-
action
- 执行的动作 -
parameters
- 可选参数列表 - 另请参见:
-
AccessibleAction
-
-