예제 #1
0
  /**
   * Gets the column width for the specified column
   *
   * @param col the column number
   * @return the column format, or the default format if no override is specified
   */
  public CellView getColumnView(int col) {
    ColumnInfoRecord cir = getColumnInfo(col);
    CellView cv = new CellView();

    if (cir != null) {
      cv.setDimension(cir.getWidth() / 256); // deprecated
      cv.setSize(cir.getWidth());
      cv.setHidden(cir.getHidden());
      cv.setFormat(formattingRecords.getXFRecord(cir.getXFIndex()));
    } else {
      cv.setDimension(settings.getDefaultColumnWidth()); // deprecated
      cv.setSize(settings.getDefaultColumnWidth() * 256);
    }

    return cv;
  }
예제 #2
0
  /**
   * Gets the row view for the specified row
   *
   * @param row the row number
   * @return the row format, or the default format if no override is specified
   */
  public CellView getRowView(int row) {
    RowRecord rr = getRowInfo(row);

    CellView cv = new CellView();

    if (rr != null) {
      cv.setDimension(rr.getRowHeight()); // deprecated
      cv.setSize(rr.getRowHeight());
      cv.setHidden(rr.isCollapsed());
      if (rr.hasDefaultFormat()) {
        cv.setFormat(formattingRecords.getXFRecord(rr.getXFIndex()));
      }
    } else {
      cv.setDimension(settings.getDefaultRowHeight());
      cv.setSize(settings.getDefaultRowHeight()); // deprecated
    }

    return cv;
  }
예제 #3
0
 /**
  * Gets the column format for the specified column
  *
  * @param col the column number
  * @return the column format, or NULL if the column has no specific format
  * @deprecated use getColumnView instead
  */
 public CellFormat getColumnFormat(int col) {
   CellView cv = getColumnView(col);
   return cv.getFormat();
 }