com.aspose.words
Class HorizontalAlignment

java.lang.Object
    extended by com.aspose.words.HorizontalAlignment

public class HorizontalAlignment 
extends java.lang.Object

Utility class containing constants. Specifies horizontal alignment of a floating shape, text frame or floating table.

Example:

Shows how to insert a floating image in the middle of a page.
// This creates a builder and also an empty document inside the builder.
DocumentBuilder builder = new DocumentBuilder();

// By default, the image is inline.
Shape shape = builder.insertImage(getMyDir() + "Aspose.Words.gif");

// Make the image float, put it behind text and center on the page.
shape.setWrapType(WrapType.NONE);
shape.setBehindText(true);
shape.setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE);
shape.setHorizontalAlignment(HorizontalAlignment.CENTER);
shape.setRelativeVerticalPosition(RelativeVerticalPosition.PAGE);
shape.setVerticalAlignment(VerticalAlignment.CENTER);

builder.getDocument().save(getMyDir() + "Image.CreateFloatingPageCenter Out.doc");
See Also:
ShapeBase.HorizontalAlignment

Field Summary
static final intNONE
           The object is explicitly positioned, usually using its Left property.
static final intDEFAULT
           Same as NONE.
static final intLEFT
           Specifies that the object shall be left aligned to the horizontal alignment base.
static final intCENTER
           Specifies that the object shall be centered with respect to the horizontal alignment base.
static final intRIGHT
           Specifies that the object shall be right aligned to the horizontal alignment base.
static final intINSIDE
           Specifies that the object shall be inside of the horizontal alignment base.
static final intOUTSIDE
           Specifies that the object shall be outside of the horizontal alignment base.
 

Field Detail

NONE

public static final int NONE
The object is explicitly positioned, usually using its Left property.

DEFAULT

public static final int DEFAULT
Same as NONE.

LEFT

public static final int LEFT
Specifies that the object shall be left aligned to the horizontal alignment base.

CENTER

public static final int CENTER
Specifies that the object shall be centered with respect to the horizontal alignment base.

RIGHT

public static final int RIGHT
Specifies that the object shall be right aligned to the horizontal alignment base.

INSIDE

public static final int INSIDE
Specifies that the object shall be inside of the horizontal alignment base.

OUTSIDE

public static final int OUTSIDE
Specifies that the object shall be outside of the horizontal alignment base.

See Also:
          Aspose.Words Documentation - the home page for the Aspose.Words Product Documentation.
          Aspose.Words Support Forum - our preferred method of support.