Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Extending the RichTextEditor custom widget(how to handle mousedown/mousedown/contextmenu events)
Extending the RichTextEditor custom widget [message #1778605] Mon, 18 December 2017 15:26
Gunnar Adams is currently offline Gunnar AdamsFriend
Messages: 23
Registered: May 2016
Junior Member
Hi,

as I am still trying to improve the RichTextEditor widget which we are using in our application. This is a modified version of the original RAP one, where I have exchanged the CKEDITOR for version 4.6.2 (I did this some time ago) and added event handlers which notify the server widget counterpart about focus events. Also, I can set the focus into the control.

Now I have encountered the following problem:

It is a requirement in our application, that the look&feel of context menus is consistent across the application. The RichTextEditor context menu is one example where this does not work, because the CKEDITOR used internally has it's own ideas about the context menu.
I was able, though, to get a contextmenu event handler to work, which notifies me (or the server widget via notify()), when a context menu is to be shown. As our context menus are created by the server application, this is exactly what I want.

The problem is, that I have not yet figured out, how to dismiss the context menu again (based on a mousedown or ESC-Key event). Starting with the mouse events, I tried to submit the CompositeProxy which is the base for the RichTextEditor custom widget as a target for the MenuHandler.update() method, but this does not work. I suspect, that I need a "real" widget in order to do this!? as it is I get a new context menu every time I release the mouse button, but it is never removed when I click on the mouse inside the RichTextEditor.

It would be conveniant if there was some kind of function which could be used to construct an RWT event from a DOM event. Is there? It would have to be callable from a custom widget. It would also be nice if the standard event processing (EventHandlerUtil etc.) available for other widgets would be callable for custom widgets.

I understand, that rap.getObject always returns just a CompositeProxy and never the actual widget. Is this correct?

Thanks a lot for your input
Kind regards,
Gunnar Adams

Previous Topic:Inconsistencies with selection in a table via keyboard
Next Topic:[ANN] RAP 3.4 released
Goto Forum:
  


Current Time: Tue Aug 21 19:38:02 GMT 2018

Powered by FUDForum. Page generated in 0.01489 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top