Skip to main content



      Home
Home » Eclipse Projects » NatTable » Custom Editors
Custom Editors [message #900319] Mon, 06 August 2012 09:17 Go to next message
Eclipse UserFriend
Hey everyone,

which is the way to go for some custom cell editors?
Looking at http://eclipse.org/nattable/documentation.php?page=editing there are three predefined editors which may be used.

So, if I extend the AbstractCellEditor and implement the method:
activateCell(Composite parent, Object originalCanonicalValue, Character initialEditValue);
with my custom editor would that do the trick?

I would really appreciate some help on this, thanks in advance.

Re: Custom Editors [message #900321 is a reply to message #900319] Mon, 06 August 2012 09:32 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

this depends on what kind of editor you want to create? As you may have read in the documentation, every cell editor comes with a painter. So you may want to add a custom painter to your custom cell editor. And you need to register your custom cell editor to the UiBindingRegistry like this

uiBindingRegistry.registerFirstSingleClickBinding(
    new BodyCellEditorMouseEventMatcher(MyCellEditor.class), 
    new MouseEditAction());


so your editor will be activated on mouse click.

There is also a cell editor that is yet undocumented as it is not officially released. The PasswordCellEditor with a PasswordTextPainter. Just in case you need something like that.

Greez,
Dirk
Re: Custom Editors [message #900427 is a reply to message #900321] Tue, 07 August 2012 01:18 Go to previous message
Eclipse UserFriend
Hey Dirk,
We have some custom popup dialogs for editing collections which I am trying to integrate.
The uiBindingRegistry is exactly what I was looking for! Thank you very much!

Regards,

Marcus
Previous Topic:Support for JFace TableViewer Providers
Next Topic:TreeNatTableExample - single selection on expand/collapse image doesn't work
Goto Forum:
  


Current Time: Sat Oct 25 13:58:05 EDT 2025

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

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

Back to the top