public class HorizontalRuleAlignment
extends java.lang.Object
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());
| Modifier and Type | Field and Description |
|---|---|
static int |
CENTER
Aligned to the center.
|
static int |
LEFT
Aligned to the left.
|
static int |
length |
static int |
RIGHT
Aligned to the right.
|
| Modifier and Type | Method and Description |
|---|---|
static int |
fromName(java.lang.String horizontalRuleAlignmentName) |
static java.lang.String |
getName(int horizontalRuleAlignment) |
static int[] |
getValues() |
static java.lang.String |
toString(int horizontalRuleAlignment) |