Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » Disable row DnD while sorted
Disable row DnD while sorted [message #1714859] Tue, 17 November 2015 10:45 Go to next message
Tommy R is currently offline Tommy RFriend
Messages: 32
Registered: October 2011
Location: Hamburg
Member
Hello,

is it possible to check whether the table is currently in a sorted state? What I would like to achieve is: disable row DnD while any column is sorted.
My idea was to unregister the mouse drag mode from the ui binding registry when the table reaches a sortable state and register it again, when the table is not sorted anymore.

Is this even a good idea? Can I use any listener for this?

Regards
Tommy
Re: Disable row DnD while sorted [message #1714879 is a reply to message #1714859] Tue, 17 November 2015 12:48 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Typically you would implement a MouseEventMatcher that returns false in matches() in case you have some sorted state. And you would use the MouseEventMatcher to register the RowReorderDragMode.

Have a look at DefaultRowReorderBindings and think about how you could create a MouseEventMatcher that knows about the sorted state.
Re: Disable row DnD while sorted [message #1714894 is a reply to message #1714879] Tue, 17 November 2015 14:06 Go to previous message
Tommy R is currently offline Tommy RFriend
Messages: 32
Registered: October 2011
Location: Hamburg
Member
Thanks for the answer. I implemented my own MouseEventMatcher now and gave it the ISortModel to check whether the table is sorted in any way. That works.
Previous Topic:Update column comparators after column reorder
Next Topic:Filtering filter dropdown
Goto Forum:
  


Current Time: Thu Apr 25 04:41:06 GMT 2024

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

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

Back to the top