Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 580376

Summary: Enable initial programmatic freeze operations
Product: [Technology] NatTable Reporter: Dirk Fauth <dirk.fauth>
Component: CoreAssignee: Dirk Fauth <dirk.fauth>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.0.2   
Target Milestone: 2.0.3   
Hardware: PC   
OS: Windows 10   
See Also: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/194694
https://git.eclipse.org/c/nattable/org.eclipse.nebula.widgets.nattable.git/commit/?id=f975367b8ffcbeb8d73dc5db29f3ab57d7631c17
Whiteboard:

Description Dirk Fauth CLA 2022-07-13 08:49:42 EDT
In older versions of NatTable it was possible to programmatically freeze columns and rows at creation time. For this one of the Freeze*Commands can be used:

  natTable.doCommand(new FreezeColumnCommand(compositeFreezeLayer, 2));

To fix bug 539764 a position conversion + check was added in the FreezeCommandHandler, so freeze operations in scrolled state are working correctly. This unfortunately now avoids the initial processing. The reason for this is that the position conversion fails as the client area in the ViewportLayer has 0 height and width. The only way to programmatically freeze at creation time is to use a PaintListener that is triggered after the client area is provided to the ViewportLayer.

To enable programmatic freeze operations at creation time possible again, an additional check should be added that does avoid blocking the command execution if the client area is not yet set. This is safe with regards to the scrolled state uses cases, as without a client area set, there can be no scrolled state.

Some further details can also be found in this forum post:
https://www.eclipse.org/forums/index.php/t/1110948/
Comment 1 Eclipse Genie CLA 2022-07-13 08:53:21 EDT
New Gerrit change created: https://git.eclipse.org/r/c/nattable/org.eclipse.nebula.widgets.nattable/+/194694
Comment 3 Dirk Fauth CLA 2022-08-09 02:30:43 EDT
Released with 2.0.3