com.deltaxml.odf
Enum FontWeight

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

public enum FontWeight
extends Enum<FontWeight>

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


Enum Constant Summary
BOLD
          The value representing bold font weight.
NONE
          The value representing no change to the font weight.
NORMAL
          The value representing normal, or non-bold font weight.
 
Method Summary
static FontWeight getFontWeight(String value)
          Returns a FontWeight object from the supplied String value if appropriate.
 String toString()
          Returns a String representation of the FontWeight.
static FontWeight valueOf(String name)
          Returns the enum constant of this type with the specified name.
static FontWeight[] 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 FontWeight NONE
The value representing no change to the font weight.


NORMAL

public static final FontWeight NORMAL
The value representing normal, or non-bold font weight.


BOLD

public static final FontWeight BOLD
The value representing bold font weight.

Method Detail

values

public static final FontWeight[] 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(FontWeight c : FontWeight.values())
        System.out.println(c);

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

valueOf

public static FontWeight 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 FontWeight.

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

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

getFontWeight

public static FontWeight getFontWeight(String value)

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

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

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


© 2001-2009 DeltaXML Ltd. All Rights Reserved.