Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Custom Editors
Custom Editors [message #900319] Mon, 06 August 2012 13:17 Go to next message
Marcus Denison is currently offline Marcus Denison
Messages: 2
Registered: August 2012
Junior Member
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 13:32 Go to previous messageGo to next message
Dirk Fauth is currently online Dirk Fauth
Messages: 1300
Registered: July 2012
Senior Member
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 05:18 Go to previous message
Marcus Denison is currently offline Marcus Denison
Messages: 2
Registered: August 2012
Junior Member
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:Enable Eclipse commands based on selections within NatTable
Next Topic:Sorting while Adding / Removing columns with glazed lists sort model
Goto Forum:
  


Current Time: Wed Oct 01 10:28:09 GMT 2014

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

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