com.arsdigita.acs.calendar
Class Table

java.lang.Object
  |
  +--com.arsdigita.acs.calendar.Table

public class Table
extends Object


Field Summary
(package private)  Vector cols
           
(package private)  int numCols
           
(package private)  int numRows
           
 
Constructor Summary
Table()
           
Table(int numRows, int numCols)
           
 
Method Summary
 void addCol()
           
 TableCell getCell(int col, int row)
          Returns item at col,row (0-based).
 int getFilledColsLeft(int row)
          returns how many columns are left to write in this row, starting with col
 int getFilledColsLeft(int row, int col)
           
 int getFirstEmptyCol(int row)
          returns the index of the first empty column in a row returns -1 if there is no empty column.
 int getNextFilledCol(int row)
          Returns the index of the first full column in a row Returns -1 if there are no further empty columns.
 int getNextFilledCol(int row, int col)
          Returns the index of the next full column in a row Returns -1 if there are no further empty columns.
 int getNumCols()
           
 int getNumRows()
           
 void setCell(int col, int row, TableCell cell)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

numCols

int numCols

numRows

int numRows

cols

Vector cols
Constructor Detail

Table

public Table()

Table

public Table(int numRows,
             int numCols)
Method Detail

getCell

public TableCell getCell(int col,
                         int row)
Returns item at col,row (0-based). Does not validate bounds in advance.

setCell

public void setCell(int col,
                    int row,
                    TableCell cell)

addCol

public void addCol()

getNumCols

public int getNumCols()

getNumRows

public int getNumRows()

getFirstEmptyCol

public int getFirstEmptyCol(int row)
returns the index of the first empty column in a row returns -1 if there is no empty column.

getNextFilledCol

public int getNextFilledCol(int row)
Returns the index of the first full column in a row Returns -1 if there are no further empty columns.

getNextFilledCol

public int getNextFilledCol(int row,
                            int col)
Returns the index of the next full column in a row Returns -1 if there are no further empty columns.

getFilledColsLeft

public int getFilledColsLeft(int row)
returns how many columns are left to write in this row, starting with col

getFilledColsLeft

public int getFilledColsLeft(int row,
                             int col)

toString

public String toString()
Overrides:
toString in class Object