public class VerticalAlignment
extends java.lang.Object
Examples:
Shows how to insert a floating image to the center of a page.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
// Insert a floating image that will appear behind the overlapping text and align it to the page's center.
Shape shape = builder.insertImage(getImageDir() + "Logo.jpg");
shape.setWrapType(WrapType.NONE);
shape.setBehindText(true);
shape.setRelativeHorizontalPosition(RelativeHorizontalPosition.PAGE);
shape.setRelativeVerticalPosition(RelativeVerticalPosition.PAGE);
shape.setHorizontalAlignment(HorizontalAlignment.CENTER);
shape.setVerticalAlignment(VerticalAlignment.CENTER);
doc.save(getArtifactsDir() + "Image.CreateFloatingPageCenter.docx");
| Modifier and Type | Field and Description |
|---|---|
static int |
BOTTOM
Specifies that the object shall be at the bottom of the vertical alignment base.
|
static int |
CENTER
Specifies that the object shall be centered with respect to the vertical alignment base.
|
static int |
DEFAULT
Same as
NONE. |
static int |
INLINE
Not documented.
|
static int |
INSIDE
Specifies that the object shall be inside of the horizontal alignment base.
|
static int |
length |
static int |
NONE
The object is explicitly positioned, usually using its Top property.
|
static int |
OUTSIDE
Specifies that the object shall be outside of the vertical alignment base.
|
static int |
TOP
Specifies that the object shall be at the top of the vertical alignment base.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String verticalAlignmentName) |
static java.lang.String |
getName(int verticalAlignment) |
static int[] |
getValues() |
static java.lang.String |
toString(int verticalAlignment) |
public static int NONE
public static int TOP
public static int CENTER
public static int BOTTOM
public static int INSIDE
public static int OUTSIDE
public static int INLINE
public static int DEFAULT
NONE.public static int length