MeasurementUnits

Inheritance: java.lang.Object

public class MeasurementUnits

Specifies the unit of measurement.

Examples:

Shows how to make a saved document conform to an older ODT schema.


 Document doc = new Document(getMyDir() + "Rendering.docx");

 OdtSaveOptions saveOptions = new OdtSaveOptions();
 {
     saveOptions.setMeasureUnit(OdtSaveMeasureUnit.CENTIMETERS);
     saveOptions.isStrictSchema11(exportToOdt11Specs);
 }

 doc.save(getArtifactsDir() + "OdtSaveOptions.Odt11Schema.odt", saveOptions);
 

Fields

FieldDescription
CENTIMETERSCentimeters.
INCHESInches.
MILLIMETERSMillimeters.
PICASPicas (commonly used in traditional typewriter font spacing).
POINTSPoints.
length

Methods

MethodDescription
fromName(String measurementUnitsName)
getName(int measurementUnits)
getValues()
toString(int measurementUnits)

CENTIMETERS

public static int CENTIMETERS

Centimeters.

INCHES

public static int INCHES

Inches.

MILLIMETERS

public static int MILLIMETERS

Millimeters.

PICAS

public static int PICAS

Picas (commonly used in traditional typewriter font spacing).

POINTS

public static int POINTS

Points.

length

public static int length

fromName(String measurementUnitsName)

public static int fromName(String measurementUnitsName)

Parameters:

ParameterTypeDescription
measurementUnitsNamejava.lang.String

Returns: int

getName(int measurementUnits)

public static String getName(int measurementUnits)

Parameters:

ParameterTypeDescription
measurementUnitsint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int measurementUnits)

public static String toString(int measurementUnits)

Parameters:

ParameterTypeDescription
measurementUnitsint

Returns: java.lang.String