" panel.getFlexCellFormatter().setColSpan(0, 0, 2);",
" }",
"}");
frame.refresh();
assertNoErrors(frame);
FlexTableInfo panel = (FlexTableInfo) frame.getChildrenWidgets().get(0);
IGridInfo gridInfo = panel.getGridInfo();
// check intervals
{
Interval[] intervals = gridInfo.getRowIntervals();
assertEquals(2, intervals.length);
assertEquals(new Interval(RS, RA), intervals[0]);
assertEquals(new Interval(RS + RA + RS, RA), intervals[1]);
}
{
Interval[] intervals = gridInfo.getColumnIntervals();
assertEquals(3, intervals.length);
assertEquals(new Interval(CS, CE), intervals[0]);
assertEquals(new Interval(CS + CE + CS, CA), intervals[1]);
assertEquals(new Interval(CS + CE + CS + CA + CS, CA), intervals[2]);
}
// low_getCellOfColumn()
{
assertEquals(0, panel.getStatus().getCellOfColumn(0, 0));
assertEquals(1, panel.getStatus().getCellOfColumn(0, 2));
assertEquals(0, panel.getStatus().getCellOfColumn(1, 0));
assertEquals(1, panel.getStatus().getCellOfColumn(1, 1));
assertEquals(2, panel.getStatus().getCellOfColumn(1, 2));
// column in the middle of spanned cell
assertEquals(0, panel.getStatus().getCellOfColumn(0, 1));
// column directly after last cell
assertEquals(2, panel.getStatus().getCellOfColumn(0, 3));
assertEquals(3, panel.getStatus().getCellOfColumn(1, 3));
// out of bounds
try {
panel.getStatus().getCellOfColumn(0, 100);
fail();
} catch (Throwable e) {
}
}
}