Module MaterialFX

Class DragResizer

java.lang.Object
io.github.palexdev.materialfx.utils.DragResizer

public class DragResizer extends Object
  • Constructor Details

  • Method Details

    • makeResizable

      public DragResizer makeResizable()
      Installs the necessary Mouse handlers to the specified Region to make it resizable.
    • uninstall

      public DragResizer uninstall()
      Removes all the Mouse handlers from the Region, also calls handleReleased(MouseEvent) to reset the Region and the DragResizer.
    • getResizeMargin

      public double getResizeMargin()
      Returns:
      the margin around the Region that a user can click in to start resizing it
    • setResizeMargin

      public DragResizer setResizeMargin(double resizeMargin)
    • getWidthConstraintFunction

      public Function<Region,Double> getWidthConstraintFunction()
      Returns:
      the function used to compute the minimum width the region can reach, values won't go below the function's result
    • setWidthConstraintFunction

      public DragResizer setWidthConstraintFunction(Function<Region,Double> widthConstraintFunction)
    • getHeightConstraintFunction

      public Function<Region,Double> getHeightConstraintFunction()
      Returns:
      the function used to compute the minimum height the region can reach, values won't go below the function's result
    • setHeightConstraintFunction

      public DragResizer setHeightConstraintFunction(Function<Region,Double> heightConstraintFunction)
    • getAllowedDirection

      public DragResizer.Direction getAllowedDirection()
      Returns:
      the allowed resize directions
    • setAllowedDirection

      public DragResizer setAllowedDirection(DragResizer.Direction allowedDirection)