本文整理了Java中jxl.write.DateTime.<init>()
方法的一些代码示例,展示了DateTime.<init>()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。DateTime.<init>()
方法的具体详情如下:
包路径:jxl.write.DateTime
类名称:DateTime
方法名:<init>
[英]Constructor. The date will be displayed with date and time components using the default date format
[中]构造器。将使用默认日期格式显示日期和时间组件
代码示例来源:origin: pentaho/pentaho-kettle
DateTime dateTime = new DateTime( data.positionX, data.positionY, vMeta.getDate( v ), cellFormat );
data.sheet.addCell( dateTime );
} else if ( !meta.isNullBlank() ) {
代码示例来源:origin: com.hynnet/jxl
/**
* Implementation of the deep copy function
*
* @param col the column which the new cell will occupy
* @param row the row which the new cell will occupy
* @return a copy of this cell, which can then be added to the sheet
*/
public WritableCell copyTo(int col, int row)
{
return new DateTime(col, row, this);
}
}
代码示例来源:origin: net.sourceforge.jexcelapi/jxl
/**
* Implementation of the deep copy function
*
* @param col the column which the new cell will occupy
* @param row the row which the new cell will occupy
* @return a copy of this cell, which can then be added to the sheet
*/
public WritableCell copyTo(int col, int row)
{
return new DateTime(col, row, this);
}
}
代码示例来源:origin: org.jboss.seam/jboss-seam-excel
return new DateTime(column, row, (Date) data, cellFormat);
} catch (ClassCastException e) {
String message = Interpolator.instance().interpolate(ResourceBundle.instance().getString("org.jboss.seam.excel.not_a_date"), data.toString());
代码示例来源:origin: org.icefaces/icefaces-compat
cell = new DateTime(col, row, (Date) output);
代码示例来源:origin: com.hynnet/jxl
DateTime dt = new DateTime(0,2,date, cf1, DateTime.GMT);
s.addCell(dt);
dt = new DateTime(0,3,date, cf1,DateTime.GMT);
s.addCell(dt);
dt = new DateTime(0,4,date, cf1);
s.addCell(dt);
dt = new DateTime(0,5,date, cf1);
s.addCell(dt);
dt = new DateTime(0,6,date, cf1);
s.addCell(dt);
dt = new DateTime(0,7,date, cf1);
s.addCell(dt);
dt = new DateTime(0,8,date, cf1, DateTime.GMT);
s.addCell(dt);
dt = new DateTime(0,9,date, cf1, DateTime.GMT);
s.addCell(dt);
dt = new DateTime(0,10,date, cf1, DateTime.GMT);
s.addCell(dt);
dt = new DateTime(0,11,date, cf1, DateTime.GMT);
s.addCell(dt);
代码示例来源:origin: jasperreports/jasperreports
public void handle(DateTextValue textValue) throws JRException
{
baseStyle.setDisplayFormat(getDateFormat(textValue.getPattern()));
WritableCellFormat cellStyle = getLoadedCellStyle(baseStyle);
if (textValue.getValue() == null)
{
result = blank(cellStyle);
}
else
{
result = new DateTime(x, y, textValue.getValue(), cellStyle);
}
}
代码示例来源:origin: cn-cerc/summer-mis
protected void writeColumn(WritableSheet sheet, int col, int row, Column column)
throws WriteException, RowsExceededException {
if (column instanceof NumberColumn) {
jxl.write.Number item = new jxl.write.Number(col, row, (double) column.getValue());
sheet.addCell(item);
} else if (column instanceof DateColumn) {
TDate day = (TDate) column.getValue();
DateTime item = new DateTime(col, row, day.getData(), new WritableCellFormat(df1));
sheet.addCell(item);
} else if (column instanceof DateTimeColumn) {
DateTime item = new DateTime(col, row, (Date) column.getValue(), new WritableCellFormat(df2));
sheet.addCell(item);
} else {
Label item = new Label(col, row, column.getValue().toString());
sheet.addCell(item);
}
}
代码示例来源:origin: org.jxls/jxls-jexcel
break;
case DATE:
writableCell = new DateTime(col, row, (Date)evaluationResult );
break;
default:
代码示例来源:origin: us.ihmc/simulation-construction-set-tools
private void writeInfoToWorkBook(WritableWorkbook workbook)
{
WritableSheet infoSheet = workbook.createSheet("Run info", workbook.getNumberOfSheets());
int labelColumn = 0;
int dataColumn = 1;
int row = 0;
addStringToSheet(infoSheet, labelColumn, row, "Date: ", headerCellFormat);
WritableCell dateCell = new DateTime(dataColumn, row, Date.from(ZonedDateTime.now().toInstant()));
addCell(infoSheet, dateCell);
row++;
addStringToSheet(infoSheet, labelColumn, row, "Robot type: ", headerCellFormat);
addStringToSheet(infoSheet, dataColumn, row, robot.getClass().getSimpleName());
row++;
addStringToSheet(infoSheet, labelColumn, row, "Robot name: ", headerCellFormat);
addStringToSheet(infoSheet, dataColumn, row, robot.getName());
row++;
addStringToSheet(infoSheet, labelColumn, row, "Total mass [kg]: ", headerCellFormat);
addNumberToSheet(infoSheet, dataColumn, row, robot.computeCenterOfMass(new Point3D()));
row++;
addStringToSheet(infoSheet, labelColumn, row, "Run time [s]: ", headerCellFormat);
addNumberToSheet(infoSheet, dataColumn, row, dataBuffer.getEntry(robot.getYoTime()).getMax());
row++;
addStringToSheet(infoSheet, labelColumn, row, "Mechanical cost of transport: ", headerCellFormat);
addNumberToSheet(infoSheet, dataColumn, row, computeMechanicalCostOfTransport());
row++;
}
代码示例来源:origin: youngMen1/JAVA-
Double.valueOf(String.valueOf(o)), wcfFC));
} else if (type == CellType.DATE || type == CellType.DATE_FORMULA) {
wsheet.addCell(new jxl.write.DateTime(col, row, DateUtil.stringToDate(o
.toString()), wcfFC));
} else {
代码示例来源:origin: org.fudaa.framework.ctulu/ctulu-common
_feuille.addCell(new jxl.write.DateTime(col, lig, (Date) value, format));
} else {
代码示例来源:origin: org.n52.sensorweb/sensorwebclient-api
Date date = timePos.getCalendar().getTime();
sheet.addCell(new DateTime(2, counter + 1, date, dateFormat));
代码示例来源:origin: com.manydesigns/elements
public void addFieldToCell(WritableSheet sheet, int i, int j, Field field) throws WriteException {
if (field instanceof NumericField) {
NumericField numField = (NumericField) field;
if (numField.getValue() != null) {
jxl.write.Number number;
BigDecimal decimalValue = numField.getValue();
if (numField.getDecimalFormat() == null) {
number = new Number(j, i, decimalValue == null ? null : decimalValue.doubleValue());
} else {
number = new Number(j, i, decimalValue == null ? null : decimalValue.doubleValue(),
getNumberFormat(numField.getDecimalFormat().toPattern()));
}
sheet.addCell(number);
}
} else if (field instanceof PasswordField) {
Label label = new Label(j, i, PasswordField.PASSWORD_PLACEHOLDER);
sheet.addCell(label);
} else if (field instanceof DateField) {
DateField dateField = (DateField) field;
DateTime dateCell;
Date date = dateField.getValue();
if (date != null) {
dateCell = new DateTime(j, i, date, getDateFormat(dateField.getDatePattern()));
sheet.addCell(dateCell);
}
} else {
Label label = new Label(j, i, field.getStringValue());
sheet.addCell(label);
}
}
代码示例来源:origin: ManyDesigns/Portofino
public void addFieldToCell(WritableSheet sheet, int i, int j, Field field) throws WriteException {
if (field instanceof NumericField) {
NumericField numField = (NumericField) field;
if (numField.getValue() != null) {
jxl.write.Number number;
BigDecimal decimalValue = numField.getValue();
if (numField.getDecimalFormat() == null) {
number = new Number(j, i, decimalValue == null ? null : decimalValue.doubleValue());
} else {
number = new Number(j, i, decimalValue == null ? null : decimalValue.doubleValue(),
getNumberFormat(numField.getDecimalFormat().toPattern()));
}
sheet.addCell(number);
}
} else if (field instanceof PasswordField) {
Label label = new Label(j, i, PasswordField.PASSWORD_PLACEHOLDER);
sheet.addCell(label);
} else if (field instanceof DateField) {
DateField dateField = (DateField) field;
DateTime dateCell;
Date date = dateField.getValue();
if (date != null) {
dateCell = new DateTime(j, i, date, getDateFormat(dateField.getDatePattern()));
sheet.addCell(dateCell);
}
} else {
Label label = new Label(j, i, field.getStringValue());
sheet.addCell(label);
}
}
代码示例来源:origin: net.sourceforge.jexcelapi/jxl
newCell = new DateTime((DateCell) cell);
代码示例来源:origin: org.xworker/xworker_dataobject
if(value != null){
jxl.write.WritableCellFormat sf = "date".equals(type) ? dateCellFormat : timeCellFormat;
DateTime dt = new DateTime(col, row, value, sf);
sheet.addCell(dt);
}else{
代码示例来源:origin: net.sourceforge.jexcelapi/jxl
newCell = new DateTime((DateCell) cell);
代码示例来源:origin: com.hynnet/jxl
newCell = new DateTime((DateCell) cell);
代码示例来源:origin: com.hynnet/jxl
newCell = new DateTime((DateCell) cell);
内容来源于网络,如有侵权,请联系作者删除!