com.deltaxml.odf
Enum FontStyle

java.lang.Object
  extended by java.lang.Enum<FontStyle>
      extended by com.deltaxml.odf.FontStyle
All Implemented Interfaces:
Serializable, Comparable<FontStyle>

public enum FontStyle
extends Enum<FontStyle>

Enumeration representing the possible values to set as the font style for added and deleted text.


Enum Constant Summary
ITALIC
          The value representing italic font style.
NONE
          The value representing no change to the font style.
NORMAL
          The value representing normal font style.
OBLIQUE
          The value representing oblique font style (often the same as italic).
 
Method Summary
static FontStyle getFontStyle(String value)
          Returns a FontStyle object from the supplied String value if appropriate.
 String toString()
          Returns a String representation of the FontStyle.
static FontStyle valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FontStyle[] values()
          Returns an array containing the constants of this enum type, in the order they're declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

NONE

public static final FontStyle NONE
The value representing no change to the font style.


NORMAL

public static final FontStyle NORMAL
The value representing normal font style.


ITALIC

public static final FontStyle ITALIC
The value representing italic font style.


OBLIQUE

public static final FontStyle OBLIQUE
The value representing oblique font style (often the same as italic).

Method Detail

values

public static final FontStyle[] values()
Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:
for(FontStyle c : FontStyle.values())
        System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they're declared

valueOf

public static FontStyle 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

toString

public String toString()

Returns a String representation of the FontStyle.

In the case of FontStyle, the String returned is the value that would be used for the fo:font-style attribute on the text style

Overrides:
toString in class Enum<FontStyle>
Returns:
a String representing the FontStyle object

getFontStyle

public static FontStyle getFontStyle(String value)

Returns a FontStyle object from the supplied String value if appropriate.

This method should not normally be necessary. However, if you have a String representation of FontStyle, it may be a useful utility method.

Parameters:
value - the String representation of the FontStyle
Returns:
the FontStyle instance corresponding to the parameter, or null if the value is invalid


© 2001-2009 DeltaXML Ltd. All Rights Reserved.