java.lang.Object
one.jpro.platform.routing.popup.PopupAPI
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
FieldsModifier and TypeFieldDescriptionstatic 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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidclosePopup(javafx.scene.Node anyNodeInPopup) Closes whichever popup contains the given node.static one.jpro.platform.routing.FilterReturns a filter which adds a Stackpane, which is used as a popup container.static voidopenPopup(javafx.scene.Node contextHolder, javafx.scene.Node popup) Opens a popup by looking up its container from the nearest registered holder.static voidregisterPopupContainer(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.
-
Field Details
-
POPUP_CONTAINER_CONTEXT
Map any “context holder” Node → the Pane that should host popups under it. Call registerPopupContainer(...) once at startup. -
POPUP_CONTEXT
Map every popup root Node → itself, so we can discover the popup from any child.
-
-
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 registeredpopup- 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 holderfxFuture- 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
-