You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ni...@apache.org on 2008/04/01 12:17:59 UTC

svn commit: r643350 - in /poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel: Cell.java CreationHelper.java RichTextString.java Row.java Sheet.java Workbook.java

Author: nick
Date: Tue Apr  1 03:17:06 2008
New Revision: 643350

URL: http://svn.apache.org/viewvc?rev=643350&view=rev
Log:
Fix up the jdk1.4 interfaces, so that it all compiles and is happy once again

Modified:
    poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java
    poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java
    poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java
    poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java
    poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java
    poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java

Modified: poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java?rev=643350&r1=643349&r2=643350&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java (original)
+++ poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java Tue Apr  1 03:17:06 2008
@@ -17,8 +17,14 @@
 
 package org.apache.poi.ss.usermodel;
 
-public interface Cell {
+import org.apache.poi.hssf.usermodel.HSSFRichTextString;
 
+/**
+ * This is a JDK 1.4 compatible interface for HSSFCell.
+ * If you are using JDK 1.5 or later, use the other set of interfaces,
+ *  which work properly for both HSSFCell and XSSFCell
+ */
+public interface Cell {
     /**
      * Numeric Cell type (0)
      * @see #setCellType(int)
@@ -67,4 +73,20 @@
 
     public final static int CELL_TYPE_ERROR = 5;
 
+
+    int getCellType();
+    short getCellNum();
+
+    byte getErrorCellValue();
+    String getCellFormula();
+
+    boolean getBooleanCellValue();
+    double getNumericCellValue();
+    HSSFRichTextString getRichStringCellValue();
+
+    void setCellType(int cellType);
+    void setCellValue(boolean value);
+    void setCellValue(double value);
+    void setCellValue(RichTextString value);
+    void setCellFormula(String formula);
 }

Modified: poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java?rev=643350&r1=643349&r2=643350&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java (original)
+++ poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java Tue Apr  1 03:17:06 2008
@@ -16,4 +16,13 @@
 ==================================================================== */
 package org.apache.poi.ss.usermodel;
 
-public interface CreationHelper {}
+import org.apache.poi.hssf.usermodel.HSSFRichTextString;
+
+/**
+ * This is a JDK 1.4 compatible interface for HSSFCreationHelper.
+ * If you are using JDK 1.5 or later, use the other set of interfaces,
+ *  which work properly for both HSSFCreationHelper and XSSFCreationHelper
+ */
+public interface CreationHelper {
+    HSSFRichTextString createRichTextString(String text);
+}

Modified: poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java?rev=643350&r1=643349&r2=643350&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java (original)
+++ poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java Tue Apr  1 03:17:06 2008
@@ -17,4 +17,11 @@
 
 package org.apache.poi.ss.usermodel;
 
-public interface RichTextString {}
+/**
+ * This is a JDK 1.4 compatible interface for HSSFRichTextString.
+ * If you are using JDK 1.5 or later, use the other set of interfaces,
+ *  which work properly for both HSSFRichTextString and XSSFRichTextString
+ */
+public interface RichTextString {
+    String getString();
+}

Modified: poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java?rev=643350&r1=643349&r2=643350&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java (original)
+++ poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java Tue Apr  1 03:17:06 2008
@@ -17,4 +17,20 @@
 
 package org.apache.poi.ss.usermodel;
 
-public interface Row {}
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import java.util.Iterator;
+
+/**
+ * This is a JDK 1.4 compatible interface for HSSFRow.
+ * If you are using JDK 1.5 or later, use the other set of interfaces,
+ *  which work properly for both HSSFRow and XSSFRow
+ */
+public interface Row {
+    int getRowNum();
+    short getFirstCellNum();
+    short getLastCellNum();
+    int getPhysicalNumberOfCells();
+    HSSFCell getCell(int cellnum);
+
+    Iterator cellIterator();
+}

Modified: poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java?rev=643350&r1=643349&r2=643350&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java (original)
+++ poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java Tue Apr  1 03:17:06 2008
@@ -17,4 +17,19 @@
 
 package org.apache.poi.ss.usermodel;
 
-public interface Sheet {}
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import java.util.Iterator;
+
+/**
+ * This is a JDK 1.4 compatible interface for HSSFSheet.
+ * If you are using JDK 1.5 or later, use the other set of interfaces,
+ *  which work properly for both HSSFSheet and XSSFSheet
+ */
+public interface Sheet {
+    int getPhysicalNumberOfRows();
+    int getFirstRowNum();
+    int getLastRowNum();
+
+    HSSFRow getRow(int rownum);
+    Iterator rowIterator();
+}

Modified: poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java
URL: http://svn.apache.org/viewvc/poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java?rev=643350&r1=643349&r2=643350&view=diff
==============================================================================
--- poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java (original)
+++ poi/branches/ooxml/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java Tue Apr  1 03:17:06 2008
@@ -17,4 +17,26 @@
 
 package org.apache.poi.ss.usermodel;
 
-public interface Workbook {}
+import org.apache.poi.hssf.usermodel.*;
+
+/**
+ * This is a JDK 1.4 compatible interface for HSSFWorkbook.
+ * If you are using JDK 1.5 or later, use the other set of interfaces,
+ *  which work properly for both HSSFWorkbook and XSSFWorkbook
+ */
+public interface Workbook {
+    int getNumberOfSheets();
+    short getNumberOfFonts();
+    int getNumberOfNames();
+
+    HSSFName getNameAt(int index);
+    String getNameName(int index);
+
+    String getSheetName(int sheet);
+    HSSFSheet getSheetAt(int index);
+    int getSheetIndex(String name);
+    int getSheetIndex(Sheet sheet);
+    int getSheetIndexFromExternSheetIndex(int externSheetNumber);
+
+    CreationHelper getCreationHelper();
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org