Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » checkbox column double-click event
checkbox column double-click event [message #1774420] Fri, 13 October 2017 23:21 Go to next message
cenk Mising name is currently offline cenk Mising nameFriend
Messages: 157
Registered: July 2009
Senior Member
Hi,
There are two columns
I added checkbox to column 0. And registered double-click event. When column 0 double-clicked event not occurred but for column 1 double-click event occurred. I tired too on TreeGridWithCheckBoxFieldsExample.java I registered double-click event

gridLayer.addConfiguration(new AbstractUiBindingConfiguration() {
			@Override
			public void configureUiBindings(UiBindingRegistry uiBindingRegistry) {

				uiBindingRegistry.registerFirstDoubleClickBinding(new CellEditorMouseEventMatcher(GridRegion.BODY),
						new IMouseAction() {

							@Override
							public void run(NatTable natTable, MouseEvent e) {
								int rowPos = natTable.getRowPositionByY(e.y);
								int bodyRowPos = LayerUtil.convertRowPosition(natTable, rowPos, bodyDataLayer);
								System.out.println("double click ok");
								

							}
						});
			}
		});


Result is same. Not double-click event occurred for column 0. Column 1 is ok
How can I find a solution?
Re: checkbox column double-click event [message #1774479 is a reply to message #1774420] Mon, 16 October 2017 08:38 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2624
Registered: July 2012
Senior Member
The issue here is the checkbox painter / editor. Why do you use the CellEditorMouseEventMatcher that performs a check for an editor? Isn't a MouseEventMatcher enough?

uiBindingRegistry.registerFirstDoubleClickBinding(new MouseEventMatcher(GridRegion.BODY, MouseEventMatcher.LEFT_BUTTON),
        new IMouseAction() {

            @Override
            public void run(NatTable natTable, MouseEvent e) {
                int rowPos = natTable.getRowPositionByY(e.y);
                int bodyRowPos = LayerUtil.convertRowPosition(natTable, rowPos, bodyDataLayer);
                System.out.println("double click ok");

            }
        });
Previous Topic:Is it possible to use the SpanningDataLayer and an ISpanningDataProvider with a GridLayer?
Next Topic:Strange celleditor behavior on Mac
Goto Forum:
  


Current Time: Fri Nov 16 20:56:59 GMT 2018

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

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

Back to the top