HorizontalRuleAlignment

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

FieldDescription
CENTERAligned to the center.
LEFTAligned to the left.
RIGHTAligned to the right.
length

Methods

MethodDescription
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.

public static int RIGHT

Aligned to the right.

length

public static int length

fromName(String horizontalRuleAlignmentName)

public static int fromName(String horizontalRuleAlignmentName)

Parameters:

ParameterTypeDescription
horizontalRuleAlignmentNamejava.lang.String

Returns: int

getName(int horizontalRuleAlignment)

public static String getName(int horizontalRuleAlignment)

Parameters:

ParameterTypeDescription
horizontalRuleAlignmentint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int horizontalRuleAlignment)

public static String toString(int horizontalRuleAlignment)

Parameters:

ParameterTypeDescription
horizontalRuleAlignmentint

Returns: java.lang.String