Class VFXTableColumn<T, C extends VFXTableCell<T>>
- Type Parameters:
T- the type of data in the tableC- the type of cells this column will produce
- All Implemented Interfaces:
io.github.palexdev.mfxcore.behavior.WithBehavior, io.github.palexdev.mfxcore.controls.MFXSkinnable, io.github.palexdev.mfxcore.controls.MFXStyleable, WithCellFactory<T,C>, javafx.css.Styleable, javafx.event.EventTarget, javafx.scene.control.Skinnable
- Direct Known Subclasses:
VFXDefaultTableColumn
Base class that defines common properties and behaviors for all columns to be used with VFXTable.
Extends MFXLabeled for simplicity, and uses behaviors of type VFXTableColumnBehavior.
The default style class is set to '.vfx-column'.
This class has three basic properties:
-
The
tableProperty(). Every column should specify the table's instance they belong to. By default, as handled byVFXTableManager.onColumnsChanged(ListChangeListener.Change), the system will manage this property automatically, by setting or re-setting (tonull) the instance as columns are added/removed to/from the table. This is an improvement over the previous implementation which required the user to pass the table's instance to the constructors. -
The
indexProperty(). I believe it may be useful for every column to specify their position inVFXTable.getColumns(). However, there is not a fast way to know the index of a column from its instance,List.indexOf(Object)is way too slow for a virtualized container. For this reason, the property is automatically updated by theVFXTableSkinwhen a layout is performed, seeVFXTableSkin.updateColumnIndex(VFXTableColumn, int). -
Every column should specify a function to build cells for some data from the model of type
T. These functions do not have to produce different cell types necessarily. Rather, since every column is probably going to refer to a specific piece of sub-data for a class of typeT, it should tell the built cells how to map to that piece of sub-data. In fact, if you check the default cell implementations (e.g.VFXSimpleTableCell) you can see that they need an 'extractor' and 'converter' functions to work as intended.
Last but not least, every column has a VFXCellsCache instance which will hold cells that are not used anymore,
but could be in the future. Creating nodes is a very costly operation.
We can "dampen" this cost by caching and just update them when needed again. You can increment the capacity or disable
it by setting the cellsCacheCapacityProperty().
Width Handling
This new implementation handles the width in a special way. First and foremost, the width of each column is decided
by the VFXTableHelper implementation, since the base layout methods are defined there. The criteria are various.
There is the VFXTable.columnsSizeProperty() which depending on the ColumnsLayoutMode specifies the
fixed or minimum width every column must have. So, even in the latter case, we do not use Node.minWidth(double)
to determine the minimum width. If you want a column to have a specific width (in variable mode ofc!!) then you must
use this method to resize it: resize(double). This new implementation uses the Region.prefWidthProperty()
to store the user's preferred width for the column. Not only that, this 'slot'/variable/property is used by autosize methods
too VFXTable.autosizeColumn(VFXTableColumn), and should be used by gestures too (see VFXTableColumnBehavior).
The default behavior implementation allows you to resize the column at runtime with the mouse cursor. The feature can
be enabled/disabled through the gestureResizableProperty().
-
Property Summary
PropertiesTypePropertyDescriptionio.github.palexdev.mfxcore.base.properties.styleable.StyleableIntegerPropertySpecifies the maximum number of cells the cache can contain at any time.io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanPropertyThe default behaviorVFXTableColumnBehaviorallows to resize the column at runtime via gestures.javafx.beans.property.ReadOnlyIntegerPropertySpecifies the index of the columns in the listVFXTable.getColumns().Specifies the table's instance this column belongs to.Properties inherited from class io.github.palexdev.mfxcore.controls.MFXLabeled
behaviorFactory, skinFactory, textOpacityProperties inherited from class javafx.scene.control.Labeled
alignment, contentDisplay, ellipsisString, font, graphic, graphicTextGap, labelPadding, lineSpacing, mnemonicParsing, textAlignment, textFill, textOverrun, text, textTruncated, underline, wrapTextProperties 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, onMouseDragDone, 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, visibleProperties inherited from interface javafx.scene.control.Skinnable
skin -
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
ConstructorsConstructorDescriptionVFXTableColumn(String text) VFXTableColumn(String text, javafx.scene.Node graphic) -
Method Summary
Modifier and TypeMethodDescriptionprotected VFXCellsCache<T, C> cache()intDelegate forVFXCellsCache.size().io.github.palexdev.mfxcore.base.properties.styleable.StyleableIntegerPropertySpecifies the maximum number of cells the cache can contain at any time.doublecomputePrefWidth(double height) Overridden to make it public. Since we use the
Region.prefWidthProperty()to store the width we'd like the column to have, and for how JavaFX works, invokingRegion.prefWidth(double)would return a cached value which may not be what we want.context()protected VFXCellsCache<T, C> Responsible for creating the cells' cache instance used by this column.Supplier<io.github.palexdev.mfxcore.behavior.MFXBehavior<? extends javafx.scene.Node>> io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanPropertyThe default behaviorVFXTableColumnBehaviorallows to resize the column at runtime via gestures.Specifies the function used to build the cells.intGets the value of thecellsCacheCapacityproperty.static List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> intgetIndex()Gets the value of theindexproperty.getTable()Gets the value of thetableproperty.javafx.beans.property.ReadOnlyIntegerPropertySpecifies the index of the columns in the listVFXTable.getColumns().booleanGets the value of thegestureResizableproperty.protected voidonCellFactoryChanged(Function<T, C> newFactory) This core method is responsible for telling the table to update its state when a column changes its cell factory.voidDelegate forVFXCellsCache.populate().voidresize(double width) Sets the column's pref width to the given value and invokes a layout request by callingVFXTableManager.onColumnWidthChanged(VFXTableColumn).voidsetCellsCacheCapacity(int cellsCacheCapacity) Sets the value of thecellsCacheCapacityproperty.voidsetGestureResizable(boolean gestureResizable) Sets the value of thegestureResizableproperty.protected voidsetIndex(int index) Sets the value of theindexproperty.protected voidSets the value of thetableproperty.static <T> voidswapColumns(VFXTable<T> table, int i, int j) Delegates toswapColumns(ObservableList, int, int)by usingVFXTable.getColumns().static <T> voidswapColumns(javafx.collections.ObservableList<VFXTableColumn<T, ? extends VFXTableCell<T>>> columns, int i, int j) This convenience method swaps the columns at the given indexes in the given list.Specifies the table's instance this column belongs to.Methods inherited from class io.github.palexdev.mfxcore.controls.MFXLabeled
behaviorFactoryProperty, buildSkin, createDefaultSkin, getBehavior, getTextOpacity, preloadSkin, setTextOpacity, skinFactoryProperty, textOpacityPropertyMethods inherited from class javafx.scene.control.Labeled
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, getAlignment, getContentBias, getContentDisplay, getEllipsisString, getFont, getGraphic, getGraphicTextGap, getInitialAlignment, getLabelPadding, getLineSpacing, getText, getTextAlignment, getTextFill, getTextOverrun, graphicProperty, graphicTextGapProperty, isMnemonicParsing, isTextTruncated, isUnderline, isWrapText, labelPaddingProperty, lineSpacingProperty, mnemonicParsingProperty, setAlignment, setContentDisplay, setEllipsisString, setFont, setGraphic, setGraphicTextGap, setLineSpacing, setMnemonicParsing, setText, setTextAlignment, setTextFill, setTextOverrun, setUnderline, setWrapText, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, textTruncatedProperty, toString, underlineProperty, wrapTextPropertyMethods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, 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, 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, getOnMouseDragDone, 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, onMouseDragDoneProperty, 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, requestFocusTraversal, 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, setOnMouseDragDone, 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, visiblePropertyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.github.palexdev.mfxcore.controls.MFXSkinnable
defaultSkinFactory, getSkinFactory, setDefaultSkinFactory, setSkinFactoryMethods inherited from interface io.github.palexdev.mfxcore.controls.MFXStyleable
setDefaultStyleClassesMethods inherited from interface javafx.scene.control.Skinnable
getSkin, setSkin, skinPropertyMethods inherited from interface javafx.css.Styleable
getCssMetaData, getId, getPseudoClassStates, getStyle, getStyleableNode, getStyleableParent, getStyleClass, getTypeSelectorMethods inherited from interface io.github.palexdev.mfxcore.behavior.WithBehavior
getBehaviorFactory, setBehaviorFactory, setDefaultBehaviorFactoryMethods inherited from interface WithCellFactory
create, setCellFactory
-
Property Details
-
cellsCacheCapacity
public io.github.palexdev.mfxcore.base.properties.styleable.StyleableIntegerProperty cellsCacheCapacityPropertySpecifies the maximum number of cells the cache can contain at any time. Excess will not be added to the queue and disposed immediately.
Can be set in CSS via the property: '-vfx-cells-cache-capacity'.
- See Also:
-
gestureResizable
public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty gestureResizablePropertyThe default behavior
VFXTableColumnBehaviorallows to resize the column at runtime via gestures. This property is used to enable or disable such feature.This is also settable via CSS with the "-vfx-resizable" property.
- See Also:
-
table
-
index
public javafx.beans.property.ReadOnlyIntegerProperty indexPropertySpecifies the index of the columns in the list
VFXTable.getColumns(). The value will be -1 if the property has not been updated yet or if the column is not in a table.This method will be reliable 99% of the time, however, just to be sure I suggest you to use
VFXTable.indexOf(VFXTableColumn)instead.- See Also:
-
-
Constructor Details
-
VFXTableColumn
public VFXTableColumn() -
VFXTableColumn
-
VFXTableColumn
-
-
Method Details
-
swapColumns
public static <T> void swapColumns(javafx.collections.ObservableList<VFXTableColumn<T, ? extends VFXTableCell<T>>> columns, int i, int j) This convenience method swaps the columns at the given indexes in the given list.
As probably already explained in
VFXTable, since columns are concrete nodes, there's the potential risk of adding duplicates in the list which would lead to a JavaFX exception. This is the exact reason whyCollections.swap(List, int, int)cannot be used. What this method does internally, is to copy the columns to a temporary array, swap the columns in that, and finally useObservableList.setAll(Object[]). -
swapColumns
Delegates toswapColumns(ObservableList, int, int)by usingVFXTable.getColumns(). -
resize
public void resize(double width) Sets the column's pref width to the given value and invokes a layout request by callingVFXTableManager.onColumnWidthChanged(VFXTableColumn). -
createCache
Responsible for creating the cells' cache instance used by this column.- See Also:
-
defaultCellFactory
- Returns:
- the default function used to build cells. Uses
VFXSimpleTableCell.
-
onCellFactoryChanged
This core method is responsible for telling the table to update its state when a column changes its cell factory. Since every column has its own cell factory property, it would be too inconvenient to handle such case on the table side. Rather, this column implementation is responsible for communicating it to the table's manager by calling
VFXTableManager.onCellFactoryChanged(VFXTableColumn). (automatically called by the property!)This will also cause the cells' cache to clear and dispose all cached cells built by the previous factory.
-
computePrefWidth
public double computePrefWidth(double height) Overridden to make it public. Since we use the
Region.prefWidthProperty()to store the width we'd like the column to have, and for how JavaFX works, invokingRegion.prefWidth(double)would return a cached value which may not be what we want. In fact, this is useful for example when we have to autosize the column as this method will ignore such cached value and return a computed value depending solely on its content.- Overrides:
computePrefWidthin classjavafx.scene.control.Control
-
defaultBehaviorFactory
public Supplier<io.github.palexdev.mfxcore.behavior.MFXBehavior<? extends javafx.scene.Node>> defaultBehaviorFactory()- Specified by:
defaultBehaviorFactoryin interfaceio.github.palexdev.mfxcore.behavior.WithBehavior
-
defaultStyleClasses
-
getCellsCacheCapacity
public int getCellsCacheCapacity()Gets the value of thecellsCacheCapacityproperty.- Property description:
Specifies the maximum number of cells the cache can contain at any time. Excess will not be added to the queue and disposed immediately.
Can be set in CSS via the property: '-vfx-cells-cache-capacity'.
- Returns:
- the value of the
cellsCacheCapacityproperty - See Also:
-
cellsCacheCapacityProperty
public io.github.palexdev.mfxcore.base.properties.styleable.StyleableIntegerProperty cellsCacheCapacityProperty()Specifies the maximum number of cells the cache can contain at any time. Excess will not be added to the queue and disposed immediately.
Can be set in CSS via the property: '-vfx-cells-cache-capacity'.
- Returns:
- the
cellsCacheCapacityproperty - See Also:
-
setCellsCacheCapacity
public void setCellsCacheCapacity(int cellsCacheCapacity) Sets the value of thecellsCacheCapacityproperty.- Property description:
Specifies the maximum number of cells the cache can contain at any time. Excess will not be added to the queue and disposed immediately.
Can be set in CSS via the property: '-vfx-cells-cache-capacity'.
- Parameters:
cellsCacheCapacity- the value for thecellsCacheCapacityproperty- See Also:
-
isGestureResizable
public boolean isGestureResizable()Gets the value of thegestureResizableproperty.- Property description:
The default behavior
VFXTableColumnBehaviorallows to resize the column at runtime via gestures. This property is used to enable or disable such feature.This is also settable via CSS with the "-vfx-resizable" property.
- Returns:
- the value of the
gestureResizableproperty - See Also:
-
gestureResizableProperty
public io.github.palexdev.mfxcore.base.properties.styleable.StyleableBooleanProperty gestureResizableProperty()The default behavior
VFXTableColumnBehaviorallows to resize the column at runtime via gestures. This property is used to enable or disable such feature.This is also settable via CSS with the "-vfx-resizable" property.
- Returns:
- the
gestureResizableproperty - See Also:
-
setGestureResizable
public void setGestureResizable(boolean gestureResizable) Sets the value of thegestureResizableproperty.- Property description:
The default behavior
VFXTableColumnBehaviorallows to resize the column at runtime via gestures. This property is used to enable or disable such feature.This is also settable via CSS with the "-vfx-resizable" property.
- Parameters:
gestureResizable- the value for thegestureResizableproperty- See Also:
-
getClassCssMetaData
-
getControlCssMetaData
- Overrides:
getControlCssMetaDatain classio.github.palexdev.mfxcore.controls.MFXLabeled
-
cache
- Returns:
- the cells' cache instance used by this column
-
populateCache
public void populateCache()Delegate forVFXCellsCache.populate(). -
cacheSize
public int cacheSize()Delegate forVFXCellsCache.size(). -
getTable
Gets the value of thetableproperty.- Property description:
- Specifies the table's instance this column belongs to.
The value will be
nullif the column is not yet in the scene graph or if the column is not part of any table. - Returns:
- the value of the
tableproperty - See Also:
-
context
-
tableProperty
-
setTable
Sets the value of thetableproperty.- Property description:
- Specifies the table's instance this column belongs to.
The value will be
nullif the column is not yet in the scene graph or if the column is not part of any table. - Parameters:
table- the value for thetableproperty- See Also:
-
getIndex
public int getIndex()Gets the value of theindexproperty.- Property description:
Specifies the index of the columns in the list
VFXTable.getColumns(). The value will be -1 if the property has not been updated yet or if the column is not in a table.This method will be reliable 99% of the time, however, just to be sure I suggest you to use
VFXTable.indexOf(VFXTableColumn)instead.- Returns:
- the value of the
indexproperty - See Also:
-
indexProperty
public javafx.beans.property.ReadOnlyIntegerProperty indexProperty()Specifies the index of the columns in the list
VFXTable.getColumns(). The value will be -1 if the property has not been updated yet or if the column is not in a table.This method will be reliable 99% of the time, however, just to be sure I suggest you to use
VFXTable.indexOf(VFXTableColumn)instead.- Returns:
- the
indexproperty - See Also:
-
setIndex
protected void setIndex(int index) Sets the value of theindexproperty.- Property description:
Specifies the index of the columns in the list
VFXTable.getColumns(). The value will be -1 if the property has not been updated yet or if the column is not in a table.This method will be reliable 99% of the time, however, just to be sure I suggest you to use
VFXTable.indexOf(VFXTableColumn)instead.- Parameters:
index- the value for theindexproperty- See Also:
-
getCellFactory
Specifies the function used to build the cells. See alsodefaultCellFactory().- Specified by:
getCellFactoryin interfaceWithCellFactory<T, C extends VFXTableCell<T>>
-