User resizing of columns is wrong [message #1852995] |
Tue, 14 June 2022 05:50  |
Eclipse User |
|
|
|
Hi,
I have a table with 20 columns. Number 4 is programmatically frozen (last post issue). Now I want to resize the columns using the mouse. It works fine for the columns before the frozen one. If I resize the one number 5, it resizes yet number 0. So, the user event triggers the action with the wrong targeted column..
Any Idea What I am missing?
Thank you!
Mokhtar
[Updated on: Tue, 14 June 2022 05:51] by Moderator
|
|
|
|
|
|
|
|
|
|
|
|
Re: User resizing of columns is wrong [message #1853200 is a reply to message #1853192] |
Wed, 22 June 2022 10:33   |
Eclipse User |
|
|
|
Dirk Fauth wrote on Wed, 22 June 2022 11:49I have no idea what you are talking about. It sounds like the position transformation is not working correctly, but in all of our examples and test cases it works correctly. I can't tell what is wrong on your side, and actually such "customizations" and overrides could be a cause in the end.
Quote:In general, the fact that the developer handles this core UI stuff herself is frustrating and not getting better...
I'm not sure if you are blaming me and the NatTable framework. You call it "core UI stuff" but from my point of view this is a very powerful, feature rich and therefore unfortunately complicated widget framework to create rich tables. Compared to any UI framework I know, there is nothing comparable. If people tend to think they know everything better and override stuff themselves without knowing and understanding the concepts, then they have to find out themselves what is going wrong. From my point of view the framework works as intended and is used by many projects. The problems you describe here have not been reported ever before. So I doubt that the issue is in NatTable, as you are not even able to create something that would reproduce the issue.
That you brought it, take this:
- Any UI framework/library that is not declarative by definition is just a pain.
- And any even declarative UI framework that is in Java (even worse eclipse) based is a more pain.
- HTML, CSS & JS (e.g. React) is there!
I blame the whole RCP/Eclipse ecosystem.
|
|
|
Re: User resizing of columns is wrong [message #1853201 is a reply to message #1853199] |
Wed, 22 June 2022 10:40  |
Eclipse User |
|
|
|
Dirk Fauth wrote on Wed, 22 June 2022 14:22For anyone coming across this topic: DON'T DO THIS!
If you override the method getUnderlyingLayersByColumnPosition(int) from the CompositeLayer the way shown above, YOU ACTUALLY BREAK the composition concept of that layer!
The CompositeLayer composes layer stacks in regions. So you get different layer stacks based on the column position. The CompositeFreezeLayer has four regions to support freezing columns and rows. If no freeze is active, every column will return the same layer stack. With the above snippet this concept is broken and the freeze states are not handled correctly!
This is what I wrote: cleaning out. I added an "EDIT" to emphasize that I removed the override. I didn't tell that snippet is the solution. removing it is. so is your warning.
|
|
|
Powered by
FUDForum. Page generated in 0.04252 seconds