jxl.write.biff
Class LabelRecord

java.lang.Object
  extended byjxl.biff.RecordData
      extended byjxl.biff.WritableRecordData
          extended byjxl.write.biff.CellValue
              extended byjxl.write.biff.LabelRecord
All Implemented Interfaces:
ByteData, Cell, WritableCell
Direct Known Subclasses:
Label

public abstract class LabelRecord
extends CellValue

A label record, used for writing out string


Field Summary
 
Fields inherited from class jxl.biff.WritableRecordData
maxRecordLength
 
Constructor Summary
protected LabelRecord(int c, int r, LabelRecord lr)
          Copy constructor
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
protected  void setString(java.lang.String s)
          Sets the string contents of this cell
 
Methods inherited from class jxl.write.biff.CellValue
addCellFeatures, getCellFeatures, getCellFormat, getColumn, getRow, getSheet, getWritableCellFeatures, isHidden, removeComment, setCellFeatures, setCellFormat
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jxl.write.WritableCell
copyTo
 

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(int c,
                      int r,
                      LabelRecord lr)
Copy constructor

Parameters:
c - the column
r - the row

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