jxl.read.biff
abstract public class: CellValue [javadoc |
source]
java.lang.Object
jxl.biff.RecordData
jxl.read.biff.CellValue
All Implemented Interfaces:
CellFeaturesAccessor, Cell
Direct Known Subclasses:
LabelSSTRecord, SharedBooleanFormulaRecord, SharedDateFormulaRecord, RStringRecord, NumberRecord, NumberFormulaRecord, SharedErrorFormulaRecord, ErrorFormulaRecord, SharedNumberFormulaRecord, FormulaRecord, StringFormulaRecord, SharedStringFormulaRecord, BooleanRecord, RKRecord, BaseSharedFormulaRecord, LabelRecord, ErrorRecord, BooleanFormulaRecord, BlankCell
Abstract class for all records which actually contain cell values
| Constructor: |
protected CellValue(Record t,
FormattingRecords fr,
SheetImpl si) {
super(t);
byte[] data = getRecord().getData();
row = IntegerHelper.getInt(data[0], data[1]);
column = IntegerHelper.getInt(data[2], data[3]);
xfIndex = IntegerHelper.getInt(data[4], data[5]);
sheet = si;
formattingRecords = fr;
initialized = false;
}
Constructs this object from the raw cell data Parameters:
t - the raw cell data
fr - the formatting records
si - the sheet containing this cell
|
| Method from jxl.read.biff.CellValue Detail: |
public CellFeatures getCellFeatures() {
return features;
}
Accessor for the cell features |
public CellFormat getCellFormat() {
if (!initialized)
{
format = formattingRecords.getXFRecord(xfIndex);
initialized = true;
}
return format;
}
Gets the CellFormat object for this cell. Used by the WritableWorkbook
API |
public final int getColumn() {
return column;
}
Interface method which returns the column number of this cell |
public final int getRow() {
return row;
}
Interface method which returns the row number of this cell |
protected SheetImpl getSheet() {
return sheet;
}
|
public final int getXFIndex() {
return xfIndex;
}
Gets the XFRecord corresponding to the index number. Used when
copying a spreadsheet |
public boolean isHidden() {
ColumnInfoRecord cir = sheet.getColumnInfo(column);
if (cir != null && (cir.getWidth() == 0 || cir.getHidden()))
{
return true;
}
RowRecord rr = sheet.getRowInfo(row);
if (rr != null && (rr.getRowHeight() == 0 || rr.isCollapsed()))
{
return true;
}
return false;
}
Determines whether or not this cell has been hidden |
public void setCellFeatures(CellFeatures cf) {
if (features != null)
{
logger.warn("current cell features not null - overwriting");
}
features = cf;
}
Sets the cell features during the reading process |