示例#1
0
 public Row<T> insertRowAbove() {
   Row<T> newRow = new Row<T>(parent, prevRow, this);
   if (prevRow == null) {
     parent.firstRow = newRow;
   } else {
     getPrevRow().nextRow = newRow;
   }
   parent.height++;
   prevRow = newRow;
   return newRow;
 }
示例#2
0
    private void _remove() {
      this.parent.height--;
      if (prevRow == null) {
        parent.firstRow = nextRow;
      } else {
        this.prevRow.nextRow = nextRow;
      }
      if (nextRow == null) {
        parent.lastRow = prevRow;
      } else {
        this.nextRow.prevRow = prevRow;
      }

      this.firstCell = null;
      this.lastCell = null;
      this.prevRow = null;
      this.nextRow = null;
      this.parent = null;
    }