Package org.apache.poi.hssf.record
Class NoteRecord
- java.lang.Object
-
- org.apache.poi.hssf.record.RecordBase
-
- org.apache.poi.hssf.record.Record
-
- org.apache.poi.hssf.record.StandardRecord
-
- org.apache.poi.hssf.record.NoteRecord
-
- All Implemented Interfaces:
Duplicatable
,GenericRecord
public final class NoteRecord extends StandardRecord
NOTE: Comment Associated with a Cell (0x001C)
-
-
Field Summary
Fields Modifier and Type Field Description static NoteRecord[]
EMPTY_ARRAY
static short
NOTE_HIDDEN
Flag indicating that the comment is hidden (default)static short
NOTE_VISIBLE
Flag indicating that the comment is visiblestatic short
sid
-
Constructor Summary
Constructors Constructor Description NoteRecord()
Construct a newNoteRecord
and fill its data with the default valuesNoteRecord(NoteRecord other)
NoteRecord(RecordInputStream in)
Read the record data from the suppliedRecordInputStream
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NoteRecord
copy()
String
getAuthor()
Name of the original comment authorint
getColumn()
Return the column that contains the commentprotected int
getDataSize()
short
getFlags()
Options flags.Map<String,Supplier<?>>
getGenericProperties()
HSSFRecordTypes
getGenericRecordType()
int
getRow()
Return the row that contains the commentint
getShapeId()
Object id for OBJ record that contains the commentshort
getSid()
return the non static version of the id for this record.void
serialize(LittleEndianOutput out)
Write the data content of this BIFF record.void
setAuthor(String author)
Name of the original comment authorvoid
setColumn(int col)
Specify the column that contains the commentvoid
setFlags(short flags)
Options flagvoid
setRow(int row)
Specify the row that contains the commentvoid
setShapeId(int id)
Object id for OBJ record that contains the comment-
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
-
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, serialize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.poi.common.usermodel.GenericRecord
getGenericChildren
-
-
-
-
Field Detail
-
sid
public static final short sid
- See Also:
- Constant Field Values
-
EMPTY_ARRAY
public static final NoteRecord[] EMPTY_ARRAY
-
NOTE_HIDDEN
public static final short NOTE_HIDDEN
Flag indicating that the comment is hidden (default)- See Also:
- Constant Field Values
-
NOTE_VISIBLE
public static final short NOTE_VISIBLE
Flag indicating that the comment is visible- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NoteRecord
public NoteRecord()
Construct a newNoteRecord
and fill its data with the default values
-
NoteRecord
public NoteRecord(NoteRecord other)
-
NoteRecord
public NoteRecord(RecordInputStream in)
Read the record data from the suppliedRecordInputStream
- Parameters:
in
- the RecordInputStream to read from
-
-
Method Detail
-
getSid
public short getSid()
Description copied from class:Record
return the non static version of the id for this record.
-
serialize
public void serialize(LittleEndianOutput out)
Description copied from class:StandardRecord
Write the data content of this BIFF record. The 'ushort sid' and 'ushort size' header fields have already been written by the superclass.The number of bytes written must equal the record size reported by
RecordBase.getRecordSize()
} minus four ( record header consisting of a 'ushort sid' and 'ushort reclength' has already been written by their superclass).- Specified by:
serialize
in classStandardRecord
- Parameters:
out
- the output object
-
getDataSize
protected int getDataSize()
- Specified by:
getDataSize
in classStandardRecord
-
getRow
public int getRow()
Return the row that contains the comment- Returns:
- the row that contains the comment
-
setRow
public void setRow(int row)
Specify the row that contains the comment- Parameters:
row
- the row that contains the comment
-
getColumn
public int getColumn()
Return the column that contains the comment- Returns:
- the column that contains the comment
-
setColumn
public void setColumn(int col)
Specify the column that contains the comment- Parameters:
col
- the column that contains the comment
-
getFlags
public short getFlags()
Options flags.- Returns:
- the options flag
- See Also:
NOTE_VISIBLE
,NOTE_HIDDEN
-
setFlags
public void setFlags(short flags)
Options flag- Parameters:
flags
- the options flag- See Also:
NOTE_VISIBLE
,NOTE_HIDDEN
-
getShapeId
public int getShapeId()
Object id for OBJ record that contains the comment- Returns:
- the Object id for OBJ record that contains the comment
-
setShapeId
public void setShapeId(int id)
Object id for OBJ record that contains the comment- Parameters:
id
- the Object id for OBJ record that contains the comment
-
getAuthor
public String getAuthor()
Name of the original comment author- Returns:
- the name of the original author of the comment
-
setAuthor
public void setAuthor(String author)
Name of the original comment author- Parameters:
author
- the name of the original author of the comment
-
copy
public NoteRecord copy()
- Specified by:
copy
in interfaceDuplicatable
- Specified by:
copy
in classStandardRecord
- Returns:
- a deep copy of the implementing class / instance
-
getGenericRecordType
public HSSFRecordTypes getGenericRecordType()
- Specified by:
getGenericRecordType
in interfaceGenericRecord
- Specified by:
getGenericRecordType
in classRecord
-
-