org.apache.poi.hssf.record
Class NoteRecord

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

public final class NoteRecord
extends StandardRecord

NOTE: Comment Associated with a Cell (0x001C)

Author:
Yegor Kozlov

Field Summary
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 visible
static short sid
           
 
Constructor Summary
NoteRecord()
          Construct a new NoteRecord and fill its data with the default values
NoteRecord(RecordInputStream in)
          Read the record data from the supplied RecordInputStream
 
Method Summary
protected  boolean authorIsMultibyte()
          For unit testing only!
 java.lang.Object clone()
           
 java.lang.String getAuthor()
          Name of the original comment author
 int getColumn()
          Return the column that contains the comment
protected  int getDataSize()
           
 short getFlags()
          Options flags.
 int getRow()
          Return the row that contains the comment
 int getShapeId()
          Object id for OBJ record that contains the comment
 short 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(java.lang.String author)
          Name of the original comment author
 void setColumn(int col)
          Specify the column that contains the comment
 void setFlags(short flags)
          Options flag
 void setRow(int row)
          Specify the row that contains the comment
 void setShapeId(int id)
          Object id for OBJ record that contains the comment
 java.lang.String toString()
          Convert this record to string.
 
Methods inherited from class org.apache.poi.hssf.record.StandardRecord
getRecordSize, serialize
 
Methods inherited from class org.apache.poi.hssf.record.Record
cloneViaReserialise, 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

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


NoteRecord

public NoteRecord(RecordInputStream in)
Read the record data from the supplied RecordInputStream

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.

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 consiting of a 'ushort sid' and 'ushort reclength' has already been written by thye superclass).

Specified by:
serialize in class StandardRecord

getDataSize

protected int getDataSize()
Specified by:
getDataSize in class StandardRecord

toString

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

Overrides:
toString in class Record

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

authorIsMultibyte

protected boolean authorIsMultibyte()
For unit testing only!


getShapeId

public int getShapeId()
Object id for OBJ record that contains the comment


setShapeId

public void setShapeId(int 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 2012 The Apache Software Foundation or its licensors, as applicable.