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

    Fields
    Modifier and Type
    Field
    Description
    protected io.github.palexdev.mfxcore.utils.resize.RegionDragResizer
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected boolean
    The RegionDragResizer used here is an inline custom extension which uses this method to determine whether the column can be resized or not.
    void
    void
     
    protected void
    This method is responsible for enabling/disabling the RegionDragResizer by using AbstractDragResizer.makeResizable() or AbstractDragResizer.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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • resizer

      protected io.github.palexdev.mfxcore.utils.resize.RegionDragResizer resizer
  • Constructor Details

    • VFXTableColumnBehavior

      public VFXTableColumnBehavior(VFXTableColumn<T,C> column)
  • Method Details

    • onResizableChanged

      protected void onResizableChanged()
      This method is responsible for enabling/disabling the RegionDragResizer by using AbstractDragResizer.makeResizable() or AbstractDragResizer.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()
      The RegionDragResizer used 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:
      init in class io.github.palexdev.mfxcore.behavior.BehaviorBase<VFXTableColumn<T, C extends VFXTableCell<T>>>
    • dispose

      public void dispose()

      Also disposed the RegionDragResizer.
      Overrides:
      dispose in class io.github.palexdev.mfxcore.behavior.BehaviorBase<VFXTableColumn<T, C extends VFXTableCell<T>>>