Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » CellEditor on DoubleCLick?
CellEditor on DoubleCLick? [message #1008020] Thu, 07 February 2013 21:53 Go to next message
Alex Kipling is currently offline Alex KiplingFriend
Messages: 260
Registered: July 2012
Senior Member
The cellEditor is triggered on leftclick now.
Is it possible to trigger it on double click?
Re: CellEditor on DoubleCLick? [message #1008386 is a reply to message #1008020] Tue, 12 February 2013 09:30 Go to previous message
Renso Lohuis is currently offline Renso LohuisFriend
Messages: 44
Registered: July 2012
You change the default edit bindings by finding the


And change it to your own and replace the single click binding by double click binding.

I did the same and mine looks like this: (I did some other changes as well to make sure that you also can edit with upper case and by pressing space)

public class ExtendedEditBindings extends AbstractUiBindingConfiguration {

	public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {
		uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.F2), new KeyEditAction());
		uiBindingRegistry.registerKeyBinding(new KeyEventMatcher(SWT.NONE, SWT.SPACE), new KeyEditAction());

		uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(), new KeyEditAction());
		uiBindingRegistry.registerKeyBinding(new LetterOrDigitKeyEventMatcher(SWT.SHIFT), new KeyEditAction());

		uiBindingRegistry.registerDoubleClickBinding(new BodyCellEditorMouseEventMatcher(TextCellEditor.class), new MouseEditAction());

		uiBindingRegistry.registerDoubleClickBinding(new CellPainterMouseEventMatcher(
				CheckBoxPainter.class), new MouseEditAction());

		uiBindingRegistry.registerDoubleClickBinding(new BodyCellEditorMouseEventMatcher(ComboBoxCellEditor.class), new MouseEditAction());

				new BodyCellEditorMouseEventMatcher(MultiComboBoxCellEditor.class),
				new MouseEditAction());



Then find the DefaultGridLayerConfiguration change it to your own and add your own EditBindings

protected void addEditingUIConfig() {
	addConfiguration(new ExtendedEditBindings());

And use this as grid layer configuration

gridLayer.addConfiguration(new ExtendedGridLayerConfiguration(gridLayer));

[Updated on: Tue, 12 February 2013 09:31]

Report message to a moderator

Previous Topic:Scroll listener?
Next Topic:Re: Scroll listener?
Goto Forum:

Current Time: Wed Feb 26 23:06:23 GMT 2020

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

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

Back to the top