/** * 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); cv.setSize(cir.getWidth()); cv.setHidden(cir.getHidden()); cv.setFormat(cir.getCellFormat()); } else { cv.setDimension(settings.getDefaultColumnWidth()/256); cv.setSize(settings.getDefaultColumnWidth() * 256); } return cv; }
/** * Gets the column info record for the specified column * * @param c the column * @return the column record */ ColumnInfoRecord getColumnInfo(int c) { Iterator i = columnFormats.iterator(); ColumnInfoRecord cir = null; boolean stop = false; while (i.hasNext() && !stop) { cir = (ColumnInfoRecord) i.next(); if (cir.getColumn() >= c) { stop = true; } } if (!stop) { return null; } return cir.getColumn() == c ? cir : null; }
cir.incrementOutlineLevel(); cir.setCollapsed(collapsed); maxColumnOutlineLevel = Math.max(maxColumnOutlineLevel, cir.getOutlineLevel());
for (int j = rcir.getStartColumn(); j <= rcir.getEndColumn() ; j++) ColumnInfoRecord cir = new ColumnInfoRecord(rcir, j); int xfIndex = cir.getXfIndex(); XFRecord cf = (WritableCellFormat) xfRecords.get(new Integer(xfIndex)); cir.setCellFormat(cf); cir.setHidden(rcir.getHidden()); columnFormats.add(cir);
ColumnInfoRecord cir = new ColumnInfoRecord(col, width, xfr); cir.setHidden(true); "default format."); ColumnInfoRecord cir = new ColumnInfoRecord (col, view.getDimension()*256, WritableWorkbook.NORMAL_STYLE); if (!columnFormats.contains(cir))
Font columnFont = cir.getCellFormat().getFont(); Font defaultFont = WritableWorkbook.NORMAL_STYLE.getFont(); cir.setWidth((int) (maxWidth / defaultFont.getPointSize()));
if (cir.getColumn() == col) else if (cir.getColumn() > col) cir.decrementColumn();
if (cir.getColumn() >= col) cir.incrementColumn();
if (cir.getColumn() < 0x100) XFRecord xfr = cir.getCellFormat(); if (xfr != normalStyle && cir.getColumn() < 0x100) Cell[] cells = getColumn(cir.getColumn());
/** * Indicates whether or not this cell is hidden, by virtue of either * the entire row or column being collapsed * * @return TRUE if this cell is hidden, FALSE otherwise */ public boolean isHidden() { ColumnInfoRecord cir = sheet.getColumnInfo(column); if (cir != null && cir.getWidth() == 0) { return true; } RowRecord rr = sheet.getRowInfo(row); if (rr != null && (rr.getRowHeight() == 0 || rr.isCollapsed())) { return true; } return false; }
while (cfit.hasNext()) ColumnInfoRecord cv = new ColumnInfoRecord ((ColumnInfoRecord) cfit.next()); toColumnFormats.add(cv);
for (int j = rcir.getStartColumn(); j <= rcir.getEndColumn() ; j++) ColumnInfoRecord cir = new ColumnInfoRecord(rcir, j); int xfIndex = cir.getXfIndex(); XFRecord cf = (WritableCellFormat) xfRecords.get(new Integer(xfIndex)); cir.setCellFormat(cf); cir.setHidden(rcir.getHidden()); columnFormats.add(cir);
cir.incrementOutlineLevel(); cir.setCollapsed(collapsed); maxColumnOutlineLevel = Math.max(maxColumnOutlineLevel, cir.getOutlineLevel());
ColumnInfoRecord cir = new ColumnInfoRecord(col, width, xfr); cir.setHidden(true); "default format."); ColumnInfoRecord cir = new ColumnInfoRecord (col, view.getDimension()*256, WritableWorkbook.NORMAL_STYLE); if (!columnFormats.contains(cir))
Font columnFont = cir.getCellFormat().getFont(); Font defaultFont = WritableWorkbook.NORMAL_STYLE.getFont(); cir.setWidth((int) (maxWidth / defaultFont.getPointSize()));
if (cir.getColumn() == col) else if (cir.getColumn() > col) cir.decrementColumn();
if (cir.getColumn() >= col) cir.incrementColumn();
if (cir.getColumn() < 0x100) XFRecord xfr = cir.getCellFormat(); if (xfr != normalStyle && cir.getColumn() < 0x100) Cell[] cells = getColumn(cir.getColumn());
/** * Indicates whether or not this cell is hidden, by virtue of either * the entire row or column being collapsed * * @return TRUE if this cell is hidden, FALSE otherwise */ public boolean isHidden() { ColumnInfoRecord cir = sheet.getColumnInfo(column); if (cir != null && cir.getWidth() == 0) { return true; } RowRecord rr = sheet.getRowInfo(row); if (rr != null && (rr.getRowHeight() == 0 || rr.isCollapsed())) { return true; } return false; }