com.antelmann.ooffice
Enum Cell.Format
java.lang.Object
java.lang.Enum<Cell.Format>
com.antelmann.ooffice.Cell.Format
- All Implemented Interfaces:
- Serializable, Comparable<Cell.Format>
- Enclosing class:
- Cell
public static enum Cell.Format
- extends Enum<Cell.Format>
used to format a cell value in OOCalc
ALL
public static final Cell.Format ALL
CURRENCY
public static final Cell.Format CURRENCY
DATE
public static final Cell.Format DATE
DATETIME
public static final Cell.Format DATETIME
DEFINED
public static final Cell.Format DEFINED
FRACTION
public static final Cell.Format FRACTION
LOGICAL
public static final Cell.Format LOGICAL
NUMBER
public static final Cell.Format NUMBER
PERCENT
public static final Cell.Format PERCENT
SCIENTIFIC
public static final Cell.Format SCIENTIFIC
TEXT
public static final Cell.Format TEXT
TIME
public static final Cell.Format TIME
UNDEFINED
public static final Cell.Format UNDEFINED
NUMBER_FORMAT_KEY
public static final String NUMBER_FORMAT_KEY
- See Also:
getNumberFormat(OOCalc, String),
OfficeUtils.setXPropertyValue(Object, String, Object),
Constant Field Values
values
public static Cell.Format[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (Cell.Format c : Cell.Format.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static Cell.Format valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException - if this enum type has no constant
with the specified name
NullPointerException - if the argument is null
getShortValue
public short getShortValue()
fromInt
public static Cell.Format fromInt(int n)
applyTo
public void applyTo(OOCalc calc,
Object cellOrRange)
throws IllegalArgumentException,
OfficeException
- Throws:
IllegalArgumentException
OfficeException
applyTo
public void applyTo(OOCalc calc,
Object cellOrRange,
Locale locale)
throws IllegalArgumentException,
OfficeException
- works for
XCell or XCellRange objects
- Throws:
IllegalArgumentException
OfficeException
applyFormat
public static void applyFormat(OOCalc calc,
Object cellOrRange,
int formatNumber)
throws IllegalArgumentException,
OfficeException
- Throws:
IllegalArgumentException
OfficeException- See Also:
getNumberFormat(OOCalc, String, Locale)
getNumberFormat
public static int getNumberFormat(OOCalc calc,
String numberFormatString)
- See Also:
NUMBER_FORMAT_KEY,
OfficeUtils.setXPropertyValue(Object, String, Object)
getNumberFormat
public static int getNumberFormat(OOCalc calc,
String numberFormatString,
Locale locale)
(c) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads