Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 332932 - [Table] Inserting a column does not shift item properties
Summary: [Table] Inserting a column does not shift item properties
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-20 06:14 EST by Ralf Sternberg CLA
Modified: 2011-04-12 10:13 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Sternberg CLA 2010-12-20 06:14:52 EST
Inserting a column into a Table must shift all cell properties after the insert position. The following test works with SWT but fails in RAP:

  public void testInsertColumn() {
    Table table = new Table( shell, SWT.BORDER );
    for( int i = 0; i < 3; i++ ) {
      new TableColumn( table, SWT.NONE );
    }
    final TableItem item = new TableItem( table, SWT.NONE );
    for( int i = 0; i < 3; i++ ) {
      item.setText( i, "cell" + i );
    }
    new TableColumn( table, SWT.NONE, 1 );
    assertEquals( "cell0", item.getText( 0 ) );
    assertEquals( "", item.getText( 1 ) );
    assertEquals( "cell1", item.getText( 2 ) );
    assertEquals( "cell2", item.getText( 3 ) );
  }

Should also be tested with all other cell properties like images, fonts, colors etc.
Tree seems to behave correctly.
Comment 1 Ivan Furnadjiev CLA 2011-04-12 10:13:28 EDT
Now, when a new column is inserted the item data are shifted is needed. JUnit tests added for all data properties. Changes are in CVS HEAD.