|
Lines 252-257
Link Here
|
| 252 |
assertEquals( 0, table.getTopIndex() ); |
252 |
assertEquals( 0, table.getTopIndex() ); |
| 253 |
} |
253 |
} |
| 254 |
|
254 |
|
|
|
255 |
public void testTopIndex_2() { |
| 256 |
Display display = new Display(); |
| 257 |
Shell shell = new Shell( display , SWT.NONE ); |
| 258 |
Table table = new Table( shell, SWT.MULTI ); |
| 259 |
table.setSize( 485, 485 ); |
| 260 |
for( int i = 0; i < 115; i++ ) { |
| 261 |
new TableItem( table, SWT.NONE ); |
| 262 |
} |
| 263 |
table.setTopIndex( 0 ); |
| 264 |
int[] indices = { |
| 265 |
114, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, |
| 266 |
87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, |
| 267 |
104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 0 }; |
| 268 |
table.setSelection( indices ); |
| 269 |
assertEquals( 0, table.getTopIndex() ); |
| 270 |
} |
| 271 |
|
| 255 |
public void testDispose() { |
272 |
public void testDispose() { |
| 256 |
Display display = new Display(); |
273 |
Display display = new Display(); |
| 257 |
Shell shell = new Shell( display ); |
274 |
Shell shell = new Shell( display ); |