Examples of RowRecord


Examples of org.apache.poi.hssf.record.RowRecord

     */

    private void setPropertiesFromSheet(Sheet sheet)
    {
        int sloc = sheet.getLoc();
        RowRecord row = sheet.getNextRow();

        while (row != null)
        {
            createRowFromRecord(row);

View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

    {
        this.rowNum = rowNum;
        cells = new HashMap(10);   // new ArrayList(INITIAL_CAPACITY);
        this.book = book;
        this.sheet = sheet;
        row = new RowRecord();
        row.setHeight((short) 0xff);
        row.setLastCol((short) -1);
        row.setFirstCol((short) -1);

        // row.setRowNumber(rowNum);
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

    {
        this.rowNum = rowNum;
        cells = new HashMap(10);   // new ArrayList(INITIAL_CAPACITY);
        this.book = book;
        this.sheet = sheet;
        row = new RowRecord();
        row.setHeight((short) 0xff);

        // row.setRowNumber(rowNum);
        setRowNum(rowNum);
    }
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

    {
        this.rowNum = rowNum;
        cells       = new HashMap(10);   // new ArrayList(INITIAL_CAPACITY);
        this.book   = book;
        this.sheet  = sheet;
        row         = new RowRecord();
        row.setHeight(( short ) 0xff);

        // row.setRowNumber(rowNum);
        setRowNum(rowNum);
    }
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

  public void removeRow(RowRecord row) {
    int rowIndex = row.getRowNumber();
    _valuesAgg.removeAllCellsValuesForRow(rowIndex);
    Integer key = Integer.valueOf(rowIndex);
    RowRecord rr = _rowRecords.remove(key);
    if (rr == null) {
      throw new RuntimeException("Invalid row index (" + key.intValue() + ")");
    }
    if (row != rr) {
      _rowRecords.put(key, rr);
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

    // TODO - For a performance improvement, it would be better to return an instance of
    //an iterator and use that instance throughout, rather than recreating one and
    //having to move it to the right position.
    int startIndex = block * DBCellRecord.BLOCK_SIZE;
    Iterator rowIter = _rowRecords.values().iterator();
    RowRecord row = null;
    //Position the iterator at the start of the block
    for (int i=0; i<=startIndex;i++) {
    row = (RowRecord)rowIter.next();
    }
    if (row == null) {
      throw new RuntimeException("Did not find start row for block " + block);
    }

    return row.getRowNumber();
  }
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

    int endIndex = ((block + 1)*DBCellRecord.BLOCK_SIZE)-1;
    if (endIndex >= _rowRecords.size())
    endIndex = _rowRecords.size()-1;

    Iterator rowIter = _rowRecords.values().iterator();
    RowRecord row = null;
    for (int i=0; i<=endIndex;i++) {
    row = (RowRecord)rowIter.next();
    }
    if (row == null) {
      throw new RuntimeException("Did not find start row for block " + block);
    }
    return row.getRowNumber();
  }
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

    return _rowRecords.values().iterator();
  }

  public int findStartOfRowOutlineGroup(int row) {
    // Find the start of the group.
    RowRecord rowRecord = this.getRow( row );
    int level = rowRecord.getOutlineLevel();
    int currentRow = row;
    while (this.getRow( currentRow ) != null) {
      rowRecord = this.getRow( currentRow );
      if (rowRecord.getOutlineLevel() < level) {
        return currentRow + 1;
      }
      currentRow--;
    }
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

   * Hide all rows at or below the current outline level
   * @return index of the <em>next<em> row after the last row that gets hidden
   */
  private int writeHidden(RowRecord pRowRecord, int row) {
    int rowIx = row;
    RowRecord rowRecord = pRowRecord;
    int level = rowRecord.getOutlineLevel();
    while (rowRecord != null && getRow(rowIx).getOutlineLevel() >= level) {
      rowRecord.setZeroHeight(true);
      rowIx++;
      rowRecord = getRow(rowIx);
    }
    return rowIx;
  }
View Full Code Here

Examples of org.apache.poi.hssf.record.RowRecord

  public void collapseRow(int rowNumber) {

    // Find the start of the group.
    int startRow = findStartOfRowOutlineGroup(rowNumber);
    RowRecord rowRecord = getRow(startRow);

    // Hide all the columns until the end of the group
    int nextRowIx = writeHidden(rowRecord, startRow);

    RowRecord row = getRow(nextRowIx);
    if (row == null) {
      row = createRow(nextRowIx);
      insertRow(row);
    }
    // Write collapse field
    row.setColapsed(true);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.