/** * Constructor used when importing a sheet from another * spreadsheet * * @param col the column number * @param cir the column info record read in */ public ColumnInfoRecord(jxl.read.biff.ColumnInfoRecord cir, int col) { super(Type.COLINFO); column = col; width = cir.getWidth(); xfIndex = cir.getXFIndex(); outlineLevel = cir.getOutlineLevel(); collapsed = cir.getCollapsed(); }
/** * Constructor used when importing a sheet from another * spreadsheet * * @param col the column number * @param cir the column info record read in */ public ColumnInfoRecord(jxl.read.biff.ColumnInfoRecord cir, int col) { super(Type.COLINFO); column = col; width = cir.getWidth(); xfIndex = cir.getXFIndex(); outlineLevel = cir.getOutlineLevel(); collapsed = cir.getCollapsed(); }
/** * Constructor used when copying an existing spreadsheet * * @param col the column number * @param cir the column info record read in * @param fr the format records */ public ColumnInfoRecord(jxl.read.biff.ColumnInfoRecord cir, int col, FormattingRecords fr) { super(Type.COLINFO); column = col; width = cir.getWidth(); xfIndex = cir.getXFIndex(); style = fr.getXFRecord(xfIndex); outlineLevel = cir.getOutlineLevel(); collapsed = cir.getCollapsed(); }
/** * Constructor used when copying an existing spreadsheet * * @param col the column number * @param cir the column info record read in * @param fr the format records */ public ColumnInfoRecord(jxl.read.biff.ColumnInfoRecord cir, int col, FormattingRecords fr) { super(Type.COLINFO); column = col; width = cir.getWidth(); xfIndex = cir.getXFIndex(); style = fr.getXFRecord(xfIndex); outlineLevel = cir.getOutlineLevel(); collapsed = cir.getCollapsed(); }
/** * 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; }
/** * 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; }