jxl.write.biff
Class LabelRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.biff.WritableRecordData
              |
              +--jxl.write.biff.CellValue
                    |
                    +--jxl.write.biff.LabelRecord
All Implemented Interfaces:
ByteData, Cell, WritableCell
Direct Known Subclasses:
Label

public class LabelRecord
extends CellValue

A label record, used for writing out string


Field Summary
private  java.lang.String contents
          The string
private  int index
          The index of the string in the shared string table
private  SharedStrings sharedStrings
          A handle to the shared strings used within this workbook
 
Fields inherited from class jxl.write.biff.CellValue
column, format, formattingRecords, referenced, row, sheet
 
Fields inherited from class jxl.biff.WritableRecordData
maxRecordLength
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
protected LabelRecord(int c, int r, java.lang.String cont)
          Constructor used when creating a label from the user API
protected LabelRecord(int c, int r, java.lang.String cont, CellFormat st)
          Constructor used when creating a label from the API.
protected LabelRecord(LabelCell lc)
          Constructor used when copying a label from a read only spreadsheet
 
Method Summary
 java.lang.String getContents()
          Quick and dirty function to return the contents of this cell as a string.
 byte[] getData()
          Gets the binary data for output to file
 java.lang.String getString()
          Gets the label for this cell.
 CellType getType()
          Returns the content type of this cell
(package private)  void setCellDetails(FormattingRecords fr, SharedStrings ss, WritableSheetImpl s)
          Overrides the method in the base class in order to add the string content to the shared string table, and to store its shared string index
protected  void setString(java.lang.String s)
          Sets the string contents of this cell
 
Methods inherited from class jxl.write.biff.CellValue
decrementColumn, decrementRow, getCellFormat, getColumn, getRow, getXFIndex, incrementColumn, incrementRow, isHidden, isReferenced, setCellFormat
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes, handleContinueRecords
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

contents

private java.lang.String contents
The string

sharedStrings

private SharedStrings sharedStrings
A handle to the shared strings used within this workbook

index

private int index
The index of the string in the shared string table
Constructor Detail

LabelRecord

protected LabelRecord(int c,
                      int r,
                      java.lang.String cont)
Constructor used when creating a label from the user API
Parameters:
c - the column
cont - the contents
r - the row

LabelRecord

protected LabelRecord(int c,
                      int r,
                      java.lang.String cont,
                      CellFormat st)
Constructor used when creating a label from the API. This is overloaded to allow formatting information to be passed to the record
Parameters:
c - the column
cont - the contents
r - the row
st - the format applied to the cell

LabelRecord

protected LabelRecord(LabelCell lc)
Constructor used when copying a label from a read only spreadsheet
Parameters:
lc - the label to copy
Method Detail

getType

public CellType getType()
Returns the content type of this cell
Returns:
the content type for this cell

getData

public byte[] getData()
Gets the binary data for output to file
Overrides:
getData in class CellValue
Returns:
the binary data

getContents

public java.lang.String getContents()
Quick and dirty function to return the contents of this cell as a string. For more complex manipulation of the contents, it is necessary to cast this interface to correct subinterface
Returns:
the contents of this cell as a string

getString

public java.lang.String getString()
Gets the label for this cell. The value returned will be the same as for the getContents method in the base class
Returns:
the cell contents

setString

protected void setString(java.lang.String s)
Sets the string contents of this cell
Parameters:
s - the new string contents

setCellDetails

void setCellDetails(FormattingRecords fr,
                    SharedStrings ss,
                    WritableSheetImpl s)
Overrides the method in the base class in order to add the string content to the shared string table, and to store its shared string index
Overrides:
setCellDetails in class CellValue
Parameters:
fr - the formatting records
ss - the shared strings used within the workbook
s -