jxl.write
Class DateTime

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.biff.WritableRecordData
              |
              +--jxl.write.biff.CellValue
                    |
                    +--jxl.write.biff.DateRecord
                          |
                          +--jxl.write.DateTime
All Implemented Interfaces:
ByteData, Cell, DateCell, WritableCell

public class DateTime
extends DateRecord
implements WritableCell, DateCell

A Date which may be created on the fly by a user application and added to a spreadsheet NOTE: By default, all dates will have local timezone information added to their UTC value. If this is not desired (eg. if the date entered represents an interval eg. 9.83s for the 100m world record, then use the overloaded constructor which indicate that the date passed in was created under the GMT timezone. It is important that when the date was created, an instruction like Calendar.setTimeZone(TimeZone.getTimeZone("GMT")) was made prior to that


Inner classes inherited from class jxl.write.biff.DateRecord
DateRecord.GMTDate
 
Field Summary
static DateRecord.GMTDate GMT
          Instance variable for dummy variable overload
 
Fields inherited from class jxl.write.biff.DateRecord
date, defaultDateFormat, msInADay, nonLeapDay, time, utcOffsetDays, value
 
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
DateTime(DateCell dc)
          A constructor called by the worksheet when creating a writable version of a spreadsheet that has been read in
DateTime(int c, int r, java.util.Date d)
          Constructor
DateTime(int c, int r, java.util.Date d, CellFormat st)
          Constructor which takes the format for this cell
DateTime(int c, int r, java.util.Date d, CellFormat st, boolean tim)
          Constructor which takes the format for the cell and an indicator as to whether this cell is a full date time or purely just a time eg.
DateTime(int c, int r, java.util.Date d, CellFormat st, DateRecord.GMTDate a)
          Constructor, which adjusts the specified date to take timezone considerations into account
DateTime(int c, int r, java.util.Date d, DateRecord.GMTDate a)
          Constructor, which adjusts the specified date to take timezone considerations into account
 
Method Summary
 void setDate(java.util.Date d)
          Sets the date for this cell
 void setDate(java.util.Date d, DateRecord.GMTDate a)
          Sets the date for this cell, performing the necessary timezone adjustments
 
Methods inherited from class jxl.write.biff.DateRecord
calculateValue, getContents, getData, getDate, getDateFormat, getType, isTime
 
Methods inherited from class jxl.write.biff.CellValue
decrementColumn, decrementRow, getCellFormat, getColumn, getRow, getXFIndex, incrementColumn, incrementRow, isHidden, isReferenced, setCellDetails, 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
 
Methods inherited from interface jxl.write.WritableCell
setCellFormat
 
Methods inherited from interface jxl.Cell
getCellFormat, getColumn, getContents, getRow, getType, isHidden
 
Methods inherited from interface jxl.DateCell
getDate, getDateFormat, isTime
 

Field Detail

GMT

public static final DateRecord.GMTDate GMT
Instance variable for dummy variable overload
Constructor Detail

DateTime

public DateTime(int c,
                int r,
                java.util.Date d)
Constructor
Parameters:
c -  
r -  
d -  

DateTime

public DateTime(int c,
                int r,
                java.util.Date d,
                DateRecord.GMTDate a)
Constructor, which adjusts the specified date to take timezone considerations into account
Parameters:
c -  
r -  
d -  
a -  

DateTime

public DateTime(int c,
                int r,
                java.util.Date d,
                CellFormat st)
Constructor which takes the format for this cell
Parameters:
c -  
r -  
st -  
d -  

DateTime

public DateTime(int c,
                int r,
                java.util.Date d,
                CellFormat st,
                DateRecord.GMTDate a)
Constructor, which adjusts the specified date to take timezone considerations into account
Parameters:
c -  
r -  
d -  
st -  
a -  

DateTime

public DateTime(int c,
                int r,
                java.util.Date d,
                CellFormat st,
                boolean tim)
Constructor which takes the format for the cell and an indicator as to whether this cell is a full date time or purely just a time eg. if the spreadsheet is to contain the world record for 100m, then the value would be 9.83s, which would be indicated as just a time
Parameters:
c -  
r -  
st -  
tim -  
d -  

DateTime

public DateTime(DateCell dc)
A constructor called by the worksheet when creating a writable version of a spreadsheet that has been read in
Parameters:
dc -  
Method Detail

setDate

public void setDate(java.util.Date d)
Sets the date for this cell
Overrides:
setDate in class DateRecord
Parameters:
d -  

setDate

public void setDate(java.util.Date d,
                    DateRecord.GMTDate a)
Sets the date for this cell, performing the necessary timezone adjustments
Overrides:
setDate in class DateRecord
Parameters:
d -  
a -