Class VFXTableColumnBehavior<T, C extends VFXTableCell<T>>
java.lang.Object
io.github.palexdev.mfxcore.behavior.BehaviorBase<VFXTableColumn<T,C>>
io.github.palexdev.virtualizedfx.table.defaults.VFXTableColumnBehavior<T,C>
public class VFXTableColumnBehavior<T, C extends VFXTableCell<T>>
extends io.github.palexdev.mfxcore.behavior.BehaviorBase<VFXTableColumn<T,C>>
This is the default behavior implementation for
VFXTableColumn. This basic behavior instantiates a
RegionDragResizer which allows you to resize the column with the mouse cursor at runtime.
For the resizer to work, a series of conditions must be met:
1) the feature must be enabled by the VFXTableColumn.gestureResizableProperty()
2) the table's instance must not be null
3) the table's layout mode must be set to ColumnsLayoutMode.VARIABLE.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected io.github.palexdev.mfxcore.utils.resize.RegionDragResizer -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanTheRegionDragResizerused here is an inline custom extension which uses this method to determine whether the column can be resized or not.voiddispose()voidinit()protected voidThis method is responsible for enabling/disabling theRegionDragResizerby usingAbstractDragResizer.makeResizable()orAbstractDragResizer.uninstall().Methods inherited from class io.github.palexdev.mfxcore.behavior.BehaviorBase
getActions, getNode, keyPressed, keyPressed, keyReleased, keyReleased, keyTyped, keyTyped, mouseClicked, mouseClicked, mouseDragged, mouseDragged, mouseEntered, mouseEntered, mouseExited, mouseExited, mouseMoved, mouseMoved, mousePressed, mousePressed, mouseReleased, mouseReleased, register, scroll, scroll, touchMoved, touchMoved, touchPressed, touchPressed, touchReleased, touchReleased, touchStationary, touchStationary
-
Field Details
-
resizer
protected io.github.palexdev.mfxcore.utils.resize.RegionDragResizer resizer
-
-
Constructor Details
-
VFXTableColumnBehavior
-
-
Method Details
-
onResizableChanged
protected void onResizableChanged()This method is responsible for enabling/disabling theRegionDragResizerby usingAbstractDragResizer.makeResizable()orAbstractDragResizer.uninstall().Beware, this is automatically called by the default skin when needed. Neither the resizer nor this class check whether it is already enabled, which means that additional calls may add the same handlers multiple times, causing potential memory leaks!
-
canResize
protected boolean canResize()TheRegionDragResizerused here is an inline custom extension which uses this method to determine whether the column can be resized or not. -
init
public void init()- Overrides:
initin classio.github.palexdev.mfxcore.behavior.BehaviorBase<VFXTableColumn<T, C extends VFXTableCell<T>>>
-
dispose
public void dispose()Also disposed theRegionDragResizer.- Overrides:
disposein classio.github.palexdev.mfxcore.behavior.BehaviorBase<VFXTableColumn<T, C extends VFXTableCell<T>>>
-