[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-openjfx-dev
Subject:    Thoughts about the use cases for Dialog
From:       "Keimel, Christoph" <c.keimel () emsw ! de>
Date:       2014-09-19 13:02:26
Message-ID: 8FF6D5A0093A1041873F086CCB503A2D4E76C7D3 () EM08VMSX ! emsw ! local
[Download RAW message or body]

Hi

I am playing around with the new Dialog API in 8u40. I am evaluating if the=
 Dialog class could be the base for a custom Dialog implementation (Wizard)=
 for use in a business application. The use cases for these dialogs usually=
 require the calculation of the return value based on user input. This calc=
ulation may be a long running operation, in which case a progress bar shoul=
d be displayed and the operation should be cancellable. If the operation is=
 cancelled or could not be completed because of i.e. a database error, the =
dialog should stay open, so the user may change his input and try again.

I am unsure, on how to setup the actions of the buttons. I tried to use a r=
esult converter to start a Service which is bound to the progress bar, canc=
el button and so on. This doesn't work of course, because the dialog will c=
lose before the service is done with its calculation. Since I cannot overwr=
ite the event handler for the dialog buttons, the workaround I found was to=
 consume the ActionEvent.ACTION in the capturing phase with an event filter=
 and bypass the result converter altogether (which smells like a hack to me=
 ...). Am I missing something here?

Considering my difficulties above, I have the feeling that the dialogs may =
only be targeted for small input or information dialogs like the Alert dial=
og where the result value can be processed after the dialog has been closed=
. On the other hand, the API itself seems to have had larger constructs (i.=
e. Wizards) in mind, since there are things like a ButtonType.NEXT.

What are your thoughts and plans concerning the Dialog class?

Thanks for your time!

Smile
Christoph
--
Christoph Keimel
EM-SOFTWARE GmbH


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic