protected void createEmpty() { field_3_enclosing_cell_range = new CellRangeAddress(0, 0, 0, 0); field_4_cell_ranges = new CellRangeAddressList(); } protected void read(RecordInputStream in) {
/** * Retrieves the number of borders assigned to a cell * * @param row * @param col */ public int getNumBorders(int row, int col) { return getNumBorders(new CellAddress(row, col)); }
/** * Add a cell range structure. * * @param firstRow - the upper left hand corner's row * @param firstCol - the upper left hand corner's col * @param lastRow - the lower right hand corner's row * @param lastCol - the lower right hand corner's col */ public void addCellRangeAddress(int firstRow, int firstCol, int lastRow, int lastCol) { CellRangeAddress region = new CellRangeAddress(firstRow, lastRow, firstCol, lastCol); addCellRangeAddress(region); } public void addCellRangeAddress(CellRangeAddress cra) {
/** * Determines if the given {@link CellReference} lies within the bounds * of this range. * <p>NOTE: It is up to the caller to ensure the reference is * for the correct sheet, since this instance doesn't have a sheet reference. * * @param ref the CellReference to check * @return True if the reference lies within the bounds, false otherwise. * @see #intersects(CellRangeAddressBase) for checking if two ranges overlap */ public boolean isInRange(CellReference ref) { return isInRange(ref.getRow(), ref.getCol()); }
/** * @return the 0-based row of the first cell that contains this hyperlink */ public int getFirstRow() { return _range.getFirstRow(); }
/** * @return the 0-based column of the first cell that contains this hyperlink */ public int getFirstColumn() { return _range.getFirstColumn(); }
/** * @return the 0-based column of the last cell that contains this hyperlink */ public int getLastColumn() { return _range.getLastColumn(); }
public int getOffsetRows() { return target.getRow() - region.getFirstRow(); }
/** * Determines if the given {@link CellAddress} lies within the bounds * of this range. * <p>NOTE: It is up to the caller to ensure the reference is * for the correct sheet, since this instance doesn't have a sheet reference. * * @param ref the CellAddress to check * @return True if the reference lies within the bounds, false otherwise. * @see #intersects(CellRangeAddressBase) for checking if two ranges overlap */ public boolean isInRange(CellAddress ref) { return isInRange(ref.getRow(), ref.getColumn()); }
/** * Retrieves the border style for a given cell * * @param row * @param col * @param property */ public BorderStyle getBorderStyle(int row, int col, String property) { return getBorderStyle(new CellAddress(row, col), property); }
/** * Retrieves the border style for a given cell * * @param row * @param col * @param property */ public short getTemplateProperty(int row, int col, String property) { return getTemplateProperty(new CellAddress(row, col), property); }
/** * Retrieves the number of border colors assigned to a cell * * @param row * @param col */ public int getNumBorderColors(int row, int col) { return getNumBorderColors(new CellAddress(row, col)); }
/** * @return the text format of this range. Single cell ranges are formatted * like single cell references (e.g. 'A1' instead of 'A1:A1'). */ public String formatAsString() { return formatAsString(null, false); }
/** * Set the first column (zero-based) of the range that contains this hyperlink * * @param firstCol the first column (zero-based) */ public void setFirstColumn(int firstCol) { _range.setFirstColumn(firstCol); }
/** * Set the last column (zero-based) of the range that contains this hyperlink * * @param lastCol the last column (zero-based) */ public void setLastColumn(int lastCol) { _range.setLastColumn(lastCol); }
public String getStringValue() { if (_stringValue == null) { _stringValue = NumberToTextConverter.toText(_value); } return _stringValue; } public final String toString() {
/** * @return the total size of for the specified number of ranges, * including the initial 2 byte range count */ public static int getEncodedSize(int numberOfRanges) { return 2 + CellRangeAddress.getEncodedSize(numberOfRanges); }
/** * Convert to an equivalent {@link NormalisedDecimal} representation having 15 decimal digits of precision in the * non-fractional bits of the significand. */ public NormalisedDecimal normaliseBaseTen() { return NormalisedDecimal.create(_significand, _binaryExponent); }
/** * Sets the rightBorderColor attribute of the HSSFRegionUtil object * * @param color The color of the border * @param region The region that should have the border * @param workbook The workbook that the region is on. * @param sheet The sheet that the region is on. */ public static void setRightBorderColor(int color, CellRangeAddress region, HSSFSheet sheet, HSSFWorkbook workbook) { RegionUtil.setRightBorderColor(color, region, sheet); }