| Summary: | Make Dialogs usable from threadless life cycle | ||
|---|---|---|---|
| Product: | [RT] RAP | Reporter: | Rüdiger Herrmann <ruediger.herrmann> |
| Component: | RWT | Assignee: | Project Inbox <rap-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | ||
| Version: | unspecified | ||
| Target Milestone: | 1.5 M1 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
| Bug Depends on: | |||
| Bug Blocks: | 341761 | ||
|
Description
Rüdiger Herrmann
Dialog now implements Adaptable. Dialog#getAdapter() returns an IDialogAdapter that can be used to open dialogs in a non-blocking way.
In addition, I created preliminary API for application code to use this feature. org.eclipse.rwt.widgets.DialogUtil#open() can be used to open a given dialog without blocking and a DialogCallback can be supplied to be notified when the dialog was closed.
Alternatively the API could offer an abstract class _NonBlockingDialog_ (or similar) that combines the open() method from DialogUtil with the dialogClosed() callback method from DialogCallback.
abstract class NonBlockingDialog {
NonBlockingDialog( Dialog dialog ) {
// ...
}
void open() {
// ...
}
abstract void dialogClosed( int returnCode )
}
application code:
NonBlockingDialog dialog = new NonBlockingDialog( fontDialog ) {
void dialogClosed( int returnCode ) {
// ...
}
}
What do you think?
|