HorizontalRuleAlignment
Contents
[
Hide
]Inheritance: java.lang.Object
public class HorizontalRuleAlignment
Represents the alignment for the specified horizontal rule.
Examples:
Shows how to insert a horizontal rule shape, and customize its formatting.
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
Shape shape = builder.insertHorizontalRule();
HorizontalRuleFormat horizontalRuleFormat = shape.getHorizontalRuleFormat();
horizontalRuleFormat.setAlignment(HorizontalRuleAlignment.CENTER);
horizontalRuleFormat.setWidthPercent(70.0);
horizontalRuleFormat.setHeight(3.0);
horizontalRuleFormat.setColor(Color.BLUE);
horizontalRuleFormat.setNoShade(true);
Assert.assertTrue(shape.isHorizontalRule());
Assert.assertTrue(shape.getHorizontalRuleFormat().getNoShade());
Fields
Field | Description |
---|---|
CENTER | Aligned to the center. |
LEFT | Aligned to the left. |
RIGHT | Aligned to the right. |
length |
Methods
Method | Description |
---|---|
fromName(String horizontalRuleAlignmentName) | |
getName(int horizontalRuleAlignment) | |
getValues() | |
toString(int horizontalRuleAlignment) |
CENTER
public static int CENTER
Aligned to the center.
LEFT
public static int LEFT
Aligned to the left.
RIGHT
public static int RIGHT
Aligned to the right.
length
public static int length
fromName(String horizontalRuleAlignmentName)
public static int fromName(String horizontalRuleAlignmentName)
Parameters:
Parameter | Type | Description |
---|---|---|
horizontalRuleAlignmentName | java.lang.String |
Returns: int
getName(int horizontalRuleAlignment)
public static String getName(int horizontalRuleAlignment)
Parameters:
Parameter | Type | Description |
---|---|---|
horizontalRuleAlignment | int |
Returns: java.lang.String
getValues()
public static int[] getValues()
Returns: int[]
toString(int horizontalRuleAlignment)
public static String toString(int horizontalRuleAlignment)
Parameters:
Parameter | Type | Description |
---|---|---|
horizontalRuleAlignment | int |
Returns: java.lang.String