Skip to main content



      Home
Home » Eclipse Projects » NatTable » checkbox column double-click event
checkbox column double-click event [message #1774420] Fri, 13 October 2017 19:21 Go to next message
Eclipse UserFriend
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 04:38 Go to previous message
Eclipse UserFriend
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 Jul 04 09:27:52 EDT 2025

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

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

Back to the top