java.lang.Object
io.github.palexdev.materialfx.beans.PopupPositionBean
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 Summary
ConstructorsConstructorDescriptionPopupPositionBean(Node owner, PositionBean positionBean, Alignment alignment, double xOffset, double yOffset) -
Method Summary
Modifier and TypeMethodDescriptiongetHPos()getOwner()doubledoubleYou should NOT rely on these coordinates since as of now they do not take into account the translations made by the skin.getVPos()doublegetX()Delegate forgetPositionBean().getX().doubledoublegetY()Delegate forgetPositionBean().getY().doublevoidsetX(double xPosition) Delegate forgetPositionBean().setX().voidsetY(double yPosition) Delegate forgetPositionBean().setY().
-
Constructor Details
-
PopupPositionBean
public PopupPositionBean(Node owner, PositionBean positionBean, Alignment alignment, double xOffset, double yOffset)
-
-
Method Details
-
getOwner
- Returns:
- the popup's owner
-
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
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 forgetPositionBean().getX(). -
setX
public void setX(double xPosition) Delegate forgetPositionBean().setX(). -
getY
public double getY()Delegate forgetPositionBean().getY(). -
setY
public void setY(double yPosition) Delegate forgetPositionBean().setY(). -
getAlignment
-
getHPos
- Returns:
- the specified
HPos
-
getVPos
- Returns:
- the specified
VPos
-
getXOffset
public double getXOffset()- Returns:
- the specified x offset
-
getYOffset
public double getYOffset()- Returns:
- the specified y offset
-