org.jopendocument.dom.style.data
Class DataStyle
java.lang.Object
org.jopendocument.dom.ODNode
org.jopendocument.dom.Style
org.jopendocument.dom.style.data.DataStyle
- Direct Known Subclasses:
- BooleanStyle, CurrencyStyle, DateStyle, NumberStyle, PercentStyle, TextStyle, TimeStyle
public abstract class DataStyle
- extends Style
| Methods inherited from class org.jopendocument.dom.Style |
dup, equals, getFormattingProperties, getFormattingProperties, getFormattingProperties, getName, getNS, getReferencedStyle, getReferencedStyleElement, getReferences, getStyle, getStyleDesc, getStyleStyleDesc, hashCode, isReferencedAtMostOnce, register, warp |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
DATA_STYLES_DESCS
public static final DataStyle.DataStyleDesc<?>[] DATA_STYLES_DESCS
getDecimalPlaces
public static int getDecimalPlaces(CellStyle defaultStyle)
addStringLiteral
public static void addStringLiteral(java.lang.StringBuilder formatSB,
java.lang.String s)
getDataType
public final ODValueType getDataType()
getEpoch
public final ODEpoch getEpoch()
convert
public final java.lang.Object convert(java.lang.Object o)
throws java.lang.NullPointerException
- Convert the passed object to something that
format(Object, CellStyle, boolean) can
accept.
- Parameters:
o - the object to convert.
- Returns:
- an object that can be formatted,
null if o cannot be
converted.
- Throws:
java.lang.NullPointerException - if o is null.- See Also:
canFormat(Class)
canFormat
public final boolean canFormat(java.lang.Class<?> toFormat)
- Whether instances of the passed class can be
formatted.
- Parameters:
toFormat - the class.
- Returns:
true if instances of toFormat can be formatted.
getTitle
public final java.lang.String getTitle()
getTextProperties
public final TextStyle.StyleTextProperties getTextProperties()
format
public abstract java.lang.String format(java.lang.Object o,
CellStyle defaultStyle,
boolean lenient)
throws java.lang.UnsupportedOperationException
- Throws:
java.lang.UnsupportedOperationException