How to show my dialog on top of Applet [message #534781] |
Thu, 20 May 2010 10:27 |
zezhenyan Messages: 16 Registered: March 2010 |
Junior Member |
|
|
hi,
I use browser.setUrl("/applet.html");
When I click a button, then show me a dialog.I found the part of the dialog will be showed below the applet.
my dialog extends jface dialog.
thanks all of you
but I am a new one in rap, I can not understand how to do about
4) Upon notification, have the listener overlay a tranparent IFrame on top of the plugin content.
5) When the window or shell is closed, remove the IFrame shim.
Please give me some code, thanks a lot.
now I add some code for my dialog like that:
shell.getDisplay().addFilter(SWT.Activate, new Listener() {
public void handleEvent(Event event) {
System.out.println("------------====handleEvent");
}
});
I know when I open my dialog. but how to do 4 and 5 in this listener. some code.....
thanks
tyki
[Updated on: Fri, 21 May 2010 02:09] Report message to a moderator
|
|
|
|
|
Re: How to show my dialog on top of Applet [message #534890 is a reply to message #534875] |
Thu, 20 May 2010 14:46 |
Benjamin Muskalla Messages: 338 Registered: July 2009 |
Senior Member |
|
|
Hi,
regarding integrating helper support for this could be discussed after
the 1.3 release. Maybe just post it to the dev list.
Regarding your 1) and 2) point: Instead of introducing a helper-service,
you could use display.addFilter( SWT.Activate, new Listener() {...}.
This should inform you when any shell is activated (either your own or
workbench shells).
Regards,
Ben
Austin Riddle wrote:
> Hi Zezhenyan,
>
> To be a little more helpful, the first approach that we took was:
>
> 1) Provide a listener in our system that would be notified when any
> shell was opened.
> 2) Centralize the opening of shells in the system from a helper service
> that would notify the listeners after opening the shell. (This
> obviously does not work for shells that are opened from the workbench,
> so another option is to just override open() in Shell or Window to
> provide the notification.)
>
> 3) Register this new window listener for the module with the java applet.
>
> 4) Upon notification, have the listener overlay a tranparent IFrame on
> top of the plugin content.
>
> 5) When the window or shell is closed, remove the IFrame shim. (This
> can all be done from SWT and does not require any custom widget code.)
>
> The result is that the dialog can be moved freely on top of the plugin
> content.
>
> Drawbacks:
>
> For non-modal windows, the plugin content cannot be interacted with
> while the dialog is up.
>
>
> I would love to hear some other approaches from other people. It seems
> like there should be some RAP framework convenience for this. I would
> be happy to contribute a solution if we get some input from others on
> the RAP team.
--
Benjamin Muskalla | EclipseSource Karlsruhe
http://www.eclipsesource.com | http://twitter.com/eclipsesource
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03667 seconds