com.businessobjects.rebean.wi
Interface CellMatrix


public interface CellMatrix

Warning: This interface is no longer functional from the SAP BusinessObjects 4.0 release onwards.

CellMatrix represents the collection of Cell objects contained in a CrossTable. The cells are represented in rows and columns.


Method Summary
 TableCell getCell(int row, int column)
          Returns the TableCell found at the specified position.
 int getColumnCount()
          Returns the number of columns contained in the table.
 BreakElement getHBreak()
          Returns the horizontal BreakElement this CellMatrix is associated to.
 HZoneType getHZoneType()
          Returns the horizontal zone this CellMatrix represents.
 Representation getRepresentation()
          Returns the Table or Form this matrix is part of.
 int getRowCount()
          Returns the number of rows contained in the table.
 BreakElement getVBreak()
          Returns the vertical BreakElement this CellMatrix is associated to.
 VZoneType getVZoneType()
          Returns the vertical zone this CellMatrix represents.
 void insertColumn(int where, int refColumn)
          Insert a column in a table.
 void insertRow(int where, int refRow)
          Insert a row in a table.
 void removeColumn(int where)
          Removes a column from a table at a specified index.
 void removeRow(int where)
          Remove a row from a table at a specified index.
 

Method Detail

getRepresentation

Representation getRepresentation()
Returns the Table or Form this matrix is part of.

Returns:
the Table or Form this matrix is part of

getRowCount

int getRowCount()
Returns the number of rows contained in the table.

Returns:
The number of rows contained in the table.

getColumnCount

int getColumnCount()
Returns the number of columns contained in the table.

Returns:
The number of columns contained in the table.

getCell

TableCell getCell(int row,
                  int column)
Returns the TableCell found at the specified position. Table columns are indexed from top to bottom, rows from left to right.

Parameters:
row - The row index of the TableCell to return. The index is 0 based.
column - The column index of the TableCell to return. The index is 0 based.
Throws:
java.lang.ArrayIndexOutOfBoundsException - If row and/or column are out of range. That is to say, row < 0 || row >= getCount() || column < 0 || column >= getCount()).

getVZoneType

VZoneType getVZoneType()
Returns the vertical zone this CellMatrix represents.

If there is no suitable zone, VZoneType.BODY is returned.

Returns:
The vertical zone this CellMatrix represents.

getHZoneType

HZoneType getHZoneType()
Returns the horizontal zone this CellMatrix represents.

If there is no suitable zone HZoneType.BODY is returned.

Returns:
The horizontal zone this CellMatrix represents.

getVBreak

BreakElement getVBreak()
Returns the vertical BreakElement this CellMatrix is associated to.

Returns:
The vertical BreakElement this CellMatrix is associated to. Returns null when there is no associated BreakElement.

getHBreak

BreakElement getHBreak()
Returns the horizontal BreakElement this CellMatrix is associated to.

Returns:
The horizontal BreakElement this CellMatrix is associated to. Returns null when there is no associated BreakElement.

insertRow

void insertRow(int where,
               int refRow)
Insert a row in a table.

After a row is inserted, CellMatrix objects that are already part of the same block will throw an java.util.ConcurrentModificationException exception when any method involving columns and/or rows is called. CellMatrix objects created after a row is inserted will work normally.

Parameters:
where - the index where the row is to be inserted. This value has to be in the range (where >= 0) && (where <= getRowCount()).
refRow - the row to use as reference for the Decoration in the cells. Set to a negative value for the default Decoration.
Throws:
java.lang.IndexOutOfBoundsException - when (where < 0) || (where > getRowCount())
java.lang.IndexOutOfBoundsException - when refRow >= getRowCount()
Since:
11.5

insertColumn

void insertColumn(int where,
                  int refColumn)
Insert a column in a table.

After a column is inserted, CellMatrix objects that are already part of the same block will throw an java.util.ConcurrentModificationException exception when any method involving columns and/or rows is called. CellMatrix objects created after a column is inserted will work normally.

Parameters:
where - the index where the column is to be inserted. This value has to be in the range (where >= 0) && (where <= getColumnCount()).
refColumn - the column to use as reference for the Decoration in the cells. Set to a negative value for the default Decoration.
Throws:
java.lang.IndexOutOfBoundsException - when (where < 0) || (where > getColumnCount())
java.lang.IndexOutOfBoundsException - when refColumn >= getColumnCount()
Since:
11.5

removeRow

void removeRow(int where)
Remove a row from a table at a specified index.

After removing a row, CellMatrix objects that are already part of the same block will throw an java.util.ConcurrentModificationException exception when any method involving columns and/or rows is called. CellMatrix objects created after a column is inserted will work normally.

Parameters:
where - the index of the row to remove
Throws:
java.lang.IndexOutOfBoundsException - when (where < 0) || (where >= getRowCount())
ReportException - when removing the specified row would remove the table body; a table must always have at least one body cell (ReportException.CANNOT_REMOVE_BODY)
Since:
11.5

removeColumn

void removeColumn(int where)
Removes a column from a table at a specified index.

After removing a column, CellMatrix objects that are already part of the same block will throw an java.util.ConcurrentModificationException exception when any method involving columns and/or rows is called. CellMatrix objects created after a column is inserted will work normally.

Parameters:
where - the index of the column to remove
Throws:
java.lang.IndexOutOfBoundsException - when (where < 0) || (where >= getColumnCount())
ReportException - when removing the specified column would remove the table's body; a table must always have at least one body cell (ReportException.CANNOT_REMOVE_BODY)
Since:
11.5