com.waveset.ui
Class Table.GridSpanCell

java.lang.Object
  extended bycom.waveset.ui.Table.Cell
      extended bycom.waveset.ui.Table.CompoundCell
          extended bycom.waveset.ui.Table.GridCell
              extended bycom.waveset.ui.Table.GridSpanCell
All Implemented Interfaces:
java.lang.Cloneable
Enclosing class:
Table

Deprecated. - use com.waveset.ui.html.GridCell.

public static class Table.GridSpanCell
extends Table.GridCell

Extends GridCell, allowing a cell to span rows and/or columns.

Added subitems are applied "row-first", filling all columns for the first row before filling columns for the next row.

A subitem may be added with "rowspan" or "colspan" arguments. This reserves cells in the area:

     ------------------------------
     |  r,c     |...|  r,c+cs     |
     ------------------------------
     |  ...     |...|  ...        |
     ------------------------------
     |  r+rs,c  |...|  r+rs,c+cs  |
     ------------------------------
 - from r,c to r,c+cs
 - from r+rs,c to r+rs,c+cs
 
For example, adding adding a subitem with rowspan=2 to a 2-by-2 GridSpanCell reserves (0,0) and (1,0). The next available cell is (0,1).

The sort name is the sort name of the first sub-item.


Nested Class Summary
protected static class Table.GridSpanCell.SubCell
          Deprecated.  
 
Field Summary
protected static java.lang.String RESERVED
          Deprecated.  
 
Fields inherited from class com.waveset.ui.Table.CompoundCell
_subItems
 
Constructor Summary
Table.GridSpanCell(int rows, int cols)
          Deprecated.  
 
Method Summary
 void add(java.lang.Object subitem)
          Deprecated.  
 void add(java.lang.Object subItem, int rowSpan, int colSpan)
          Deprecated.  
 java.lang.String toHTML(RequestState req)
          Deprecated. Don't be fooled: this is really an abstract method.
 
Methods inherited from class com.waveset.ui.Table.CompoundCell
subItemToHTML, subItemToHTML, toString
 
Methods inherited from class com.waveset.ui.Table.Cell
clone, getPrimaryKey, setPrimaryKey
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

RESERVED

protected static final java.lang.String RESERVED
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

Table.GridSpanCell

public Table.GridSpanCell(int rows,
                          int cols)
                   throws WavesetException
Deprecated. 
Method Detail

add

public void add(java.lang.Object subitem)
         throws WavesetException
Deprecated. 
Throws:
WavesetException

add

public void add(java.lang.Object subItem,
                int rowSpan,
                int colSpan)
         throws WavesetException
Deprecated. 
Throws:
WavesetException

toHTML

public java.lang.String toHTML(RequestState req)
Deprecated. 
Description copied from class: Table.Cell
Don't be fooled: this is really an abstract method. Subclass AppletCell implements toHTML(response, request).

Overrides:
toHTML in class Table.GridCell
Returns:
the cell contents in HTML form.

Omit TD elements for RESERVED subcells. For example, assume we have a 3-by-3 GridSpanCell containing a 2-by-2 subcell:

                     ----------------------
                     |  o   |  o   |  R   |
                     |      |      |      |
                     ----------------------
                     |  o   |  R   |  R   |
                     |      |      |      |
                     ----------------------
                     |  o   |  o   |  o   |
                     |      |      |      |
                     ----------------------
                 
Render TR and TD elements as follows:
                     ----------------------
                  tr |  td  |  td  |      | /tr
                     | /td  | /td  |      |
                     ----------------------
                  tr |  td  |      |      | /tr
                     | /td  |      |      |
                     ----------------------
                  tr |  td  |  td  |  td  | /tr
                     | /td  | /td  | /td  |
                     ----------------------