|
Lines 752-757
Link Here
|
| 752 |
assertEquals( 5, tableAdapter.getFocusIndex() ); |
752 |
assertEquals( 5, tableAdapter.getFocusIndex() ); |
| 753 |
} |
753 |
} |
| 754 |
|
754 |
|
|
|
755 |
public void testReadTopIndex() { |
| 756 |
Display display = new Display(); |
| 757 |
Shell shell = new Shell( display ); |
| 758 |
Table table = new Table( shell, SWT.MULTI ); |
| 759 |
table.setSize( 485, 485 ); |
| 760 |
for( int i = 0; i < 115; i++ ) { |
| 761 |
new TableItem( table, SWT.NONE ); |
| 762 |
} |
| 763 |
String tableId = WidgetUtil.getId( table ); |
| 764 |
String indices = "114,70,71,72,73,74,75,76,77,78,79,80,81,82,83," |
| 765 |
+ "84,85,86,87,88,89,90,91,92,93,94,95,96,97,98," |
| 766 |
+ "99,100,101,102,103,104,105,106,107,108,109," |
| 767 |
+ "110,111,112,113,0"; |
| 768 |
Fixture.fakeRequestParam( tableId + ".topIndex", "0" ); |
| 769 |
Fixture.fakeRequestParam( tableId + ".selection", indices ); |
| 770 |
TableLCA tableLCA = new TableLCA(); |
| 771 |
tableLCA.readData( table ); |
| 772 |
assertEquals( 0, table.getTopIndex() ); |
| 773 |
} |
| 774 |
|
| 755 |
protected void setUp() throws Exception { |
775 |
protected void setUp() throws Exception { |
| 756 |
RWTFixture.setUp(); |
776 |
RWTFixture.setUp(); |
| 757 |
} |
777 |
} |