Package jxl.write
Class Number
java.lang.Object
jxl.biff.RecordData
jxl.biff.WritableRecordData
jxl.write.biff.CellValue
jxl.write.biff.NumberRecord
jxl.write.Number
- All Implemented Interfaces:
jxl.biff.ByteData
,Cell
,NumberCell
,WritableCell
A cell, created by user applications, which contains a numerical value
-
Constructor Summary
ConstructorsConstructorDescriptionNumber
(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
Methods inherited from class jxl.write.biff.NumberRecord
getContents, getData, getNumberFormat, getType, getValue
Methods inherited from class jxl.write.biff.CellValue
addCellFeatures, getCellFeatures, getCellFormat, getColumn, getRow, getSheet, getWritableCellFeatures, isHidden, removeCellFeatures, removeComment, removeDataValidation, setCellFeatures, setCellFormat
Methods inherited from class jxl.biff.WritableRecordData
getBytes
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface jxl.Cell
getCellFeatures, getCellFormat, getColumn, getContents, getRow, getType, isHidden
Methods inherited from interface jxl.NumberCell
getNumberFormat, getValue
Methods inherited from interface jxl.write.WritableCell
getWritableCellFeatures, setCellFeatures, setCellFormat
-
Constructor Details
-
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 columnr
- the rowval
- the value
-
Number
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 columnr
- the rowval
- the valuest
- the cell format
-
Number
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 Details
-
setValue
public void setValue(double val) Sets the numerical value for this cell- Overrides:
setValue
in classjxl.write.biff.NumberRecord
- Parameters:
val
- the value
-
copyTo
Implementation of the deep copy function- Specified by:
copyTo
in interfaceWritableCell
- Parameters:
col
- the column which the new cell will occupyrow
- the row which the new cell will occupy- Returns:
- a copy of this cell, which can then be added to the sheet
-