"}");
frame.refresh();
assertNoErrors(frame);
HTMLTableInfo panel = (HTMLTableInfo) frame.getChildrenWidgets().get(0);
// check IGridInfo
IGridInfo gridInfo = panel.getGridInfo();
assertEquals(2, gridInfo.getRowCount());
assertEquals(2, gridInfo.getColumnCount());
{
Interval[] intervals = gridInfo.getRowIntervals();
assertEquals(2, intervals.length);
assertEquals(new Interval(2, 100), intervals[0]);
assertEquals(new Interval(2 + 100 + 2, 200), intervals[1]);
}
{
Interval[] intervals = gridInfo.getColumnIntervals();
assertEquals(2, intervals.length);
assertEquals(new Interval(2, 100), intervals[0]);
assertEquals(new Interval(2 + 100 + 2, 200), intervals[1]);
}
// cells rectangle
{
{
Rectangle cells = new Rectangle(0, 0, 1, 1);
Rectangle expected = new Rectangle(2, 2, 100, 100).getResized(1, 1);
assertEquals(expected, gridInfo.getCellsRectangle(cells));
}
{
Rectangle cells = new Rectangle(0, 0, 2, 1);
Rectangle expected = new Rectangle(2, 2, 100 + 2 + 200, 100).getResized(1, 1);
assertEquals(expected, gridInfo.getCellsRectangle(cells));
}
{
Rectangle cells = new Rectangle(0, 0, 1, 2);
Rectangle expected = new Rectangle(2, 2, 100, 100 + 2 + 200).getResized(1, 1);
assertEquals(expected, gridInfo.getCellsRectangle(cells));
}
}
}