Class VFXSimpleTableCell<T,E>
java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
javafx.scene.control.Control
io.github.palexdev.mfxcore.controls.Control<CellBaseBehavior<T>>
io.github.palexdev.virtualizedfx.cells.VFXCellBase<T>
io.github.palexdev.virtualizedfx.cells.VFXSimpleTableCell<T,E>
- All Implemented Interfaces:
io.github.palexdev.mfxcore.behavior.WithBehavior<CellBaseBehavior<T>>,VFXStyleable,VFXCell<T>,VFXMappingTableCell<T,,E> VFXTableCell<T>,javafx.css.Styleable,javafx.event.EventTarget,javafx.scene.control.Skinnable
- Direct Known Subclasses:
VFXObservingTableCell
Extension of
VFXCellBase which also implements VFXMappingTableCell. Uses an inline extension of VFXLabeledCellSkin
as the default skin (see below why). This is intended to be used with models that do not use JavaFX's properties.
Expands the default style classes to be: ".cell-base" and ".table-cell".
There are four new properties:
1) The columnProperty() holds the column that created the cell.
2) The rowProperty() holds the row containing the cell.
3) The getExtractor() is the function used to extract a piece of data VFXSimpleTableCell from an item of type VFXSimpleTableCell.
Note that the extractor function should take into account null inputs!
4) The getConverter() is a helper class which converts data of type VFXSimpleTableCell to a String.
The method buildSkin() will build an inline extension of VFXLabeledCellSkin to override its
VFXLabeledCellSkin.update() method and make use of the converter.
-
Property Summary
PropertiesTypePropertyDescriptionjavafx.beans.property.ReadOnlyObjectProperty<VFXTableColumn<T, ? extends VFXTableCell<T>>> Specifies the instance of the column that created this cell.javafx.beans.property.ReadOnlyObjectProperty<VFXTableRow<T>> Specifies the instance of the row that contains this cell.Properties inherited from class io.github.palexdev.virtualizedfx.cells.VFXCellBase
alignment, graphic, index, itemProperties inherited from class io.github.palexdev.mfxcore.controls.Control
behaviorProviderProperties inherited from class javafx.scene.control.Control
contextMenu, skin, tooltipProperties inherited from class javafx.scene.layout.Region
background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties 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, focusVisible, focusWithin, 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 -
Field Summary
Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected io.github.palexdev.mfxcore.controls.SkinBase<?, ?> javafx.beans.property.ReadOnlyObjectProperty<VFXTableColumn<T, ? extends VFXTableCell<T>>> Specifies the instance of the column that created this cell.VFXTableColumn<T, ? extends VFXTableCell<T>> Gets the value of thecolumnproperty.javafx.util.StringConverter<E> getRow()Gets the value of therowproperty.intgetTable()javafx.beans.property.ReadOnlyObjectProperty<VFXTableRow<T>> Specifies the instance of the row that contains this cell.protected voidsetColumn(VFXTableColumn<T, ? extends VFXTableCell<T>> column) Sets the value of thecolumnproperty.setConverter(javafx.util.StringConverter<E> converter) setExtractor(Function<T, E> extractor) Sets the function used to extract a valueVFXMappingTableCellfrom an itemVFXMappingTableCellprotected voidsetRow(VFXTableRow<T> row) Sets the value of therowproperty.voidupdateColumn(VFXTableColumn<T, ? extends VFXTableCell<T>> column) Automatically called by theVFXTablesubsystem on all its cells to allow storing the instance of the column that created them.voidupdateRow(VFXTableRow<T> row) Automatically called by theVFXTablesubsystem on all its cells to allow storing the instance of the row that contains them.Methods inherited from class io.github.palexdev.virtualizedfx.cells.VFXCellBase
alignmentProperty, defaultBehaviorProvider, dispose, getAlignment, getClassCssMetaData, getContainer, getControlCssMetaData, getGraphic, getIndex, getItem, graphicProperty, indexProperty, itemProperty, onCreated, setAlignment, setGraphic, setIndex, setItem, toNode, updateIndex, updateItemMethods inherited from class io.github.palexdev.mfxcore.controls.Control
behaviorProviderProperty, changeSkin, createDefaultSkin, getBehavior, getBehaviorProvider, sceneBuilderIntegration, setBehaviorProviderMethods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, executeAccessibleAction, getBaselineOffset, getContextMenu, getCssMetaData, getInitialFocusTraversable, getSkin, getTooltip, isResizable, layoutChildren, queryAccessibleAttribute, setContextMenu, setSkin, setTooltip, skinProperty, tooltipPropertyMethods 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, widthPropertyMethods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, focusVisibleProperty, focusWithinProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getContentBias, 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, isFocusVisible, isFocusWithin, 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, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visiblePropertyMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNodeMethods inherited from interface io.github.palexdev.virtualizedfx.cells.base.VFXCell
afterLayout, beforeLayout, dispose, onCache, onCreated, onDeCache, toNode, updateIndex, updateItemMethods inherited from interface io.github.palexdev.virtualizedfx.cells.base.VFXMappingTableCell
setConverterMethods inherited from interface io.github.palexdev.virtualizedfx.base.VFXStyleable
setDefaultStyleClassesMethods inherited from interface io.github.palexdev.mfxcore.behavior.WithBehavior
setDefaultBehaviorProvider
-
Property Details
-
column
public javafx.beans.property.ReadOnlyObjectProperty<VFXTableColumn<T,? extends VFXTableCell<T>>> columnPropertySpecifies the instance of the column that created this cell.- See Also:
-
row
Specifies the instance of the row that contains this cell.- See Also:
-
-
Constructor Details
-
VFXSimpleTableCell
-
VFXSimpleTableCell
-
-
Method Details
-
getTable
- Returns:
- the
VFXTableinstance by using therowProperty().Nullif the row instance has not been set yet.
-
getRowIndex
public int getRowIndex()- Returns:
- the index of the row containing this cell by using the
rowProperty(). -1 if the row instance has not been set yet.
-
buildSkin
protected io.github.palexdev.mfxcore.controls.SkinBase<?,?> buildSkin()- Specified by:
buildSkinin classio.github.palexdev.mfxcore.controls.Control<CellBaseBehavior<T>>
-
defaultStyleClasses
- Specified by:
defaultStyleClassesin interfaceVFXStyleable- Overrides:
defaultStyleClassesin classVFXCellBase<T>- Returns:
- a list containing all the component's default style classes
-
updateColumn
Description copied from interface:VFXTableCellAutomatically called by theVFXTablesubsystem on all its cells to allow storing the instance of the column that created them.- Specified by:
updateColumnin interfaceVFXTableCell<T>
-
updateRow
Description copied from interface:VFXTableCellAutomatically called by theVFXTablesubsystem on all its cells to allow storing the instance of the row that contains them.- Specified by:
updateRowin interfaceVFXTableCell<T>
-
getColumn
Gets the value of thecolumnproperty.- Property description:
- Specifies the instance of the column that created this cell.
- Returns:
- the value of the
columnproperty - See Also:
-
columnProperty
public javafx.beans.property.ReadOnlyObjectProperty<VFXTableColumn<T,? extends VFXTableCell<T>>> columnProperty()Specifies the instance of the column that created this cell.- Returns:
- the
columnproperty - See Also:
-
setColumn
Sets the value of thecolumnproperty.- Property description:
- Specifies the instance of the column that created this cell.
- Parameters:
column- the value for thecolumnproperty- See Also:
-
getRow
Gets the value of therowproperty.- Property description:
- Specifies the instance of the row that contains this cell.
- Returns:
- the value of the
rowproperty - See Also:
-
rowProperty
Specifies the instance of the row that contains this cell.- Returns:
- the
rowproperty - See Also:
-
setRow
Sets the value of therowproperty.- Property description:
- Specifies the instance of the row that contains this cell.
- Parameters:
row- the value for therowproperty- See Also:
-
getExtractor
- Specified by:
getExtractorin interfaceVFXMappingTableCell<T,E> - Returns:
- the function used to extract a value
VFXMappingTableCellfrom an itemVFXMappingTableCell
-
setExtractor
Description copied from interface:VFXMappingTableCellSets the function used to extract a valueVFXMappingTableCellfrom an itemVFXMappingTableCell- Specified by:
setExtractorin interfaceVFXMappingTableCell<T,E>
-
getConverter
- Specified by:
getConverterin interfaceVFXMappingTableCell<T,E> - Returns:
- the
StringConverterused to convert an extracted valueVFXMappingTableCellto aString
-
setConverter
Description copied from interface:VFXMappingTableCell- Specified by:
setConverterin interfaceVFXMappingTableCell<T,E>
-