Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » NatTable scroll bar appears all time when event list is cleared
NatTable scroll bar appears all time when event list is cleared [message #1237992] Fri, 31 January 2014 05:32 Go to next message
Ali Malik is currently offline Ali MalikFriend
Messages: 27
Registered: August 2013
Junior Member
Hi,

I have a situation in which I use a selection listener from another table, which updates my NatTable with the selection changed.

Every time I update my nattable, I have to clear the event list. But once I clear the event list, there appears a vertical scroll bar, for no reason! And the scroll bar remains there even if there is only one row in it. It goes away only when the table is empty.

I tried disabling the scroll bar by using
natTable.getVerticalBar().setVisible(false)


But no use. I also made sure that the composite in which he table resides, also have the NO_SCROLL option.

Am i missing something here? Or there is a workaround for it?

However, I don't want the scroll bar to be disabled permanently, I want the scroll bar where it should be visible.

I tried giving the SWT.NONE style to the NatTable constructor, and it didn't show the scroll bars, but it also didn't show it when there were more records to be shown and the scroll bar was necessary.

Thanks,
Tony

[Updated on: Fri, 31 January 2014 05:44]

Report message to a moderator

Re: NatTable scroll bar appears all time when event list is cleared [message #1238028 is a reply to message #1237992] Fri, 31 January 2014 07:42 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
Sounds like https://bugs.eclipse.org/bugs/show_bug.cgi?id=426722

Please test your use case with the current development SNAPSHOT to see if the issue is solved there. Otherwise create a new ticket so we are sure to fix it before the 1.1 release.
Re: NatTable scroll bar appears all time when event list is cleared [message #1239000 is a reply to message #1238028] Mon, 03 February 2014 04:17 Go to previous messageGo to next message
Ali Malik is currently offline Ali MalikFriend
Messages: 27
Registered: August 2013
Junior Member
Sure, I will get back to you on this.

Tony
Re: NatTable scroll bar appears all time when event list is cleared [message #1244250 is a reply to message #1239000] Wed, 12 February 2014 04:27 Go to previous messageGo to next message
Ali Malik is currently offline Ali MalikFriend
Messages: 27
Registered: August 2013
Junior Member
Hi Drik,

I tried it with the latest SNAPSHOT but it didn't work.
So do I have to make a test case for adding a ticket on it?

Another very annoying issue, that arises only with this scroll bar is: If there are more than 2 trees in the table, and I compress one of the trees by clicking on the '-' button, the whole table vanishes except the last 2 3 rows.
Any idea what might be wrong?
A known bug perhaps? Or I might be doing something wrong?
Because when I don't clear the event list, neither the scroll bar issue appears, neither my tree breaks down.

Tony
Re: NatTable scroll bar appears all time when event list is cleared [message #1244299 is a reply to message #1244250] Wed, 12 February 2014 06:16 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
Maybe it is a runtime issue. It could also be that the clearing of the list is being processed while you add new new elements, and that causes the inconsistencies.

If you are using the latest development snapshot you might want to try to deactivate the GlazedListsEventLayer prior your updates and activate it again afterwards.

For the ticket, yes please provide an example so I'm able to reproduce the issue.

Re: NatTable scroll bar appears all time when event list is cleared [message #1244314 is a reply to message #1244299] Wed, 12 February 2014 06:42 Go to previous messageGo to next message
Ali Malik is currently offline Ali MalikFriend
Messages: 27
Registered: August 2013
Junior Member
I acquired the lock before clearing the event list, so that won't be the issue.
I will try deactivating the GlazedListsEventLayer...
Re: NatTable scroll bar appears all time when event list is cleared [message #1244349 is a reply to message #1244314] Wed, 12 February 2014 07:47 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
I don't think the lock is the issue. Because the list changes will fire according change events that are handled by NatTable. Don't mix concurrency handling in the collection with the event handling in NatTable.
Re: NatTable scroll bar appears all time when event list is cleared [message #1244374 is a reply to message #1244349] Wed, 12 February 2014 08:30 Go to previous messageGo to next message
Ali Malik is currently offline Ali MalikFriend
Messages: 27
Registered: August 2013
Junior Member
Right.
Could you provide some detail on how to deactivate/activate the GlazedListsEventLayer?
I couldn't find it on my own.

Tony
Re: NatTable scroll bar appears all time when event list is cleared [message #1244471 is a reply to message #1244374] Wed, 12 February 2014 11:40 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2525
Registered: July 2012
Senior Member
In the current development branch you will find API to do that.

GlazedListsEventLayer.deactivate() and GlazedListsEventLayer.activate()
Re: NatTable scroll bar appears all time when event list is cleared [message #1250507 is a reply to message #1244471] Wed, 19 February 2014 10:04 Go to previous message
Ali Malik is currently offline Ali MalikFriend
Messages: 27
Registered: August 2013
Junior Member
Hi Dirk,

Due to some reason the nattable repo wasn't updated.
I updated it again, and my scroll bar problem plus the tree problem, was solved.

Sorry for the confusion.

Tony
Previous Topic:Mouse Event handling problem
Next Topic:Misbehaving two-level column groups
Goto Forum:
  


Current Time: Tue Nov 21 12:24:21 GMT 2017

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

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