Module MaterialFX

Class PopupPositionBean

java.lang.Object
io.github.palexdev.materialfx.beans.PopupPositionBean

public class PopupPositionBean extends Object
A useful bean which gives info about a MFXPopup's position and owner.

The purpose of this bean is to provide a way to communicate between the popup and its skin. The precise location of a popup cannot be computed when the show methods are called because the content has not been laid out yet, thus its sizes/bounds are 0. This changes when the skin is created, at that moment all info about the content are available so this bean is necessary to properly reposition and animate the popup.
  • Constructor Details

    • PopupPositionBean

      public PopupPositionBean(Node owner, PositionBean positionBean, Alignment alignment, double xOffset, double yOffset)
  • Method Details

    • getOwner

      public Node getOwner()
      Returns:
      the popup's owner
    • getOwnerBounds

      public Bounds getOwnerBounds()
      Returns:
      the popup owner's bounds
    • getOwnerWidth

      public double getOwnerWidth()
      Returns:
      the popup owner's width
    • getOwnerHeight

      public double getOwnerHeight()
      Returns:
      the popup owner's height
    • getPositionBean

      public PositionBean getPositionBean()
      You should NOT rely on these coordinates since as of now they do not take into account the translations made by the skin.
      Returns:
      the initial computed coordinates of the popup
    • getX

      public double getX()
      Delegate for getPositionBean().getX().
    • setX

      public void setX(double xPosition)
      Delegate for getPositionBean().setX().
    • getY

      public double getY()
      Delegate for getPositionBean().getY().
    • setY

      public void setY(double yPosition)
      Delegate for getPositionBean().setY().
    • getAlignment

      public Alignment getAlignment()
    • getHPos

      public HPos getHPos()
      Returns:
      the specified HPos
    • getVPos

      public VPos getVPos()
      Returns:
      the specified VPos
    • getXOffset

      public double getXOffset()
      Returns:
      the specified x offset
    • getYOffset

      public double getYOffset()
      Returns:
      the specified y offset