Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: PopupWindow

[18:7] extends: Window

The PopupWindow class wraps javafx.stage.PopupWindow, the base for the lightweight pop-up surfaces (through PopupControl, the ContextMenu and Tooltip). It extends Window and adds the anchor position and anchor location, the auto-fix, auto-hide, and hide-on-escape behaviors, the owning node or window, and the pop-up show variants. This wrapper is not constructed directly. Concrete pop-ups extend it, mirroring the JavaFX inheritance model.

Methods

  • PopupWindow ()

    Base constructor. PopupWindow is abstract and is never instantiated on its own.

  • show (Owner)

    Shows the pop-up bound to the given owner window at its current anchor.

    • @p Owner is the owner Window, passed as a wrapper or a raw AJO.
    • @r this object for chaining
  • show (Owner, double X, double Y)

    Shows the pop-up anchored at the given screen coordinates. The owner may be a Window or a Node; the correct JavaFX overload is chosen from the owner's runtime type.

    • @p Owner is the owner Window or Node, passed as a wrapper or a raw AJO.
    • @p X is a double with the anchor x coordinate on screen.
    • @p Y is a double with the anchor y coordinate on screen.
    • @r this object for chaining
  • setAnchorX (double X)

    Sets the anchor x position of the pop-up on screen, in pixels.

    • @p X is a double with the anchor x coordinate.
    • @r this object for chaining
  • getAnchorX ()

    Returns the anchor x position of the pop-up on screen, in pixels.

    • @r A double with the anchor x coordinate.
  • anchorXProperty ()

    Returns the ReadOnlyDoubleProperty backing the anchor x position.

    • @r An AJO wrapping ReadOnlyDoubleProperty.
  • setAnchorY (double Y)

    Sets the anchor y position of the pop-up on screen, in pixels.

    • @p Y is a double with the anchor y coordinate.
    • @r this object for chaining
  • getAnchorY ()

    Returns the anchor y position of the pop-up on screen, in pixels.

    • @r A double with the anchor y coordinate.
  • anchorYProperty ()

    Returns the ReadOnlyDoubleProperty backing the anchor y position.

    • @r An AJO wrapping ReadOnlyDoubleProperty.
  • setAnchorLocation (string Location)

    Sets which corner of the pop-up the anchor point refers to.

    • @p Location is a javafx.stage.PopupWindow$AnchorLocation constant name, for example WINDOW_TOP_LEFT, CONTENT_TOP_LEFT, or WINDOW_BOTTOM_RIGHT.
    • @r this object for chaining
  • getAnchorLocation ()

    Returns which corner of the pop-up the anchor point refers to.

    • @r An AJO wrapping javafx.stage.PopupWindow$AnchorLocation.
  • anchorLocationProperty ()

    Returns the ObjectProperty backing the anchor location.

    • @r An AJO wrapping ObjectProperty.
  • setAutoFix (bool AutoFix)

    Sets whether the pop-up is automatically repositioned to stay on screen.

    • @p AutoFix is a bool; true enables auto-fix.
    • @r this object for chaining
  • isAutoFix ()

    Returns whether auto-fix is enabled.

    • @r A bool that is true when auto-fix is enabled.
  • autoFixProperty ()

    Returns the BooleanProperty backing the auto-fix flag.

    • @r An AJO wrapping javafx.beans.property.BooleanProperty.
  • setAutoHide (bool AutoHide)

    Sets whether the pop-up hides automatically when it loses focus.

    • @p AutoHide is a bool; true enables auto-hide.
    • @r this object for chaining
  • isAutoHide ()

    Returns whether auto-hide is enabled.

    • @r A bool that is true when auto-hide is enabled.
  • autoHideProperty ()

    Returns the BooleanProperty backing the auto-hide flag.

    • @r An AJO wrapping javafx.beans.property.BooleanProperty.
  • setHideOnEscape (bool HideOnEscape)

    Sets whether the pop-up hides when the Escape key is pressed.

    • @p HideOnEscape is a bool; true enables hide-on-escape.
    • @r this object for chaining
  • isHideOnEscape ()

    Returns whether hide-on-escape is enabled.

    • @r A bool that is true when hide-on-escape is enabled.
  • hideOnEscapeProperty ()

    Returns the BooleanProperty backing the hide-on-escape flag.

    • @r An AJO wrapping javafx.beans.property.BooleanProperty.
  • setConsumeAutoHidingEvents (bool Consume)

    Sets whether the events that trigger auto-hide are consumed.

    • @p Consume is a bool; true consumes the auto-hiding events.
    • @r this object for chaining
  • getConsumeAutoHidingEvents ()

    Returns whether the events that trigger auto-hide are consumed.

    • @r A bool that is true when auto-hiding events are consumed.
  • consumeAutoHidingEventsProperty ()

    Returns the BooleanProperty backing the consume-auto-hiding-events flag.

    • @r An AJO wrapping javafx.beans.property.BooleanProperty.
  • setOnAutoHide (callback Cb)

    Registers a callback invoked when the pop-up auto-hides.

    • @p Cb is a callback invoked with an Event.
    • @r this object for chaining
  • getOnAutoHide ()

    Returns the onAutoHide handler.

    • @r An AJO wrapping javafx.event.EventHandler, or null.
  • onAutoHideProperty ()

    Returns the ObjectProperty backing the onAutoHide handler.

    • @r An AJO wrapping ObjectProperty.
  • getOwnerNode ()

    Returns the node that owns this pop-up, if any.

    • @r An AJO wrapping javafx.scene.Node, or null.
  • ownerNodeProperty ()

    Returns the ReadOnlyObjectProperty backing the owner node.

    • @r An AJO wrapping ReadOnlyObjectProperty.
  • getOwnerWindow ()

    Returns the window that owns this pop-up, if any.

    • @r An AJO wrapping javafx.stage.Window, or null.
  • ownerWindowProperty ()

    Returns the ReadOnlyObjectProperty backing the owner window.

    • @r An AJO wrapping ReadOnlyObjectProperty.