org.apache.poi.hssf.record
Class NoteRecord

java.lang.Object
  extended by org.apache.poi.hssf.record.Record
      extended by org.apache.poi.hssf.record.NoteRecord

public class NoteRecord
extends Record

NOTE: Comment Associated with a Cell (1Ch)

Author:
Yegor Kozlov

Field Summary
static short NOTE_HIDDEN
          Flag indicating that the comment is hidden (default)
static short NOTE_VISIBLE
          Flag indicating that the comment is visible
static short sid
           
 
Constructor Summary
NoteRecord()
          Construct a new NoteRecord and fill its data with the default values
NoteRecord(RecordInputStream in)
          Constructs a NoteRecord and fills its fields from the supplied RecordInputStream.
 
Method Summary
 java.lang.Object clone()
           
protected  void fillFields(RecordInputStream in)
          Read the record data from the supplied RecordInputStream
 java.lang.String getAuthor()
          Name of the original comment author
 short getColumn()
          Return the column that contains the comment
 short getFlags()
          Options flags.
 int getRecordSize()
          Size of record
 short getRow()
          Return the row that contains the comment
 short getShapeId()
          Object id for OBJ record that contains the comment
 short getSid()
          return the non static version of the id for this record.
 int serialize(int offset, byte[] data)
          Serialize the record data into the supplied array of bytes
 void setAuthor(java.lang.String author)
          Name of the original comment author
 void setColumn(short col)
          Specify the column that contains the comment
 void setFlags(short flags)
          Options flag
 void setRow(short row)
          Specify the row that contains the comment
 void setShapeId(short id)
          Object id for OBJ record that contains the comment
 java.lang.String toString()
          Convert this record to string.
protected  void validateSid(short id)
          Checks the sid matches the expected side for this record
 
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, isInValueSection, isValue, serialize
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sid

public static final short sid
See Also:
Constant Field Values

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 new NoteRecord and fill its data with the default values


NoteRecord

public NoteRecord(RecordInputStream in)
Constructs a NoteRecord and fills its fields from the supplied RecordInputStream.

Parameters:
in - the stream 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.

Specified by:
getSid in class Record
Returns:
id of this record.

validateSid

protected void validateSid(short id)
Checks the sid matches the expected side for this record

Specified by:
validateSid in class Record
Parameters:
id - the expected sid.

fillFields

protected void fillFields(RecordInputStream in)
Read the record data from the supplied RecordInputStream

Specified by:
fillFields in class Record
Parameters:
in - the RecordInputstream to read the record from

serialize

public int serialize(int offset,
                     byte[] data)
Serialize the record data into the supplied array of bytes

Specified by:
serialize in class Record
Parameters:
offset - offset in the data
data - the data to serialize into
Returns:
size of the record

getRecordSize

public int getRecordSize()
Size of record

Overrides:
getRecordSize in class Record

toString

public java.lang.String toString()
Convert this record to string. Used by BiffViewer and other utulities.

Overrides:
toString in class Record

getRow

public short getRow()
Return the row that contains the comment

Returns:
the row that contains the comment

setRow

public void setRow(short row)
Specify the row that contains the comment

Parameters:
row - the row that contains the comment

getColumn

public short getColumn()
Return the column that contains the comment

Returns:
the column that contains the comment

setColumn

public void setColumn(short 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 short getShapeId()
Object id for OBJ record that contains the comment


setShapeId

public void setShapeId(short id)
Object id for OBJ record that contains the comment


getAuthor

public java.lang.String getAuthor()
Name of the original comment author

Returns:
the name of the original author of the comment

setAuthor

public void setAuthor(java.lang.String author)
Name of the original comment author

Parameters:
author - the name of the original author of the comment

clone

public java.lang.Object clone()
Overrides:
clone in class Record


Copyright 2008 The Apache Software Foundation or its licensors, as applicable.