Thoughts on Dialogs and Lightboxes
Dr. Michael Paus
mp at jugs.org
Sat Mar 31 04:26:48 PDT 2012
I'd very much appreciate such a feature and please make it available in
JFX Flow.
It is always easier to make comments or proposals if you have some real code
to play with.
Michael
Am 31.03.2012 05:50, schrieb Daniel Zwolenski:
> I'm curious what the plans are for Dialogs in JavaFX. I assume they are on the roadmap?
>
> I notice hints of this from Jonathon here: http://javafx-jira.kenai.com/browse/RT-12643
>
> But I see the request is as yet unresolved.
>
> The reason I ask is because I've had to implement my own 'Lightbox' framework for my last project and I'm wondering if some part of this or something similar should be in JFX. I know a lot of people on the forums have been looking for classic dialog support from JFX.
>
> If you don't know already, a Lightbox is the web's answer to Dialogs, where a dialog-like pane is layered on top of the main content with a semi-transparent glass pane making it basically modal. The dialog is still within the main browser window, so it's not a true Popup but to the user is much the same.
>
> The end result looks like this:
>
> http://okonet.ru/projects/modalbox/images/screenshot.jpg
>
> It is quite easy to implement this in JFX using a StackPane as the base. The simple API is just to have some kind of LightboxPane (or RootPane, etc) that extends StackPane and includes a method like:
>
> showInLightbox(Node node)
>
> This then adds a 'glass pane' to the top of the Stack to dim out the content, and then adds the node to this glass pane. The node's visibility could be tracked to determine when to remove the glass pane, etc.
>
> The API can be extended beyond this simple setup quite drastically to include things like decorated boxes (title bar, close button, resize edges, etc), animated entry/exit, and 'dialog options' such as ok, cancel (ie JOptionPane like functions).
>
> My stuff needs cleaning up but I was planning to eventually roll my framework into JFX Flow. If it's on the JFX roadmap anyway, better not to, or at least I'd like the API to mirror JFX Dialogs if possible.
>
> Thoughts and comments?
--
--------------------------------------------------------------------------------------
Dr. Michael Paus, Chairman of the Java User Group Stuttgart e.V. (JUGS).
For more information visit www.jugs.de.
More information about the openjfx-dev
mailing list