xl.write
Class Number

System.Object
  extended byxl.biff.RecordData
      extended byxl.biff.WritableRecordData
          extended byxl.write.biff.CellValue
              extended byxl.write.biff.NumberRecord
                  extended byxl.write.Number
All Implemented Interfaces:
xl.biff.ByteData, Cell, NumberCell, WritableCell

public class Number
extends xl.write.biff.NumberRecord
implements WritableCell, NumberCell

A cell, created by user applications, which contains a numerical value


Constructor Summary
Number(int c, int r, double val)
          Constructs a number, which, when added to a spreadsheet, will display the specified value at the column/row position indicated.
Number(int c, int r, double val, CellFormat st)
          Constructs a number, which, when added to a spreadsheet, will display the specified value at the column/row position with the specified CellFormat.
Number(NumberCell nc)
          Constructor used internally by the application when making a writable copy of a spreadsheet that has been read in
 
Method Summary
 WritableCell copyTo(int col, int row)
          Implementation of the deep copy function
 void setValue(double val)
          Sets the numerical value for this cell
 
Methods inherited from class xl.write.biff.NumberRecord
getContents, getData, getNumberFormat, getType, getValue
 
Methods inherited from class xl.write.biff.CellValue
addCellFeatures, getCellFeatures, getCellFormat, getColumn, getRow, getWritableCellFeatures, isHidden, removeComment, setCellFeatures, setCellFormat
 
Methods inherited from class xl.biff.WritableRecordData
getBytes
 
Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface xl.write.WritableCell
getWritableCellFeatures, setCellFeatures, setCellFormat
 
Methods inherited from interface xl.Cell
getCellFeatures, getCellFormat, getColumn, getContents, getRow, getType, isHidden
 
Methods inherited from interface xl.NumberCell
getNumberFormat, getValue
 

Constructor Detail

Number

public Number(int c,
              int r,
              double val)
Constructs a number, which, when added to a spreadsheet, will display the specified value at the column/row position indicated. By default, the cell will display with an accuracy of 3 decimal places

Parameters:
c - the column
r - the row
val - the value

Number

public Number(int c,
              int r,
              double val,
              CellFormat st)
Constructs a number, which, when added to a spreadsheet, will display the specified value at the column/row position with the specified CellFormat. The CellFormat may specify font information and number format information such as the number of decimal places

Parameters:
c - the column
r - the row
val - the value
st - the cell format

Number

public Number(NumberCell nc)
Constructor used internally by the application when making a writable copy of a spreadsheet that has been read in

Parameters:
nc - the cell to copy
Method Detail

setValue

public void setValue(double val)
Sets the numerical value for this cell

Parameters:
val - the value

copyTo

public WritableCell copyTo(int col,
                           int row)
Implementation of the deep copy function

Specified by:
copyTo in interface WritableCell
Parameters:
col - the column which the new cell will occupy
row - the row which the new cell will occupy
Returns:
a copy of this cell, which can then be added to the sheet