/** * Returns the sheet this cell belongs to * * @return the sheet this cell belongs to */ @Override public SXSSFSheet getSheet() { return _row.getSheet(); }
/** * Get the row's height measured in twips (1/20th of a point). If the height is not set, the default worksheet value is returned, * See {@link Sheet#getDefaultRowHeightInPoints()} * * @return row height measured in twips (1/20th of a point) */ @Override public short getHeight() { return (short)(_height==-1?getSheet().getDefaultRowHeightInPoints()*20:_height); }
/** * Returns row height measured in point size. If the height is not set, the default worksheet value is returned, * See {@link Sheet#getDefaultRowHeightInPoints()} * * @return row height measured in point size * @see Sheet#getDefaultRowHeightInPoints() */ @Override public float getHeightInPoints() { return (float)(_height==-1?getSheet().getDefaultRowHeightInPoints():_height/20.0); }
/** * Compares two <code>SXSSFRow</code> objects. Two rows are equal if they belong to the same worksheet and * their row indexes are equal. * * @param other the <code>SXSSFRow</code> to be compared. * @return <ul> * <li> * the value <code>0</code> if the row number of this <code>SXSSFRow</code> is * equal to the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value less than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically less than the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value greater than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically greater than the row number of the argument <code>SXSSFRow</code> * </li> * </ul> * @throws IllegalArgumentException if the argument row belongs to a different worksheet */ @Override public int compareTo(SXSSFRow other) { if (this.getSheet() != other.getSheet()) { throw new IllegalArgumentException("The compared rows must belong to the same sheet"); } int thisRow = this.getRowNum(); int otherRow = other.getRowNum(); return Integer.compare(thisRow, otherRow); }
/** * Returns the whole-row cell style. Most rows won't * have one of these, so will return null. Call * {@link #isFormatted()} to check first. */ @Override public CellStyle getRowStyle() { if(!isFormatted()) { return null; } return getSheet().getWorkbook().getCellStyleAt(_style); }
/** * Returns the sheet this cell belongs to * * @return the sheet this cell belongs to */ @Override public SXSSFSheet getSheet() { return _row.getSheet(); }
/** * Returns the sheet this cell belongs to * * @return the sheet this cell belongs to */ public Sheet getSheet() { return _row.getSheet(); }
/** * Get the row's height measured in twips (1/20th of a point). If the height is not set, the default worksheet value is returned, * See {@link Sheet#getDefaultRowHeightInPoints()} * * @return row height measured in twips (1/20th of a point) */ @Override public short getHeight() { return (short)(_height==-1?getSheet().getDefaultRowHeightInPoints()*20:_height); }
/** * Get the row's height measured in twips (1/20th of a point). If the height is not set, the default worksheet value is returned, * See {@link Sheet#getDefaultRowHeightInPoints()} * * @return row height measured in twips (1/20th of a point) */ public short getHeight() { return (short)(_height==-1?getSheet().getDefaultRowHeightInPoints()*20:_height); }
/** * Returns row height measured in point size. If the height is not set, the default worksheet value is returned, * See {@link Sheet#getDefaultRowHeightInPoints()} * * @return row height measured in point size * @see Sheet#getDefaultRowHeightInPoints() */ public float getHeightInPoints() { return (float)(_height==-1?getSheet().getDefaultRowHeightInPoints():(float)_height/20.0); }
/** * Returns row height measured in point size. If the height is not set, the default worksheet value is returned, * See {@link Sheet#getDefaultRowHeightInPoints()} * * @return row height measured in point size * @see Sheet#getDefaultRowHeightInPoints() */ @Override public float getHeightInPoints() { return (float)(_height==-1?getSheet().getDefaultRowHeightInPoints():_height/20.0); }
/** * Compares two <code>SXSSFRow</code> objects. Two rows are equal if they belong to the same worksheet and * their row indexes are equal. * * @param other the <code>SXSSFRow</code> to be compared. * @return <ul> * <li> * the value <code>0</code> if the row number of this <code>SXSSFRow</code> is * equal to the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value less than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically less than the row number of the argument <code>SXSSFRow</code> * </li> * <li> * a value greater than <code>0</code> if the row number of this this <code>SXSSFRow</code> is * numerically greater than the row number of the argument <code>SXSSFRow</code> * </li> * </ul> * @throws IllegalArgumentException if the argument row belongs to a different worksheet */ @Override public int compareTo(SXSSFRow other) { if (this.getSheet() != other.getSheet()) { throw new IllegalArgumentException("The compared rows must belong to the same sheet"); } int thisRow = this.getRowNum(); int otherRow = other.getRowNum(); return Integer.compare(thisRow, otherRow); }
/** * Returns the whole-row cell style. Most rows won't * have one of these, so will return null. Call * {@link #isFormatted()} to check first. */ public CellStyle getRowStyle() { if(!isFormatted()) return null; return getSheet().getWorkbook().getCellStyleAt(_style); }
/** * Returns the whole-row cell style. Most rows won't * have one of these, so will return null. Call * {@link #isFormatted()} to check first. */ @Override public CellStyle getRowStyle() { if(!isFormatted()) { return null; } return getSheet().getWorkbook().getCellStyleAt(_style); }