click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r931720 - /click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java
Date Wed, 07 Apr 2010 23:22:38 GMT
Author: sabob
Date: Wed Apr  7 23:22:38 2010
New Revision: 931720

URL: http://svn.apache.org/viewvc?rev=931720&view=rev
Log:
use non-deprecated methods

Modified:
    click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java

Modified: click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java
URL: http://svn.apache.org/viewvc/click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java?rev=931720&r1=931719&r2=931720&view=diff
==============================================================================
--- click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java
(original)
+++ click/trunk/click/examples/src/org/apache/click/examples/page/general/ExcelExportPage.java
Wed Apr  7 23:22:38 2010
@@ -125,22 +125,22 @@ public class ExcelExportPage extends Bor
         font.setBoldweight(HSSFFont.BOLDWEIGHT_BOLD);
 
         HSSFSheet worksheet = wb.createSheet("Customers");
-        worksheet.setColumnWidth((short) 0, (short)(20 * 256));
-        worksheet.setColumnWidth((short) 1, (short)(30 * 256));
-        worksheet.setColumnWidth((short) 4, (short)(20 * 256));
+        worksheet.setColumnWidth(0, (20 * 256));
+        worksheet.setColumnWidth(1, (30 * 256));
+        worksheet.setColumnWidth(4, (20 * 256));
 
-        HSSFRow row = worksheet.createRow((short)0);
+        HSSFRow row = worksheet.createRow(0);
 
         HSSFRichTextString value = new HSSFRichTextString("Customers");
         value.applyFont(font);
-        row.createCell((short)0).setCellValue(value);
+        row.createCell(0).setCellValue(value);
 
-        row = worksheet.createRow((short)1);
-        row.createCell((short)0).setCellValue(new HSSFRichTextString("Customer Account Details"));
+        row = worksheet.createRow(1);
+        row.createCell(0).setCellValue(new HSSFRichTextString("Customer Account Details"));
 
-        worksheet.createRow((short)2);
+        worksheet.createRow(2);
 
-        row = worksheet.createRow((short)3);
+        row = worksheet.createRow(3);
 
         HSSFCellStyle style = wb.createCellStyle();
         style.setBorderBottom(HSSFCellStyle.BORDER_THIN);
@@ -149,31 +149,31 @@ public class ExcelExportPage extends Bor
 
         value = new HSSFRichTextString("Name");
         value.applyFont(font);
-        HSSFCell cell = row.createCell((short)0);
+        HSSFCell cell = row.createCell(0);
         cell.setCellValue(value);
         cell.setCellStyle(style);
 
         value = new HSSFRichTextString("Email");
         value.applyFont(font);
-        cell = row.createCell((short)1);
+        cell = row.createCell(1);
         cell.setCellValue(value);
         cell.setCellStyle(style);
 
         value = new HSSFRichTextString("Age");
         value.applyFont(font);
-        cell = row.createCell((short)2);
+        cell = row.createCell(2);
         cell.setCellValue(value);
         cell.setCellStyle(style);
 
         value = new HSSFRichTextString("Holdings");
         value.applyFont(font);
-        cell = row.createCell((short)3);
+        cell = row.createCell(3);
         cell.setCellValue(value);
         cell.setCellStyle(style);
 
         value = new HSSFRichTextString("Investments");
         value.applyFont(font);
-        cell = row.createCell((short)4);
+        cell = row.createCell(4);
         cell.setCellValue(value);
         cell.setCellStyle(style);
 
@@ -183,20 +183,20 @@ public class ExcelExportPage extends Bor
         for (int i = 0; i < customers.size(); i++) {
             Customer customer = (Customer) customers.get(i);
 
-            row = worksheet.createRow((short) rowIndex++);
+            row = worksheet.createRow(rowIndex++);
 
-            row.createCell((short) 0).setCellValue(new HSSFRichTextString(customer.getName()));
-            row.createCell((short) 1).setCellValue(new HSSFRichTextString(customer.getEmail()));
+            row.createCell(0).setCellValue(new HSSFRichTextString(customer.getName()));
+            row.createCell(1).setCellValue(new HSSFRichTextString(customer.getEmail()));
 
             if (customer.getAge() != null) {
-                row.createCell((short) 2).setCellValue(customer.getAge().intValue());
+                row.createCell(2).setCellValue(customer.getAge().intValue());
             }
 
             if (customer.getHoldings() != null) {
-                row.createCell((short) 3).setCellValue(customer.getHoldings().doubleValue());
+                row.createCell(3).setCellValue(customer.getHoldings().doubleValue());
             }
 
-            row.createCell((short) 4).setCellValue(new HSSFRichTextString(customer.getInvestments()));
+            row.createCell(4).setCellValue(new HSSFRichTextString(customer.getInvestments()));
         }
 
         return wb;



Mime
View raw message