Holger's
Java API

com.antelmann.ooffice
Class Cell

java.lang.Object
  extended by com.antelmann.ooffice.Cell
All Implemented Interfaces:
DetailedString, Wrapped<com.sun.star.table.XCell>, com.sun.star.table.XCell, com.sun.star.uno.XInterface

public class Cell
extends Object
implements com.sun.star.table.XCell, Wrapped<com.sun.star.table.XCell>, DetailedString

wrapper around com.sun.star.table.XCell to avoid having to compile with office classes. This Cell class works for OOSpreadsheet and OOTableWriter objects.

Since:
20. Dezember 2006, 20:39
Author:
Holger Antelmann
See Also:
getXCell()

Nested Class Summary
static class Cell.Format
          used to format a cell value in OOCalc
static class Cell.Location
          represents an immutable cell location in a spreadsheet or a writer document
 
Field Summary
 
Fields inherited from interface com.sun.star.table.XCell
UNOTYPEINFO
 
Method Summary
static String formatCellAddressString(int row, int column)
          returns 'B2' for 1, 1 and 'A1' for 0, 0 and so on
static String formatCellAddressString(com.sun.star.table.XCell cell)
           
static String formatCellAddressString(com.sun.star.table.XCellRange range)
           
 int getColumn()
           
 int getError()
           
 String getFormula()
           
 int getRow()
           
 com.sun.star.table.CellContentType getType()
           
 double getValue()
           
 com.sun.star.table.XCell getXCell()
          returns the embedded cell object (which is not an instance of this class anymore)
static boolean isValidString(String adr)
           
static int parseColumnNumber(String cellName)
           
static int parseRowNumber(String cellName)
           
 void setFormula(String string)
           
 void setValue(double d)
           
 String toDetailedString()
          provides full details of this instance in a String.
 String toString()
           
 com.sun.star.table.XCell unwrap()
          returns the embedded instance that this wrapper encloses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

formatCellAddressString

public static String formatCellAddressString(int row,
                                             int column)
returns 'B2' for 1, 1 and 'A1' for 0, 0 and so on


isValidString

public static boolean isValidString(String adr)

formatCellAddressString

public static String formatCellAddressString(com.sun.star.table.XCellRange range)

parseColumnNumber

public static int parseColumnNumber(String cellName)
                             throws IllegalArgumentException
Throws:
IllegalArgumentException

parseRowNumber

public static int parseRowNumber(String cellName)
                          throws IllegalArgumentException
Throws:
IllegalArgumentException

getRow

public int getRow()

getColumn

public int getColumn()

toString

public String toString()
Overrides:
toString in class Object

toDetailedString

public String toDetailedString()
Description copied from interface: DetailedString
provides full details of this instance in a String. In case the String contains multiple lines, it is recommended to use '\n' rather than the platform specific line-break for better compatibility.

Specified by:
toDetailedString in interface DetailedString
Returns:
a (potentially multi-line) String providing full details on this object instance

formatCellAddressString

public static String formatCellAddressString(com.sun.star.table.XCell cell)

getXCell

public com.sun.star.table.XCell getXCell()
returns the embedded cell object (which is not an instance of this class anymore)


unwrap

public com.sun.star.table.XCell unwrap()
Description copied from interface: Wrapped
returns the embedded instance that this wrapper encloses

Specified by:
unwrap in interface Wrapped<com.sun.star.table.XCell>

getFormula

public String getFormula()
Specified by:
getFormula in interface com.sun.star.table.XCell

setFormula

public void setFormula(String string)
Specified by:
setFormula in interface com.sun.star.table.XCell

getValue

public double getValue()
Specified by:
getValue in interface com.sun.star.table.XCell

setValue

public void setValue(double d)
Specified by:
setValue in interface com.sun.star.table.XCell

getType

public com.sun.star.table.CellContentType getType()
Specified by:
getType in interface com.sun.star.table.XCell

getError

public int getError()
Specified by:
getError in interface com.sun.star.table.XCell


(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads