java.lang.Object
one.jpro.platform.routing.popup.PopupAPI

public class PopupAPI extends Object
Provides utility methods for managing popups in a JPro application. Popups are always placed into whatever Pane you’ve registered via registerPopupContainer — and you never pass the container in manually.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final ContextManager<javafx.scene.layout.Pane>
    Map any “context holder” Node → the Pane that should host popups under it.
    static final ContextManager<javafx.scene.Node>
    Map every popup root Node → itself, so we can discover the popup from any child.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    closePopup(javafx.scene.Node anyNodeInPopup)
    Closes whichever popup contains the given node.
    static one.jpro.platform.routing.Filter
    Returns a filter which adds a Stackpane, which is used as a popup container.
    static void
    openPopup(javafx.scene.Node contextHolder, javafx.scene.Node popup)
    Opens a popup by looking up its container from the nearest registered holder.
    static void
    registerPopupContainer(javafx.scene.layout.Pane container)
    Register a node under which all popups should live.
    static <T> simplefx.experimental.parts.FXFuture<T>
    showLoadingScreen(javafx.scene.Node contextHolder, simplefx.experimental.parts.FXFuture<T> fxFuture)
    Shows a translucent loading‐indicator popup bound to an FXFuture.

    Methods inherited from class java.lang.Object

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

  • Constructor Details

    • PopupAPI

      public PopupAPI()
  • Method Details

    • registerPopupContainer

      public static void registerPopupContainer(javafx.scene.layout.Pane container)
      Register a node under which all popups should live.
      Parameters:
      container - the Pane into which popups will be added
    • openPopup

      public static void openPopup(javafx.scene.Node contextHolder, javafx.scene.Node popup)
      Opens a popup by looking up its container from the nearest registered holder.
      Parameters:
      contextHolder - any Node that was previously registered
      popup - the Node to show as a popup
    • closePopup

      public static void closePopup(javafx.scene.Node anyNodeInPopup)
      Closes whichever popup contains the given node.
      Parameters:
      anyNodeInPopup - any Node inside (or equal to) the popup
    • showLoadingScreen

      public static <T> simplefx.experimental.parts.FXFuture<T> showLoadingScreen(javafx.scene.Node contextHolder, simplefx.experimental.parts.FXFuture<T> fxFuture)
      Shows a translucent loading‐indicator popup bound to an FXFuture.
      Type Parameters:
      T - the future’s result type
      Parameters:
      contextHolder - any Node that was registered as a container holder
      fxFuture - when this completes, the loading popup will auto-close
    • createPopupContainerFilter

      public static one.jpro.platform.routing.Filter createPopupContainerFilter()
      Returns a filter which adds a Stackpane, which is used as a popup container.
      Returns:
      a filter which adds a Stackpane, which is used as a popup container