EchoPoint
2.1.0rc4

echopointng
Class TableEx.CellMatrix

java.lang.Object
  extended byechopointng.TableEx.CellMatrix
All Implemented Interfaces:
java.io.Serializable
Enclosing class:
TableEx

protected class TableEx.CellMatrix
extends java.lang.Object
implements java.io.Serializable

CellMatrix is used to hold the content for a given sized set of cells.

The index of the cell matrix is 0,0 to (rowCount,cellCount) unless there is a isHeaderVisible in which case it is 0,-1 to ((rowCount*cellCount)

See Also:
Serialized Form

Constructor Summary
TableEx.CellMatrix(int columnCount, int rowCount, java.lang.Object cellSpanObject)
          Constructs a CellMatrix
 
Method Summary
 boolean containsCellContent(java.lang.Object value)
          Returns true if the specified value is part of the content in this CellMatrix
 java.lang.Object getCellContent(int column, int row)
          Returns the cell content at the specified column and row co-ordinate.
 java.lang.Object getCellProperties(int column, int row, java.lang.String propertyName)
           
 java.lang.Object getCellSpanObject()
           
 int getColumnCount()
           
 int getRowCount()
           
 void setCellContent(java.lang.Object value, int column, int row)
          Sets the content of the cells at the specified column/row co-ordinate.
 void setCellContent(java.lang.Object value, int column, int row, int colSpan, int rowSpan)
          Sets the content of the cells at the specified column/row co-ordinate.
 void setCellProperties(int column, int row, java.lang.String propertyName, java.lang.Object value)
          Called to set specific property information for a cell.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TableEx.CellMatrix

public TableEx.CellMatrix(int columnCount,
                          int rowCount,
                          java.lang.Object cellSpanObject)
Constructs a CellMatrix

Parameters:
columnCount - - the maximum number of columns
rowCount - - the maximum number of rows
cellSpanObject - - the object to be stored in a cell if its is spanned via rowCount and colSpan values.
Method Detail

containsCellContent

public boolean containsCellContent(java.lang.Object value)
Returns true if the specified value is part of the content in this CellMatrix

Parameters:
value - - what the check for
Returns:
true if the specified value is part of the content in this CellMatrix

getCellContent

public java.lang.Object getCellContent(int column,
                                       int row)
Returns the cell content at the specified column and row co-ordinate.

Parameters:
column -
row -
Returns:
the cell content at the specified column and row co-ordinate.
Throws:
java.lang.IllegalArgumentException - if the specified column and row co-ordinate is outside the bounds of the CellMatrix.

getCellSpanObject

public java.lang.Object getCellSpanObject()
Returns:
Returns the cellSpanObject in use

getColumnCount

public int getColumnCount()
Returns:
Returns the columnCount.

getRowCount

public int getRowCount()
Returns:
Returns the rowCount.

setCellContent

public void setCellContent(java.lang.Object value,
                           int column,
                           int row)
Sets the content of the cells at the specified column/row co-ordinate.

Parameters:
value - - the content value to be placed in the cell
column - - the column index
row - - the row index
Throws:
java.lang.IllegalArgumentException - if the specified column and row co-ordinate is outside the bounds of the CellMatrix.

setCellContent

public void setCellContent(java.lang.Object value,
                           int column,
                           int row,
                           int colSpan,
                           int rowSpan)
Sets the content of the cells at the specified column/row co-ordinate. The column span and row span can be specified as well. If this is greater then 1, then cells at the appropriate spanned cell co-ordinates are set the cellSpanObject.

Parameters:
value - - the content value to be placed in the cell
column - - the column index
row - - the row index
colSpan - - the column span
rowSpan - - the row span
Throws:
java.lang.IllegalArgumentException - if the specified column and row co-ordinate is outside the bounds of the CellMatrix.

setCellProperties

public void setCellProperties(int column,
                              int row,
                              java.lang.String propertyName,
                              java.lang.Object value)
Called to set specific property information for a cell.

Parameters:
column - - the column of the cell
row - - the row of the cell
propertyName - - the property name
value - - a value for that property at that cell

getCellProperties

public java.lang.Object getCellProperties(int column,
                                          int row,
                                          java.lang.String propertyName)

EchoPoint
2.1.0rc4