org.odftoolkit.simple.style
Enum StyleTypeDefinitions.SupportedLinearMeasure

java.lang.Object
  extended by java.lang.Enum<StyleTypeDefinitions.SupportedLinearMeasure>
      extended by org.odftoolkit.simple.style.StyleTypeDefinitions.SupportedLinearMeasure
All Implemented Interfaces:
Serializable, Comparable<StyleTypeDefinitions.SupportedLinearMeasure>
Enclosing class:
StyleTypeDefinitions

public static enum StyleTypeDefinitions.SupportedLinearMeasure
extends Enum<StyleTypeDefinitions.SupportedLinearMeasure>

The supported line measurement till now


Enum Constant Summary
CM
           
IN
           
PT
           
 
Method Summary
 double convert(double measure, StyleTypeDefinitions.SupportedLinearMeasure measureUnit)
          Convert the given linear measure in the given unit to this unit.
static StyleTypeDefinitions.SupportedLinearMeasure enumValueOf(String aValue)
           
 double toCMs(double measure)
          Convert other measure to centimeter(CM) measure.
 double toINs(double measure)
          Convert other measure to inch(IN) measure.
 double toPTs(double measure)
          Convert other measure to point(PT) measure.
 String toString()
           
static StyleTypeDefinitions.SupportedLinearMeasure valueOf(String name)
          Returns the enum constant of this type with the specified name.
static StyleTypeDefinitions.SupportedLinearMeasure[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PT

public static final StyleTypeDefinitions.SupportedLinearMeasure PT

IN

public static final StyleTypeDefinitions.SupportedLinearMeasure IN

CM

public static final StyleTypeDefinitions.SupportedLinearMeasure CM
Method Detail

values

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

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

valueOf

public static StyleTypeDefinitions.SupportedLinearMeasure 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

convert

public double convert(double measure,
                      StyleTypeDefinitions.SupportedLinearMeasure measureUnit)
Convert the given linear measure in the given unit to this unit.

Parameters:
measure - the measure value in the given measureUnit
measureUnit - the unit of the measure argument
Returns:
the converted measure in this unit.

toINs

public double toINs(double measure)
Convert other measure to inch(IN) measure.

Parameters:
measure - the measure
Returns:
the converted measure
See Also:
convert(double, org.odftoolkit.simple.style.StyleTypeDefinitions.SupportedLinearMeasure)

toPTs

public double toPTs(double measure)
Convert other measure to point(PT) measure.

Parameters:
measure - the measure
Returns:
the converted measure
See Also:
convert(double, org.odftoolkit.simple.style.StyleTypeDefinitions.SupportedLinearMeasure)

toCMs

public double toCMs(double measure)
Convert other measure to centimeter(CM) measure.

Parameters:
measure - the measure
Returns:
the converted measure
See Also:
convert(double, org.odftoolkit.simple.style.StyleTypeDefinitions.SupportedLinearMeasure)

enumValueOf

public static StyleTypeDefinitions.SupportedLinearMeasure enumValueOf(String aValue)

toString

public String toString()
Overrides:
toString in class Enum<StyleTypeDefinitions.SupportedLinearMeasure>


Copyright © 2010-2011 The Apache Software Foundation. All Rights Reserved.