]> source.dussan.org Git - poi.git/commitdiff
Fix up the jdk1.4 interfaces, so that it all compiles and is happy once again
authorNick Burch <nick@apache.org>
Tue, 1 Apr 2008 10:17:06 +0000 (10:17 +0000)
committerNick Burch <nick@apache.org>
Tue, 1 Apr 2008 10:17:06 +0000 (10:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@643350 13f79535-47bb-0310-9956-ffa450edef68

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

index 65f6447203a7200099b142effec678e2bff49916..28b8b14ea205cdb2a7dc7dd7617d0b3b8890683a 100644 (file)
 
 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 interface Cell {
 
     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);
 }
index d9e545ca13957f4b1712e66c459bcb6e8f1cbcbf..fb560199cc328bc4ab95d1f5814ced3fd8f1367c 100644 (file)
 ==================================================================== */
 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);
+}
index 0d2e17d82007260a1ab5b2a8768318c80cb23d25..d026f05fb7bdac1337c50095d94939e07bcf6879 100644 (file)
 
 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();
+}
index 46d58cfb84804cfaa6d90924a540b8ead584b8cb..80a191d7c67fb47906518c3a4acafb9b07987f18 100644 (file)
 
 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();
+}
index e2acdec93fe2d66e3233aeb1dd0b496d29609cab..ef5aac4cea5a37e020e841dc186b489754fbf8ff 100644 (file)
 
 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();
+}
index 728736a6cd7ce861ccf571138b4c33949871f53e..871947bd32ce49e423bf2da6343210e51fbae1a3 100644 (file)
 
 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();
+}