Example #1
0
 private Cell<T> _insertCellBefore() {
   Cell<T> newCell = new Cell<T>(parent, prevCell, this);
   if (prevCell == null) {
     parent.firstCell = newCell;
   } else {
     prevCell.nextCell = newCell;
   }
   prevCell = newCell;
   return newCell;
 }
Example #2
0
 public Cell<T> insertCellBefore() {
   // Make sure first cell is empty
   if (parent.firstCell.isFilled()) {
     parent.parent.addFirstColumn();
   }
   _insertCellBefore();
   // Trim beginning of row
   parent.firstCell.getNextCell().prevCell = null;
   parent.firstCell = parent.firstCell.getNextCell();
   return getPrevCell();
 }