Fix up the jdk1.4 interfaces, so that it all compiles and is happy once again

git-svn-id: https://svn.apache.org/repos/asf/poi/branches/ooxml@643350 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2008-04-01 10:17:06 +00:00
parent 3ed4f3d913
commit 6a9d8e6ea5
6 changed files with 97 additions and 6 deletions

View File

@ -17,8 +17,14 @@
package org.apache.poi.ss.usermodel; 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) * Numeric Cell type (0)
* @see #setCellType(int) * @see #setCellType(int)
@ -67,4 +73,20 @@ public interface Cell {
public final static int CELL_TYPE_ERROR = 5; 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);
} }

View File

@ -16,4 +16,13 @@
==================================================================== */ ==================================================================== */
package org.apache.poi.ss.usermodel; 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);
}

View File

@ -17,4 +17,11 @@
package org.apache.poi.ss.usermodel; 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();
}

View File

@ -17,4 +17,20 @@
package org.apache.poi.ss.usermodel; 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();
}

View File

@ -17,4 +17,19 @@
package org.apache.poi.ss.usermodel; 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();
}

View File

@ -17,4 +17,26 @@
package org.apache.poi.ss.usermodel; 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();
}