java.lang.Object
net.yetihafen.javafx.customcaption.DragRegion
All Implemented Interfaces:
ShowInitializable
Direct Known Subclasses:
MenuBarDragRegion

public class DragRegion extends Object implements ShowInitializable
  • Constructor Summary

    Constructors
    Constructor
    Description
    DragRegion(javafx.scene.Node base)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addExcludeBounds(javafx.scene.Node node)
    adds a node to exclude its area
    boolean
    contains(double x, double y)
    check if any given point is in the specified area (excluded areas are considered)
    boolean
    contains(javafx.geometry.Point2D p)
    check if any given point is in the specified area (excluded areas are considered)
    javafx.scene.Node
     
    void
    this function is designed to be called after Stage.show() has been called to configure customizations should only be called once per stage

    Methods inherited from class java.lang.Object

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

    • DragRegion

      public DragRegion(javafx.scene.Node base)
  • Method Details

    • contains

      public boolean contains(javafx.geometry.Point2D p)
      check if any given point is in the specified area (excluded areas are considered)
      Parameters:
      p - the Point2D (screen coordinates)
      Returns:
      true if the point is inside the specified area
    • contains

      public boolean contains(double x, double y)
      check if any given point is in the specified area (excluded areas are considered)
      Parameters:
      x - the x coordinate (in screen coordinates)
      y - the y coordinate (in screen coordinates)
      Returns:
      true if the point is inside the specified area
    • addExcludeBounds

      public DragRegion addExcludeBounds(javafx.scene.Node node)
      adds a node to exclude its area
      Parameters:
      node - the node to exclude
    • getBase

      public javafx.scene.Node getBase()
    • showInit

      public void showInit()
      Description copied from interface: ShowInitializable
      this function is designed to be called after Stage.show() has been called to configure customizations should only be called once per stage
      Specified by:
      showInit in interface ShowInitializable