diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java index 65f6447203..28b8b14ea2 100644 --- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java +++ b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Cell.java @@ -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 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); } diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java index d9e545ca13..fb560199cc 100644 --- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java +++ b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/CreationHelper.java @@ -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); +} diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java index 0d2e17d820..d026f05fb7 100644 --- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java +++ b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/RichTextString.java @@ -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(); +} diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java index 46d58cfb84..80a191d7c6 100644 --- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java +++ b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Row.java @@ -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(); +} diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java index e2acdec93f..ef5aac4cea 100644 --- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java +++ b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Sheet.java @@ -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(); +} diff --git a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java index 728736a6cd..871947bd32 100644 --- a/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java +++ b/src/ooxml/interfaces-jdk14/org/apache/poi/ss/usermodel/Workbook.java @@ -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(); +}