Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 365747 - [Table] Cell editors aren't scrolled into view on a Table with fixed columns
Summary: [Table] Cell editors aren't scrolled into view on a Table with fixed columns
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 1.5 M4   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 10:00 EST by Rüdiger Herrmann CLA
Modified: 2011-12-07 06:52 EST (History)
1 user (show)

See Also:


Attachments
Project to reproduce the bug (98.02 KB, application/octet-stream)
2011-12-06 10:09 EST, Rüdiger Herrmann CLA
no flags Details
Proposed patch against Tree_Table_Merge branch with JUnit tests. (5.95 KB, patch)
2011-12-06 15:23 EST, Ivan Furnadjiev CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rüdiger Herrmann CLA 2011-12-06 10:00:32 EST
On a table with fixed columns, the cell editor is not scrolled into view.
To reproduce, use the attached project (table with two fixed columns and cell editor suport):
* narrow the browser window so that only three columns are visible
* select a cell in the first column and tab throught the cells
-> notice that the cell editor on fourth column is not scrolled into view

On a table that has only one fixed column, the problem is not reproducible.
Comment 1 Rüdiger Herrmann CLA 2011-12-06 10:09:31 EST
Created attachment 207996 [details]
Project to reproduce the bug
Comment 2 Ivan Furnadjiev CLA 2011-12-06 11:05:10 EST
TestCase:
public void testShowColumnWithFixedColumns() {
    Fixture.fakePhase( PhaseId.PROCESS_ACTION );
    int numColumns = 4;
    int columnWidth = 100;
    Table table = new Table( shell, SWT.NONE );
    table.setData( "fixedColumns", new Integer( 2 ) );
    table.setSize( columnWidth  * ( numColumns - 1 ), 100 );
    for( int i = 0; i < numColumns; i++ ) {
      TableColumn column = new TableColumn( table, SWT.NONE );
      column.setWidth( columnWidth );
    }

    table.showColumn( table.getColumn( 3 ) );

    ITableAdapter adapter = ( ITableAdapter )table.getAdapter( ITableAdapter.class );
    assertEquals( 100, adapter.getLeftOffset() );
  }
Comment 3 Ivan Furnadjiev CLA 2011-12-06 15:23:00 EST
Created attachment 208021 [details]
Proposed patch against Tree_Table_Merge branch with JUnit tests.

This patch fixes the scrolling issue and the position of the cell editors by always align the shown column left in the view-port.
Comment 4 Rüdiger Herrmann CLA 2011-12-07 06:35:24 EST
Applied patch from attachment 208021 [details] to tree_table_merge branch.
Comment 5 Rüdiger Herrmann CLA 2011-12-07 06:52:20 EST
Also applied patch from attachment 208021 [details] to HEAD.