Interface IUIFloatHost
- All Known Implementing Classes:
ClientSessionGyro
This is the seam between the rules of a Float and the client session. The rules - who may own a Float, that only one is open, how the open one is closed - are in IUIFloatOpener and are complete without this interface. What is here is only what cannot be done from outside the client session: a virtualized panel reaches a client through the container of virtualized panels, under the lock of the client session, and the client session caches the panels it shows. An implementation that adds or removes a Float without resetting that cache leaves IClientSessionGyro.getVirtualizedPanels() and getTopmostPanel() stale, which is why the implementation belongs inside the client session and is not a helper beside it.
The anchor and the owner are passed as they are known to the caller, virtualized in any client session or not at all. The host maps them to its own client session, because it is the host that knows what it has virtualized.
- Author:
- Christopher Mindus
Method Summary
Modifier and TypeMethodDescriptionbooleancloseFloat(UIFloat virtualFloat) Closes a Float that is open in this client session: requests its removal, as the client session does for every panel.Gets the Float that is open in this client session.openFloat(UIFloat floatPanel, UIPanelBase owner, UIComp anchor) Opens a Float in this client session: virtualizes it and adds it to the panels shown.
Method Details
getOpenFloat
UIFloat getOpenFloat()Gets the Float that is open in this client session.- Returns:
- The virtualized Float, or null if none is open. A Float whose removal has been requested is not open.
openFloat
Opens a Float in this client session: virtualizes it and adds it to the panels shown. The host neither checks the owner nor closes the Float that is open - both are done before this call, byIUIFloatOpener.- Parameters:
floatPanel- The Float to open, non-virtualized.owner- The owner panel the Float is opened for, virtualized or not. It is here for the focus engine, which decides what is presented beneath a Float; opening does not depend on it.anchor- The component the Float is anchored to, virtualized or not, null to centre the Float.- Returns:
- The virtualized Float that was added, never null.
- Throws:
PropException- If the Float cannot be virtualized or added.
closeFloat
Closes a Float that is open in this client session: requests its removal, as the client session does for every panel. The client closes it, with or without its animation, and disposes of it.- Parameters:
virtualFloat- The virtualized Float, as returned bygetOpenFloat().- Returns:
- true if the removal was requested, false if it already had been.