Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » FormText in Cell
FormText in Cell [message #1830227] Tue, 21 July 2020 08:19 Go to next message
Benedict Wright is currently offline Benedict WrightFriend
Messages: 10
Registered: February 2019
Junior Member
I have a text that is HTML formatted AND contains a link.
The RichTextCellPainter is able to render the formatted text, however it does not render the links, nor is it possible to add a LinkListener.

On the other hand there exists a FormText widget (org.eclipse.ui.forms.widgets.FormText) that supports exactly that.

My question: Is there a cellpainter that supports FormText, or is this something considered by the devs (Feature Request)?
Re: FormText in Cell [message #1830229 is a reply to message #1830227] Tue, 21 July 2020 08:51 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 47
Registered: March 2020
Member
No there is no cellpainter that supports FormText. This is for several reasons:
- NatTable does not have any dependency to org.eclipse.ui packages, as we are a SWT/JFace widget.
- FormText is by itself a widget. And therefore could be only integrated as an editor control, but not as a painter. The painter is rendering on a Canvas. It does not stack widgets.

That said, a painter for FormText input would need the same feature implementation as the missing feature in the RichTextCellPainter. The rendering of the link (how is the information provided by FormText?) and the implementation of a listener that gets triggered on click on the link. Here the complexity is in getting the interaction with NatTable to work together with the interaction in the painter to trigger some action. And the actions could also vary from opening the link in a browser up to jumping to another cell in the table.

I know two approaches that tried to contribute this, but they never got finished because of underestimating the complexity of this topic.

There is this feature request for Nebula RichText: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511353
There is this feature request for NatTable: https://bugs.eclipse.org/bugs/show_bug.cgi?id=511104

Without some sort of sponsoring I don't think that I will have the time to implement that feature soon. But NatTable is an open source project. So if you want to work on this and contribute back, I will be happy to review and to integrate it in Nebula RichText and NatTable.
Re: FormText in Cell [message #1830231 is a reply to message #1830229] Tue, 21 July 2020 09:20 Go to previous message
Benedict Wright is currently offline Benedict WrightFriend
Messages: 10
Registered: February 2019
Junior Member
Thank you for your quick and detailed response.
Previous Topic:Row spanning not working when table is scrolled
Next Topic:Right-Click-Selection-Update with open Context Menu
Goto Forum:
  


Current Time: Tue Apr 23 15:56:18 GMT 2024

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

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

Back to the top