[seam-commits] Seam SVN: r8556 - in trunk/src/excel/org/jboss/seam/excel: csv and 3 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sun Aug 3 13:20:27 EDT 2008


Author: danielc.roth
Date: 2008-08-03 13:20:27 -0400 (Sun, 03 Aug 2008)
New Revision: 8556

Modified:
   trunk/src/excel/org/jboss/seam/excel/Command.java
   trunk/src/excel/org/jboss/seam/excel/ExcelFactory.java
   trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java
   trunk/src/excel/org/jboss/seam/excel/Template.java
   trunk/src/excel/org/jboss/seam/excel/Validation.java
   trunk/src/excel/org/jboss/seam/excel/WorksheetItem.java
   trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java
   trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelFactory.java
   trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
   trunk/src/excel/org/jboss/seam/excel/jxl/JXLTemplates.java
   trunk/src/excel/org/jboss/seam/excel/jxl/exporter/ExcelExporter.java
   trunk/src/excel/org/jboss/seam/excel/jxl/exporter/StyleParser.java
   trunk/src/excel/org/jboss/seam/excel/package-info.java
   trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIBackground.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIBorder.java
   trunk/src/excel/org/jboss/seam/excel/ui/UICell.java
   trunk/src/excel/org/jboss/seam/excel/ui/UICellFormat.java
   trunk/src/excel/org/jboss/seam/excel/ui/UICellTemplate.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIExcelExport.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIFont.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIFormula.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIGroupColumns.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIGroupRows.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooter.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommand.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommands.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIHyperlink.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIListValidation.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIListValidationItem.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIMergeCells.java
   trunk/src/excel/org/jboss/seam/excel/ui/UINumericValidation.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIPrintArea.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIRangeValidation.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIRowPageBreak.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetSettings.java
   trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetTemplate.java
Log:
Minor to conform with the Seam coding style. Fixed som javadoc errors.

Modified: trunk/src/excel/org/jboss/seam/excel/Command.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/Command.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/Command.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -2,9 +2,10 @@
 
 public interface Command
 {
-   public enum CommandType {
+   public enum CommandType
+   {
       merge_cells, add_row_pagebreak, group_rows, group_columns
    }
-   
+
    public abstract CommandType getCommandType();
 }

Modified: trunk/src/excel/org/jboss/seam/excel/ExcelFactory.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ExcelFactory.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ExcelFactory.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -6,8 +6,6 @@
 import org.jboss.seam.annotations.Name;
 import org.jboss.seam.annotations.Scope;
 import org.jboss.seam.core.Interpolator;
-import org.jboss.seam.excel.ExcelWorkbook;
-import org.jboss.seam.excel.ExcelWorkbookException;
 
 @Name("org.jboss.seam.excel.excelFactory")
 @Scope(ScopeType.STATELESS)
@@ -37,8 +35,7 @@
       ExcelWorkbook excelWorkbook = (ExcelWorkbook) Component.getInstance(namespace + "." + impl);
       if (excelWorkbook == null)
       {
-         throw new ExcelWorkbookException(Interpolator.instance().interpolate(
-               "Could not create excel workbook with namespace '#0' and type #1", namespace, type));
+         throw new ExcelWorkbookException(Interpolator.instance().interpolate("Could not create excel workbook with namespace '#0' and type #1", namespace, type));
       }
       return excelWorkbook;
 

Modified: trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ExcelWorkbook.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -1,7 +1,5 @@
 package org.jboss.seam.excel;
 
-import java.io.IOException;
-
 import org.jboss.seam.excel.DocumentData.DocumentType;
 import org.jboss.seam.excel.ui.UIColumn;
 import org.jboss.seam.excel.ui.UIWorkbook;
@@ -30,10 +28,11 @@
    public abstract void nextColumn();
 
    /**
-    * Creates a new worksheet in the workbook (or selects one if it exists). Will require a rework for
-    * auto-renaming when support for auto-adding of new worksheets if there are more than 65k rows.
+    * Creates a new worksheet in the workbook (or selects one if it exists).
+    * Will require a rework for auto-renaming when support for auto-adding of
+    * new worksheets if there are more than 65k rows.
     * 
-    * @param worksheetName The name of the workbook or create or select
+    * @param uiWorksheet Worksheet to create or select
     * @since 0.1
     */
    public abstract void createOrSelectWorksheet(UIWorksheet uiWorksheet);
@@ -42,7 +41,6 @@
     * Returns the binary data from the internal representation of the workbook
     * 
     * @return the bytes
-    * @throws IOException
     * @since 0.1
     */
    public abstract byte[] getBytes();
@@ -75,11 +73,11 @@
     * @param template The template to add
     */
    public abstract void addTemplate(Template template);
-  
+
    /**
     * Executes a command for a worksheet
     * 
     * @param command The command to execute
     */
    public abstract void executeCommand(Command command);
-   }
\ No newline at end of file
+}
\ No newline at end of file

Modified: trunk/src/excel/org/jboss/seam/excel/Template.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/Template.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/Template.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -2,11 +2,13 @@
 
 public interface Template
 {
-   public enum TemplateType {
+   public enum TemplateType
+   {
       cell, worksheet
    }
-   
+
    public abstract TemplateType getType();
+
    public abstract String getName();
-   
+
 }

Modified: trunk/src/excel/org/jboss/seam/excel/Validation.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/Validation.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/Validation.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -2,9 +2,10 @@
 
 public interface Validation
 {
-   public enum ValidationType {
+   public enum ValidationType
+   {
       numeric, range, list
    }
-   
+
    public abstract ValidationType getType();
 }

Modified: trunk/src/excel/org/jboss/seam/excel/WorksheetItem.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/WorksheetItem.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/WorksheetItem.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -2,11 +2,12 @@
 
 public interface WorksheetItem
 {
-   
-   public enum ItemType {
+
+   public enum ItemType
+   {
       cell, image, hyperlink
    }
-   
+
    public abstract ItemType getItemType();
-   
+
 }

Modified: trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/csv/CsvExcelWorkbook.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -53,8 +53,8 @@
    {
       createOrSelectWorksheet(uiWorksheet.getName(), uiWorksheet.getStartRow(), uiWorksheet.getStartColumn());
 
-   }   
-   
+   }
+
    public void createOrSelectWorksheet(String worksheetName, Integer startRow, Integer startColumn)
    {
       column = 0;

Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelFactory.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelFactory.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelFactory.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -95,7 +95,7 @@
     * Creates a JExcelAPI Workbook settings object from the UI counterpart.
     * Starts with an empty object and adds the setting only if it is non-null
     * 
-    * @param uiWorkbookSettings The UI element to interpret
+    * @param uiWorkbook The UI element to interpret
     * @return The created workbook settings
     */
    public static WorkbookSettings createWorkbookSettings(UIWorkbook uiWorkbook)
@@ -579,7 +579,8 @@
     * @param data The contents of the cell
     * @param cellFormat The cell format settings of the cell
     * @return The prepared cell representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/WritableCell.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/WritableCell.html">WritableCell</a>
     * @since 0.1
     */
    public static WritableCell createCell(int column, int row, CellType type, Object data, WritableCellFormat cellFormat)
@@ -614,7 +615,8 @@
     * @param templateFont The font to use as a template
     * @return The font representation
     * @throws WriteException If there is an error creating the font
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/WritableFont.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/WritableFont.html">WritableFont</a>
     * @since 0.1
     */
    private static WritableFont createFont(UIFont uiFont, Font templateFont) throws WriteException
@@ -625,11 +627,16 @@
       }
       WritableFont font = null;
 
-      if (uiFont.getName() != null) {
+      if (uiFont.getName() != null)
+      {
          font = new WritableFont(WritableFont.createFont(uiFont.getName()));
-      } else if (templateFont != null) {
+      }
+      else if (templateFont != null)
+      {
          font = new WritableFont(templateFont);
-      } else {
+      }
+      else
+      {
          font = new WritableFont(WritableFont.ARIAL);
       }
 
@@ -669,7 +676,8 @@
     * 
     * @param mask The requested mask
     * @return The mask representation or null if the mask couldn't be created
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/NumberFormats.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/NumberFormats.html">NumberFormats</a>
     * @since 0.1
     */
    private static DisplayFormat createNumberFormat(String mask)
@@ -693,7 +701,8 @@
     * 
     * @param mask The requested mask
     * @return The mask representation or null if the mask couldn't be created
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/DateFormats.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/write/DateFormats.html">DateFormats</a>
     * @since 0.1
     */
    private static DisplayFormat createDateFormat(String mask)
@@ -717,7 +726,8 @@
     * 
     * @param mask The requested alignment
     * @return The alignment representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/VerticalAlignment.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/VerticalAlignment.html">VerticalAlignment</a>
     * @since 0.1
     */
    private static VerticalAlignment createVerticalAlignment(String verticalAlignment)
@@ -742,7 +752,8 @@
     * 
     * @param mask The requested orientation
     * @return The orientation representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Orientation.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Orientation.html">Orientation</a>
     * @since 0.1
     */
    private static Orientation createOrientation(String orientation)
@@ -767,7 +778,8 @@
     * 
     * @param mask The requested alignment
     * @return The alignment representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Alignment.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Alignment.html">Alignment</a>
     * @since 0.1
     */
    private static Alignment createAlignment(String alignment)
@@ -792,7 +804,8 @@
     * 
     * @param mask The requested pattern
     * @return The pattern representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Pattern.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Pattern.html">Pattern</a>
     * @since 0.1
     */
    private static Pattern createPattern(String pattern)
@@ -817,7 +830,8 @@
     * 
     * @param mask The requested border line style
     * @return The border line style representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/BorderlineStyle.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/BorderlineStyle.html">BorderlineStyle</a>
     * @since 0.1
     */
    private static BorderLineStyle createBorderLineStyle(String borderLineStyle)
@@ -842,7 +856,8 @@
     * 
     * @param mask The requested border
     * @return The border representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Border.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Border.html"></a>
     * @since 0.1
     */
    private static Border createBorder(String border)
@@ -867,7 +882,8 @@
     * 
     * @param mask The requested underline style
     * @return The underline style representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/UnderlineStyle.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/UnderlineStyle.html">UnderlineStyle</a>
     * @since 0.1
     */
    private static UnderlineStyle createUnderlineStyle(String underlineStyle)
@@ -892,7 +908,8 @@
     * 
     * @param mask The requested script style
     * @return The script style representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/ScriptStyle.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/ScriptStyle.html">ScriptStyle</a>
     * @since 0.1
     */
    private static ScriptStyle createScriptStyle(String scriptStyle)
@@ -917,7 +934,8 @@
     * 
     * @param mask The requested color
     * @return The color representation
-    * @see http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Colour.html
+    * @see <a
+    *      href="http://jexcelapi.sourceforge.net/resources/javadocs/2_6/docs/jxl/format/Colour.html">Colour</a>
     * @since 0.1
     */
    private static Colour createColor(String color)
@@ -926,8 +944,10 @@
       {
          log.trace("Creating color for #0", color);
       }
-      // Workaround for the feature that black is... well not always black in Excel (ref: Andy Khan on yahoo groups)
-      if (color.equalsIgnoreCase("black")) {
+      // Workaround for the feature that black is... well not always black in
+      // Excel (ref: Andy Khan on yahoo groups)
+      if (color.equalsIgnoreCase("black"))
+      {
          color = "palette_black";
       }
       try

Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLExcelWorkbook.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -194,7 +194,7 @@
     * new worksheets if there are more than 65k rows. Resets the internal state
     * (row- and column indexes, current styles etc)
     * 
-    * @param worksheetName The name of the workbook. Defaults to Sheet# if null
+    * @param uiWorksheet The worksheet to create or select in the workbook
     * @since 0.1
     */
    public void createOrSelectWorksheet(UIWorksheet uiWorksheet)
@@ -254,14 +254,17 @@
       }
 
       Object value = uiCell.getValue();
-      // If value is null, just increment row counter (not for explicitly placed single cells) and return;
-      if (value == null) {
-    	  if (uiCell.getColumn() == null && uiCell.getRow() == null) {
-    		  nextRow();
-    	  }
-    	  return;
+      // If value is null, just increment row counter (not for explicitly placed
+      // single cells) and return;
+      if (value == null)
+      {
+         if (uiCell.getColumn() == null && uiCell.getRow() == null)
+         {
+            nextRow();
+         }
+         return;
       }
-      
+
       // Determine where to really place the cell
       int useRow = uiCell.getRow() != null ? uiCell.getRow() : currentRowIndex;
       int useColumn = uiCell.getColumn() != null ? uiCell.getColumn() : currentColumnIndex;
@@ -291,7 +294,6 @@
     * Returns the binary data from the internal representation of the workbook
     * 
     * @return the data
-    * @throws IOException If there is an IOException writing the workbook
     * @throws ExcelWorkbookException If there is a problem producing the binary
     *            data
     */
@@ -337,7 +339,7 @@
     * API has different constructors for all permutations of workbook settings
     * and template usage
     * 
-    * @param Workbook settings (if any) to apply when creating the workbook
+    * @param uiWorkbook UIn Workbook to create
     * @throws ExcelWorkbookException if there were any errors creating the
     *            workbook
     * @since 0.1
@@ -671,5 +673,5 @@
          throw new ExcelWorkbookException("Couldn't merge cells", e);
       }
    }
-   
+
 }

Modified: trunk/src/excel/org/jboss/seam/excel/jxl/JXLTemplates.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/JXLTemplates.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/JXLTemplates.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -51,6 +51,7 @@
    private Map<String, WritableCellFormat> cellFormatCache = new HashMap<String, WritableCellFormat>();
 
    // A cache for cell features, mapped by UIComponent ID
+   @SuppressWarnings("unused")
    private Map<String, WritableCellFeatures> cellFeaturesCache = new HashMap<String, WritableCellFeatures>();
 
    /**

Modified: trunk/src/excel/org/jboss/seam/excel/jxl/exporter/ExcelExporter.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/exporter/ExcelExporter.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/exporter/ExcelExporter.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -34,7 +34,7 @@
  * Excel export class that exports a UIData component to an Excel workbook
  * 
  * @author Nicklas Karlsson (nickarls at gmail.com)
- *
+ * 
  */
 @Name("org.jboss.seam.excel.excelExporter")
 @Scope(ScopeType.EVENT)
@@ -43,12 +43,12 @@
 {
    // The excel workbook implementation
    private ExcelWorkbook excelWorkbook = null;
-   
+
    private List<Integer> columnWidths = new ArrayList<Integer>();
 
    /**
-    * Exports the UIData object to Excel workbook. Looks up the component, parse the templates, iterates the 
-    * columns and the UIOutput elements within
+    * Exports the UIData object to Excel workbook. Looks up the component, parse
+    * the templates, iterates the columns and the UIOutput elements within
     * 
     * @param dataTableId
     */
@@ -73,7 +73,8 @@
       String styleString = StyleParser.getComponentStyle(dataTable);
       Map<String, Map<String, String>> templateMap = StyleParser.getTemplateMap(styleString);
       List<Template> templates = StyleParser.getTemplates(templateMap);
-      for (Template template : templates) {
+      for (Template template : templates)
+      {
          excelWorkbook.addTemplate(template);
       }
       columnWidths = StyleParser.parseColumnWidths(templateMap.get(StyleParser.TEMPLATE_GLOBAL));
@@ -135,7 +136,7 @@
     * @param column The column to parse
     * @param iterator The iterator to the data
     * @param var The binding var
-    * @param col 
+    * @param col
     */
    @SuppressWarnings("unchecked")
    private void processColumn(javax.faces.component.UIColumn column, Iterator iterator, String var, int col)
@@ -156,17 +157,19 @@
          List<UIOutput> dataOutputs = ExcelComponent.getChildrenOfType(column.getChildren(), UIOutput.class);
          processOutputs(dataOutputs, "global,data");
       }
-      
-      if (columnWidths.size() > col) {
+
+      if (columnWidths.size() > col)
+      {
          Integer columnWidth = columnWidths.get(col);
-         if (columnWidth != null) {
+         if (columnWidth != null)
+         {
             UIColumn uiColumn = new UIColumn(columnWidth);
             excelWorkbook.applyColumnSettings(uiColumn);
          }
       }
-      
+
    }
-   
+
    /**
     * Processes all output type elements (in column)
     * 
@@ -190,7 +193,8 @@
          String outputStyle = StyleParser.getComponentStyle(output);
 
          Map<String, String> globalTemplate = StyleParser.getTemplateMap(outputStyle).get(StyleParser.TEMPLATE_GLOBAL);
-         if (globalTemplate != null) {
+         if (globalTemplate != null)
+         {
             localTemplates = globalTemplate.get(StyleParser.LOCAL_TEMPLATE_STYLE);
          }
          if (localTemplates != null)

Modified: trunk/src/excel/org/jboss/seam/excel/jxl/exporter/StyleParser.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/jxl/exporter/StyleParser.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/jxl/exporter/StyleParser.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -18,8 +18,8 @@
 import org.jboss.seam.excel.ui.UIFont;
 
 /**
- * A helper class for parsing excel-specific xls* style attributes and converting them
- * to seam excel format
+ * A helper class for parsing excel-specific xls* style attributes and
+ * converting them to seam excel format
  * 
  * @author Nicklas Karlsson (nickarls at gmail.com)
  */
@@ -44,11 +44,11 @@
    private static final String FONT_SCRIPT_STYLE = "xlsFontScriptStyle";
    private static final String FONT_STRUCKOUT = "xlsFontStruckOut";
    private static final String FONT_UNDERLINE_STYLE = "xlsFontUnderlineStyle";
-   
+
    // Background attributes
    private static final String BACKGROUND_COLOR = "xlsBackgroundColor";
    private static final String BACKGROUND_PATTERN = "xlsBackgroundPattern";
-   
+
    // Border attributes
    private static final String BORDER_COLOR = "xlsBorderColor";
    private static final String BORDER_COLOR_LEFT = "xlsBorderColorLeft";
@@ -68,22 +68,21 @@
    private static final String BORDER_RIGHT_POSTFIX = "Right";
    private static final String BORDER_BOTTOM_POSTFIX = "Bottom";
    private static final String BORDER_ALL_POSTFIX = null;
-   
+
    // Cell attributes
    private static final String ALIGNMENT = "xlsAlignment";
 
    // Column attributes
    private static final String COLUMN_WIDTH = "xlsColumnWidths";
 
-   
-
    /**
     * Gets the style-string from a UIComponent
     * 
     * @param uiComponent The component to examine
     * @return The string or null if attribute wasn't present
     */
-   public static String getComponentStyle(UIComponent uiComponent) {
+   public static String getComponentStyle(UIComponent uiComponent)
+   {
       try
       {
          return (String) PropertyUtils.getSimpleProperty(uiComponent, STYLE_ATTRIBUTE);
@@ -93,22 +92,23 @@
          return null;
       }
    }
-   
+
    /**
-    * Parses a style string and returns a map keyed with template name. The contents is a map
-    * with key->value pairs from the style string. The template name is determined from the 
-    * key.temaplate:value form
-    *  
+    * Parses a style string and returns a map keyed with template name. The
+    * contents is a map with key->value pairs from the style string. The
+    * template name is determined from the key.temaplate:value form
+    * 
     * @param styleString The style string to parse
     * @return The Map of style attribute maps
     */
    public static Map<String, Map<String, String>> getTemplateMap(String styleString)
    {
       Map<String, Map<String, String>> templateMap = new HashMap<String, Map<String, String>>();
-      if (styleString == null) {
+      if (styleString == null)
+      {
          return templateMap;
       }
-      
+
       // Split up the style in components
       String[] styleStringParts = styleString.split(STYLE_SEPARATOR);
       for (String styleStringPart : styleStringParts)
@@ -162,41 +162,45 @@
       innerMap.put(key.trim(), value.trim());
       templateMap.put(template.trim(), innerMap);
    }
-   
+
    /**
     * Gets column settings from a style string
     * 
     * @param styleString The string to parse
     * @return The column settings
     */
-   public static UIColumn getColumnSettings(String styleString) {
+   public static UIColumn getColumnSettings(String styleString)
+   {
       UIColumn uiColumn = new UIColumn();
-      
+
       Map<String, String> globalTemplate = getTemplateMap(styleString).get(TEMPLATE_GLOBAL);
-      if (globalTemplate == null) {
+      if (globalTemplate == null)
+      {
          return uiColumn;
       }
-      if (globalTemplate.get(COLUMN_WIDTH) != null) {
+      if (globalTemplate.get(COLUMN_WIDTH) != null)
+      {
          uiColumn.setWidth(Integer.parseInt(globalTemplate.get(COLUMN_WIDTH)));
       }
-      
+
       return uiColumn;
    }
 
    /**
     * Get a CellTemplate Template list from a string
     * 
-    * @param styleString The string to parse
+    * @param templateMap Map with templates
     * @return The template list
     */
    public static List<Template> getTemplates(Map<String, Map<String, String>> templateMap)
    {
       List<Template> templates = new ArrayList<Template>();
-      
-      if (templateMap == null) {
+
+      if (templateMap == null)
+      {
          return templates;
       }
-      
+
       // Flat the map out into named templates
       for (Map.Entry<String, Map<String, String>> template : templateMap.entrySet())
       {
@@ -214,11 +218,13 @@
          {
             cellTemplate.getChildren().add(getBackgroundStyle(templateData));
          }
-         if (hasBorders(templateData)) {
-        	 List<UIComponent> borders = getBorders(templateData);
-        	 for (UIComponent border : borders) {
-        		 cellTemplate.getChildren().add(border);
-        	 }
+         if (hasBorders(templateData))
+         {
+            List<UIComponent> borders = getBorders(templateData);
+            for (UIComponent border : borders)
+            {
+               cellTemplate.getChildren().add(border);
+            }
          }
 
          templates.add(cellTemplate);
@@ -242,21 +248,17 @@
 
       return background;
    }
-   
+
    /**
     * Checks if a template contains border data
     * 
     * @param templateData The template map to check
     * @return true if present, otherwise false
     */
-   private static boolean hasBorders(Map<String, String> templateData) {
-	   return templateData.containsKey(BORDER_LINE_STYLE) || templateData.containsKey(BORDER_LINE_STYLE_BOTTOM) ||
-	   templateData.containsKey(BORDER_LINE_STYLE_LEFT) || templateData.containsKey(BORDER_LINE_STYLE_RIGHT) ||
-	   templateData.containsKey(BORDER_LINE_STYLE_TOP) || templateData.containsKey(BORDER_COLOR) || 
-	   templateData.containsKey(BORDER_COLOR_BOTTOM) || templateData.containsKey(BORDER_COLOR_LEFT) || 
-	   templateData.containsKey(BORDER_COLOR_RIGHT) ||
-	   templateData.containsKey(BORDER_COLOR_TOP);
-   }   
+   private static boolean hasBorders(Map<String, String> templateData)
+   {
+      return templateData.containsKey(BORDER_LINE_STYLE) || templateData.containsKey(BORDER_LINE_STYLE_BOTTOM) || templateData.containsKey(BORDER_LINE_STYLE_LEFT) || templateData.containsKey(BORDER_LINE_STYLE_RIGHT) || templateData.containsKey(BORDER_LINE_STYLE_TOP) || templateData.containsKey(BORDER_COLOR) || templateData.containsKey(BORDER_COLOR_BOTTOM) || templateData.containsKey(BORDER_COLOR_LEFT) || templateData.containsKey(BORDER_COLOR_RIGHT) || templateData.containsKey(BORDER_COLOR_TOP);
+   }
 
    /**
     * Checks if a template contains background data
@@ -269,77 +271,99 @@
       return templateData.containsKey(BACKGROUND_COLOR) || templateData.containsKey(BACKGROUND_PATTERN);
    }
 
-   private static void parseBorders(Map<String, String> borderMap, String borderType, List<UIComponent> borders) {
-	   if (borderMap.isEmpty()) {
-		   return;
-	   }
+   private static void parseBorders(Map<String, String> borderMap, String borderType, List<UIComponent> borders)
+   {
+      if (borderMap.isEmpty())
+      {
+         return;
+      }
 
-	   UIBorder border = new UIBorder();
+      UIBorder border = new UIBorder();
 
-	   if (BORDER_ALL_POSTFIX == borderType) {
-		   border.setBorder("all");
-	   } else {
-		   border.setBorder(borderType.toLowerCase());
-	   }
+      if (BORDER_ALL_POSTFIX == borderType)
+      {
+         border.setBorder("all");
+      }
+      else
+      {
+         border.setBorder(borderType.toLowerCase());
+      }
 
-	   if (borderType == null) {
-		   borderType = "";
-	   }
+      if (borderType == null)
+      {
+         borderType = "";
+      }
 
-	   if (borderMap.containsKey(BORDER_COLOR + borderType)) {
-		   border.setColor(borderMap.get(BORDER_COLOR + borderType));
-	   }
-	   
-	   if (borderMap.containsKey(BORDER_LINE_STYLE + borderType)) {
-		   border.setLineStyle(borderMap.get(BORDER_LINE_STYLE + borderType));
-	   } else {
-		   border.setLineStyle("thin");
-	   }
-	   
-	   borders.add(border);
+      if (borderMap.containsKey(BORDER_COLOR + borderType))
+      {
+         border.setColor(borderMap.get(BORDER_COLOR + borderType));
+      }
+
+      if (borderMap.containsKey(BORDER_LINE_STYLE + borderType))
+      {
+         border.setLineStyle(borderMap.get(BORDER_LINE_STYLE + borderType));
+      }
+      else
+      {
+         border.setLineStyle("thin");
+      }
+
+      borders.add(border);
    }
-   
+
    /**
     * Gets a list of border components from the template map
     * 
     * @param templateData The map to inspect
     * @return a list of UIBorder instances
     */
-   private static List<UIComponent> getBorders(Map<String, String> templateData) {
-	   List<UIComponent> borders = new ArrayList<UIComponent>();
-	  
-	   Map<String, String> all = new HashMap<String, String>();
-	   Map<String, String> top = new HashMap<String, String>();
-	   Map<String, String> left = new HashMap<String, String>();
-	   Map<String, String> right = new HashMap<String, String>();
-	   Map<String, String> bottom = new HashMap<String, String>();
-	   
-	   for (Map.Entry<String, String> entry : templateData.entrySet()) {
-		   if (!(entry.getKey().startsWith(BORDER_COLOR_PREFIX) || entry.getKey().startsWith(BORDER_LINE_STYLE_PREFIX))) {
-			   continue;
-		   }
-		   if (entry.getKey().endsWith(BORDER_TOP_POSTFIX)) {
-			   top.put(entry.getKey(), entry.getValue());
-		   } else if (entry.getKey().endsWith(BORDER_LEFT_POSTFIX)) {
-			   left.put(entry.getKey(), entry.getValue());
-		   } else if (entry.getKey().endsWith(BORDER_RIGHT_POSTFIX)) {
-			   right.put(entry.getKey(), entry.getValue());
-		   } else if (entry.getKey().endsWith(BORDER_BOTTOM_POSTFIX)) {
-			   right.put(entry.getKey(), entry.getValue());
-		   } else {
-			   all.put(entry.getKey(), entry.getValue());
-		   }
-	   }
-	   
-	   parseBorders(all, BORDER_ALL_POSTFIX, borders);
-	   parseBorders(left, BORDER_LEFT_POSTFIX, borders);
-	   parseBorders(right, BORDER_RIGHT_POSTFIX, borders);
-	   parseBorders(bottom, BORDER_BOTTOM_POSTFIX, borders);
-	   parseBorders(top, BORDER_TOP_POSTFIX, borders);
-	   
-	   return borders;
-   }  
-   
+   private static List<UIComponent> getBorders(Map<String, String> templateData)
+   {
+      List<UIComponent> borders = new ArrayList<UIComponent>();
+
+      Map<String, String> all = new HashMap<String, String>();
+      Map<String, String> top = new HashMap<String, String>();
+      Map<String, String> left = new HashMap<String, String>();
+      Map<String, String> right = new HashMap<String, String>();
+      Map<String, String> bottom = new HashMap<String, String>();
+
+      for (Map.Entry<String, String> entry : templateData.entrySet())
+      {
+         if (!(entry.getKey().startsWith(BORDER_COLOR_PREFIX) || entry.getKey().startsWith(BORDER_LINE_STYLE_PREFIX)))
+         {
+            continue;
+         }
+         if (entry.getKey().endsWith(BORDER_TOP_POSTFIX))
+         {
+            top.put(entry.getKey(), entry.getValue());
+         }
+         else if (entry.getKey().endsWith(BORDER_LEFT_POSTFIX))
+         {
+            left.put(entry.getKey(), entry.getValue());
+         }
+         else if (entry.getKey().endsWith(BORDER_RIGHT_POSTFIX))
+         {
+            right.put(entry.getKey(), entry.getValue());
+         }
+         else if (entry.getKey().endsWith(BORDER_BOTTOM_POSTFIX))
+         {
+            right.put(entry.getKey(), entry.getValue());
+         }
+         else
+         {
+            all.put(entry.getKey(), entry.getValue());
+         }
+      }
+
+      parseBorders(all, BORDER_ALL_POSTFIX, borders);
+      parseBorders(left, BORDER_LEFT_POSTFIX, borders);
+      parseBorders(right, BORDER_RIGHT_POSTFIX, borders);
+      parseBorders(bottom, BORDER_BOTTOM_POSTFIX, borders);
+      parseBorders(top, BORDER_TOP_POSTFIX, borders);
+
+      return borders;
+   }
+
    /**
     * Gets font description from template map
     * 
@@ -382,34 +406,37 @@
     */
    private static boolean hasFontStyle(Map<String, String> templateData)
    {
-      return templateData.containsKey(FONT_NAME) || templateData.containsKey(FONT_SIZE) || 
-      templateData.containsKey(FONT_COLOR) || templateData.containsKey(FONT_BOLD) || 
-      templateData.containsKey(FONT_ITALIC) || templateData.containsKey(FONT_SCRIPT_STYLE) || 
-      templateData.containsKey(FONT_STRUCKOUT) || templateData.containsKey(FONT_UNDERLINE_STYLE);
+      return templateData.containsKey(FONT_NAME) || templateData.containsKey(FONT_SIZE) || templateData.containsKey(FONT_COLOR) || templateData.containsKey(FONT_BOLD) || templateData.containsKey(FONT_ITALIC) || templateData.containsKey(FONT_SCRIPT_STYLE) || templateData.containsKey(FONT_STRUCKOUT) || templateData.containsKey(FONT_UNDERLINE_STYLE);
    }
 
    protected static List<Integer> parseColumnWidths(Map<String, String> globalTemplate)
    {
       List<Integer> columnWidths = new ArrayList<Integer>();
-      
-      if (globalTemplate == null) {
+
+      if (globalTemplate == null)
+      {
          return columnWidths;
       }
-      
-      if (!globalTemplate.containsKey(COLUMN_WIDTH)) {
+
+      if (!globalTemplate.containsKey(COLUMN_WIDTH))
+      {
          return columnWidths;
       }
-      
+
       String columnWidthString = globalTemplate.get(COLUMN_WIDTH);
       String columnWidthParts[] = columnWidthString.split(COLUMN_WIDTH_SEPARATOR);
-      for (String columnWidthPart : columnWidthParts) {
-         try {
+      for (String columnWidthPart : columnWidthParts)
+      {
+         try
+         {
             columnWidths.add(Integer.parseInt(columnWidthPart));
-         } catch (NumberFormatException e) {
+         }
+         catch (NumberFormatException e)
+         {
             columnWidths.add(null);
          }
       }
       return columnWidths;
    }
-   
+
 }

Modified: trunk/src/excel/org/jboss/seam/excel/package-info.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/package-info.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/package-info.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -1,10 +1,5 @@
- at Namespace(value="http://jboss.com/products/seam/excel",prefix="org.jboss.seam.excel")
+ at Namespace(value = "http://jboss.com/products/seam/excel", prefix = "org.jboss.seam.excel")
 package org.jboss.seam.excel;
 
 import org.jboss.seam.annotations.Namespace;
 
-
-
-
-
-

Modified: trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/ExcelComponent.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -7,7 +7,6 @@
 import javax.faces.component.UIComponentBase;
 import javax.faces.context.FacesContext;
 
-import org.jboss.seam.core.Interpolator;
 import org.jboss.seam.excel.Command;
 import org.jboss.seam.excel.ExcelWorkbook;
 import org.jboss.seam.excel.Template;
@@ -25,10 +24,11 @@
 {
    public final static String HEADER_FACET = "header";
 
-   public ExcelComponent() {
+   public ExcelComponent()
+   {
       super();
    }
-   
+
    /**
     * Helper class that returns all children of a certain type (implements
     * interface)
@@ -51,14 +51,15 @@
       }
       return matches;
    }
-   
+
    /**
     * Returns all commands from a child list
     * 
     * @param children The list to search
     * @return The commands
     */
-   protected static List<Command> getCommands(List<UIComponent> children) {
+   protected static List<Command> getCommands(List<UIComponent> children)
+   {
       return getChildrenOfType(children, Command.class);
    }
 

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIBackground.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIBackground.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIBackground.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -27,6 +27,7 @@
       this.pattern = pattern;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIBorder.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIBorder.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIBorder.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -38,6 +38,7 @@
       this.color = color;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UICell.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UICell.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UICell.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -20,7 +20,7 @@
    private Integer column;
    private Integer row;
    private String templates;
-   
+
    public String getTemplates()
    {
       return (String) valueOf("templates", templates);
@@ -71,30 +71,32 @@
       this.forceType = forceType;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;
    }
 
    /**
-    * Checks the data type of the contents to determine what kind of cell to create
+    * Checks the data type of the contents to determine what kind of cell to
+    * create
     * 
     * @return the data type of the cell (or forumula if this is such a subclass)
     */
    public CellType getDataType()
    {
-	   // FIXME: Consider if formula should be considered an item instead as a subtype of formula
-	   if (this instanceof UIFormula) {
-		   return CellType.formula;
-	   }
+      // FIXME: Consider if formula should be considered an item instead as a
+      // subtype of formula
+      if (this instanceof UIFormula)
+      {
+         return CellType.formula;
+      }
       if (forceType != null)
       {
          return forceType;
       }
       Object value = getValue();
-      if (value instanceof Integer || value instanceof Long || value instanceof Double || 
-          value instanceof Short || value instanceof BigDecimal || value instanceof BigInteger ||
-          value instanceof Byte || value instanceof Float)
+      if (value instanceof Integer || value instanceof Long || value instanceof Double || value instanceof Short || value instanceof BigDecimal || value instanceof BigInteger || value instanceof Byte || value instanceof Float)
       {
          return CellType.number;
       }

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UICellFormat.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UICellFormat.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UICellFormat.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -1,6 +1,5 @@
 package org.jboss.seam.excel.ui;
 
-
 public abstract class UICellFormat extends ExcelComponent
 {
    private String alignment;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UICellTemplate.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UICellTemplate.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UICellTemplate.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -7,7 +7,7 @@
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UICellTemplate";
 
    private String name;
-   
+
    public String getName()
    {
       return (String) valueOf("name", name);
@@ -18,9 +18,10 @@
       this.name = name;
    }
 
+   @Override
    public String getFamily()
    {
-      return COMPONENT_TYPE; 
+      return COMPONENT_TYPE;
    }
 
    public TemplateType getType()

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIExcelExport.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIExcelExport.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIExcelExport.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -9,12 +9,9 @@
 import org.jboss.seam.core.Interpolator;
 import org.jboss.seam.excel.ExcelWorkbookException;
 import org.jboss.seam.excel.jxl.exporter.ExcelExporter;
-import org.jboss.seam.log.Log;
-import org.jboss.seam.log.Logging;
 
 public class UIExcelExport extends ExcelComponent
 {
-   private Log log = Logging.getLog(getClass());
 
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIExcelExport";
 
@@ -47,16 +44,19 @@
    public void encodeBegin(javax.faces.context.FacesContext arg0) throws IOException
    {
       UIData dataTable = (UIData) getParentByClass(getParent(), UIData.class);
-      if (dataTable == null) {
-         if (getForDataTable() == null) {
+      if (dataTable == null)
+      {
+         if (getForDataTable() == null)
+         {
             throw new ExcelWorkbookException("Must define forDataTable attribute if tag is not nested within a datatable");
          }
          dataTable = (HtmlDataTable) FacesContext.getCurrentInstance().getViewRoot().findComponent(getForDataTable());
-         if (dataTable == null) {
+         if (dataTable == null)
+         {
             throw new ExcelWorkbookException(Interpolator.instance().interpolate("Could not find data table with id #0", getForDataTable()));
          }
       }
-//      exporter.export(dataTable.getId());
+      exporter.export(dataTable.getId());
    }
 
    @Override

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIFont.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIFont.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIFont.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -97,6 +97,7 @@
       this.underlineStyle = underlineStyle;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIFormula.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIFormula.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIFormula.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -1,6 +1,5 @@
 package org.jboss.seam.excel.ui;
 
-
 public class UIFormula extends UICell
 {
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIFormula";

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIGroupColumns.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIGroupColumns.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIGroupColumns.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -9,7 +9,7 @@
    private Integer startColumn;
    private Integer endColumn;
    private Boolean collapse;
-   
+
    public Boolean getCollapse()
    {
       return (Boolean) valueOf("collapse", collapse);
@@ -40,6 +40,7 @@
       this.endColumn = endColumn;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIGroupRows.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIGroupRows.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIGroupRows.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -9,7 +9,7 @@
    private Integer startRow;
    private Integer endRow;
    private Boolean collapse;
-   
+
    public Boolean getCollapse()
    {
       return (Boolean) valueOf("collapse", collapse);
@@ -19,7 +19,7 @@
    {
       this.collapse = collapse;
    }
-   
+
    public Integer getStartRow()
    {
       return (Integer) valueOf("startRow", startRow);
@@ -40,6 +40,7 @@
       this.endRow = endRow;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooter.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooter.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooter.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -25,6 +25,7 @@
       this.type = type;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommand.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommand.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommand.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -32,6 +32,7 @@
       this.parameter = parameter;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommands.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommands.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIHeaderFooterCommands.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -4,6 +4,7 @@
 {
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIHeaderFooterCommands";
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIHyperlink.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIHyperlink.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIHyperlink.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -5,7 +5,7 @@
 public class UIHyperlink extends UICellFormat implements WorksheetItem
 {
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIHyperlink";
-   
+
    private String description;
    private String URL;
    private Integer startColumn;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIListValidation.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIListValidation.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIListValidation.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -6,6 +6,7 @@
 {
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIListValidation";
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIListValidationItem.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIListValidationItem.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIListValidationItem.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -1,12 +1,11 @@
 package org.jboss.seam.excel.ui;
 
-
 public class UIListValidationItem extends ExcelComponent
 {
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIListValidationItem";
 
    private String value;
-   
+
    public String getValue()
    {
       return (String) valueOf("value", value);
@@ -17,6 +16,7 @@
       this.value = value;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIMergeCells.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIMergeCells.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIMergeCells.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -10,7 +10,7 @@
    private Integer startRow;
    private Integer endColumn;
    private Integer endRow;
-   
+
    public Integer getStartColumn()
    {
       return (Integer) valueOf("startColumn", startColumn);
@@ -51,6 +51,7 @@
       this.endRow = endRow;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UINumericValidation.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UINumericValidation.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UINumericValidation.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -6,14 +6,16 @@
 {
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UINumericValidation";
 
-   public enum ValidationCondition {
+   public enum ValidationCondition
+   {
       equal, greater_equal, less_equal, less_than, not_equal, between, not_between
    }
-   
+
    private Double value;
    private Double value2;
    private ValidationCondition condition;
-   
+
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIPrintArea.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIPrintArea.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIPrintArea.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -50,6 +50,7 @@
       this.lastRow = lastRow;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIRangeValidation.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIRangeValidation.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIRangeValidation.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -10,7 +10,7 @@
    private Integer startRow;
    private Integer endColumn;
    private Integer endRow;
-   
+
    public Integer getStartColumn()
    {
       return (Integer) valueOf("startColumn", startColumn);
@@ -51,6 +51,7 @@
       this.endRow = endRow;
    }
 
+   @Override
    public String getFamily()
    {
       return COMPONENT_TYPE;

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIRowPageBreak.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIRowPageBreak.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIRowPageBreak.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -7,7 +7,7 @@
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIRowPageBreak";
 
    private Integer row;
-   
+
    public Integer getRow()
    {
       return (Integer) valueOf("row", row);

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIWorkbook.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -56,7 +56,7 @@
    private Boolean workbookProtected;
 
    private long timing;
-   
+
    public CreationType getCreationType()
    {
       if (hasSettings())
@@ -319,7 +319,8 @@
        */
       byte[] bytes = new byte[0];
       bytes = excelWorkbook.getBytes();
-      if (log.isDebugEnabled()) {
+      if (log.isDebugEnabled())
+      {
          log.debug("Prosessed for {0}ms", new Date().getTime() - timing);
       }
 
@@ -426,8 +427,6 @@
 
    /**
     * Hack? Noooooooooooooooo
-    * 
-    * @return
     */
    public boolean hasSettings()
    {

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheet.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -24,7 +24,7 @@
    private Integer startRow;
    private Integer startColumn;
    private String templates;
-   
+
    public Integer getStartRow()
    {
       return (Integer) valueOf("startRow", startRow);
@@ -80,12 +80,14 @@
    {
       this.value = value;
    }
-   
-   public void setTemplates(String templates) {
+
+   public void setTemplates(String templates)
+   {
       this.templates = templates;
    }
-   
-   public String getTemplates() {
+
+   public String getTemplates()
+   {
       return (String) valueOf("templates", templates);
    }
 
@@ -107,26 +109,29 @@
        * any)
        */
       excelWorkbook.createOrSelectWorksheet(this);
-      
+
       /**
        * Add worksheet level items
        */
       List<WorksheetItem> items = getItems(getChildren());
-      for (WorksheetItem item : items) {
+      for (WorksheetItem item : items)
+      {
          excelWorkbook.addItem(item);
       }
-      
+
       /**
        * Execute worksheet level commands
        */
       List<Command> commands = getCommands(getChildren());
-      for (Command command : commands) {
+      for (Command command : commands)
+      {
          excelWorkbook.executeCommand(command);
       }
-   };
+   }
 
    @SuppressWarnings("unchecked")
-   public static Iterator unwrapIterator (Object value) {
+   public static Iterator unwrapIterator(Object value)
+   {
       if (value instanceof Iterable)
       {
          return ((Iterable) value).iterator();
@@ -148,7 +153,7 @@
          throw new ExcelWorkbookException("A worksheet's value must be an Iterable, DataModel or Query");
       }
    }
-   
+
    /**
     * Returns an iterator over objects passed to the worksheet
     * 

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetSettings.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetSettings.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetSettings.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -1,6 +1,5 @@
 package org.jboss.seam.excel.ui;
 
-
 public class UIWorksheetSettings extends ExcelComponent
 {
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIWorksheetSettings";

Modified: trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetTemplate.java
===================================================================
--- trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetTemplate.java	2008-08-01 05:21:35 UTC (rev 8555)
+++ trunk/src/excel/org/jboss/seam/excel/ui/UIWorksheetTemplate.java	2008-08-03 17:20:27 UTC (rev 8556)
@@ -7,7 +7,7 @@
    public static final String COMPONENT_TYPE = "org.jboss.seam.excel.ui.UIWorksheetTemplate";
 
    private String name;
-   
+
    @Override
    public String getFamily()
    {
@@ -18,8 +18,9 @@
    {
       return (String) valueOf("name", name);
    }
-   
-   public void setName(String name) {
+
+   public void setName(String name)
+   {
       this.name = name;
    }
 




More information about the seam-commits mailing list