2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > java电话本怎么做_Java写的电话号码本自动化生成器 程序片段

java电话本怎么做_Java写的电话号码本自动化生成器 程序片段

时间:2022-10-18 21:39:12

相关推荐

java电话本怎么做_Java写的电话号码本自动化生成器 程序片段

该楼层疑似违规已被系统折叠隐藏此楼查看此楼

}else{

OrgItem tempOIT=(OrgItem)i;

// float tempRowHeight=this.calcuRowHeight(tempOIT.OfficePhone.size(),tempOIT.OfficePhone.size(), 14.25f);

if(tempOIT.OfficePhone.size()>1){

for(int j=0;j

tempR=tempST.createRow(rc++);//新建一行

// float tempLH=13*tempLC/tempPIT.OfficePhone.size();

if(j==0){//除了办公电话和内码每行写一条外,其它信息都写在第一行

// String tempS=this.generateTitle(tempPIT.Title);

tempR.setHeightInPoints(10.25f);

tempC=tempR.createCell(0);

tempC.setCellType(Cell.CELL_TYPE_BLANK);

tempR.createCell(1).setCellValue(this.generateName(tempOIT.getName()));

tempR.createCell(2).setCellType(Cell.CELL_TYPE_BLANK);

tempR.createCell(3).setCellValue(tempOIT.OfficePhone.get(j).getLongNumber());

tempR.createCell(4).setCellValue(tempOIT.OfficePhone.get(j).getShortNumber());

tempR.createCell(5).setCellValue(tempOIT.OfficePhone.get(j).getMemo());

tempR.createCell(6).setCellType(Cell.CELL_TYPE_BLANK);

}else{

tempR.setHeightInPoints(10.25f);

tempC=tempR.createCell(0);

tempC.setCellType(Cell.CELL_TYPE_BLANK);

tempR.createCell(1).setCellType(Cell.CELL_TYPE_BLANK);

tempR.createCell(2).setCellType(Cell.CELL_TYPE_BLANK);

tempR.createCell(3).setCellValue(tempOIT.OfficePhone.get(j).getLongNumber());

tempR.createCell(4).setCellValue(tempOIT.OfficePhone.get(j).getShortNumber());

tempR.createCell(5).setCellValue(tempOIT.OfficePhone.get(j).getMemo());

tempR.createCell(6).setCellType(Cell.CELL_TYPE_BLANK);

}

for(Cell c:tempR){//应用样式

c.setCellStyle(tempH.get(RowType.DEPARTMENT).get(c.getColumnIndex()));

}

}

tempST.addMergedRegion(new CellRangeAddress(rc-tempOIT.OfficePhone.size(), rc-1,1,2));//合并单元格

//tempST.addMergedRegion(new CellRangeAddress(rc-tempOIT.OfficePhone.size(), rc-1,2,2));

//tempST.addMergedRegion(new CellRangeAddress(rc-tempOIT.OfficePhone.size(), rc-1,5,5));

tempST.addMergedRegion(new CellRangeAddress(rc-tempOIT.OfficePhone.size(), rc-1,5,6));

}else{

tempR=tempST.createRow(rc++);//新建一行

// float tempLHSL=(tempLC==1)?14.25f:13f*tempLC;

tempR.setHeightInPoints(tempOIT.OfficePhone.get(0).getMemo().length()==0?14.25f:25f);

tempC=tempR.createCell(0);

tempC.setCellType(Cell.CELL_TYPE_BLANK);

tempR.createCell(1).setCellValue(this.generateName(tempOIT.getName()));

tempR.createCell(2).setCellType(Cell.CELL_TYPE_BLANK);

tempR.createCell(3).setCellValue(tempOIT.OfficePhone.get(0).getLongNumber());

tempR.createCell(4).setCellValue(tempOIT.OfficePhone.get(0).getShortNumber());

tempR.createCell(5).setCellValue(tempOIT.OfficePhone.get(0).getMemo());

tempR.createCell(6).setCellType(Cell.CELL_TYPE_BLANK);

for(Cell c:tempR){//应用样式

c.setCellStyle(tempH.get(RowType.DEPARTMENT).get(c.getColumnIndex()));

}

tempST.addMergedRegion(new CellRangeAddress(rc-1, rc-1,1,2));

tempST.addMergedRegion(new CellRangeAddress(rc-1, rc-1,5,6));

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。