Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Traversal and MultiLineTextCellEditor
Traversal and MultiLineTextCellEditor [message #1745718] Sat, 15 October 2016 22:02 Go to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 193
Registered: July 2009
Senior Member
Hi all,
I've a NatTable with some "normal" text fields and one cell with a MultiLineTextCellEditor configured (e.g., in column 4). Now, if I select a cell in column 3 the cell gets editable (which is correct). After pressing the TAB key the selection moves to the next right cell. The MultiLineTextCellEditor opens and the application freezes.
How can I achieve that the MultiLineTextCellEditor is only opened at double click or F2 key instead of a single click or a traversal event? Is it possible to edit it in "normal mode" and (after pressing F2) in MultiLineTextCellEditor?

Btw., is there a reasonable way to open the MultiLineTextCellEditor nearby the cell which is edited? I've configured it to open in the center of my main application screen, but if this is moved the dialog opens elsewhere...

TIA,
Ralf.
Re: Traversal and MultiLineTextCellEditor [message #1745719 is a reply to message #1745718] Sat, 15 October 2016 22:15 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2624
Registered: July 2012
Senior Member
I don't understand your problem with the MultiLineTextCellEditor. IIRC it is also included in the EditorExample where it works as expected. At least as far as I can remember.

If you want to have different editors or editor behavior for different interactions, use corresponding configurations. One example was recently asked here in the forum.
https://www.eclipse.org/forums/index.php/t/1080459/
Re: Traversal and MultiLineTextCellEditor [message #1745720 is a reply to message #1745719] Sat, 15 October 2016 22:49 Go to previous messageGo to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 193
Registered: July 2009
Senior Member
Hi Dirk,
the problem is that the MultiLineTextCellEditor opens if I tab through the cells.

Example:
# click on the first cell of a row ... switch to edit mode
# press tab ... select next cell in edit mode
# press tab ... select next cell and multiline dialog is opened.

The last action only should switch the cell into edit mode, not open the multiline dialog.
The post you referred to is for calling the multiline dialog in *every* case, independent of the original configuration (as far as I understood this). I need at least the cell label for a decision.

Regards,
Ralf.
Re: Traversal and MultiLineTextCellEditor [message #1745723 is a reply to message #1745720] Sun, 16 October 2016 06:27 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2624
Registered: July 2012
Senior Member
First, multi line editing can be in a dialog, it doesn't have to be.

Second, yes that post is about opening always a dialog for editing. You need to adapt the principle to match your needs.
Re: Traversal and MultiLineTextCellEditor [message #1745962 is a reply to message #1745723] Wed, 19 October 2016 21:34 Go to previous messageGo to next message
Ralf Heydenreich is currently offline Ralf HeydenreichFriend
Messages: 193
Registered: July 2009
Senior Member
Hi Dirk,
my first post was about freezing the applicaton. This occurs if you TAB through the fields and reach one of the configured MultiLineTextCellEditor. After opening this dialog the applicaton hangs. I've debugged a little and found out that this is caused by ViewportLayer. Here's a bug fix which one has implemented to work around another problem:

                // add a listener that is ensuring to keep the selection in the
                // viewport for 100ms
                // this is necessary for keeping the cell in the viewport if
                // automatically resize events are generated (see Bug 411670)
                if (this.resizeEventHandler == null) {
                    this.resizeEventHandler = new KeepRowInsideViewportEventHandler(scrollableRowPosition);
                    registerEventHandler(this.resizeEventHandler);
                    Display.getCurrent().timerExec(100, new Runnable() {
                        @Override
                        public void run() {
                            unregisterEventHandler(ViewportLayer.this.resizeEventHandler);
                            ViewportLayer.this.resizeEventHandler = null;
                        }
                    });
                }


Now, if I comment out this code no freeze occurs. Is it possible that this event is permanently called? I can't get it at the moment...

Regards,
Ralf.
Re: Traversal and MultiLineTextCellEditor [message #1745971 is a reply to message #1745962] Thu, 20 October 2016 03:52 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2624
Registered: July 2012
Senior Member
Please test with the latest SNAPSHOT build as we fixed a concurrency issue in the meanwhile with regards to these lines of code
Previous Topic:TreeGridWithCheckBoxFieldsExample Sortation Problem
Next Topic:How show the Tooltip for part display cell(xxx...)
Goto Forum:
  


Current Time: Sun Nov 18 05:29:28 GMT 2018

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

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

Back to the top