int col1,
int row2,
int col2
)
{
JRBasePrintFrame frame = new JRBasePrintFrame(null);
List wrappers = new ArrayList();
frame.setWidth(xCuts.getCut(col2) - xCuts.getCut(col1));
frame.setHeight(yCuts.getCut(row2) - yCuts.getCut(row1));
String virtualAddress = (address == null ? "" : address + "_") + getNextVirtualFrameIndex();
JRExporterGridCell gridCell =
new ElementGridCell(
new ElementWrapper(null, frame, virtualAddress),
frame.getWidth(),
frame.getHeight(),
col2 - col1,
row2 - row1
);
OccupiedGridCell occupiedGridCell = new OccupiedGridCell(gridCell);
for(int row = row1; row < row2; row++)
{
for(int col = col1; col < col2; col++)
{
JRExporterGridCell gCell = grid[row][col];
grid[row][col] = occupiedGridCell;
ElementWrapper wrapper = gCell.getWrapper();
if (gCell.getType() == JRExporterGridCell.TYPE_ELEMENT_CELL)
{
wrappers.add(wrapper);
frame.addElement(wrapper.getElement());//FIXMEODT do we need this?
}
}
}
gridCell.setLayout(
new JRGridLayout(
nature,
(ElementWrapper[]) wrappers.toArray(new ElementWrapper[wrappers.size()]),
frame.getWidth(),
frame.getHeight(),
offsetX -xCuts.getCut(col1),
offsetY -yCuts.getCut(row1),
virtualAddress
)
);