Package com.itextpdf.layout.properties
Class InlineVerticalAlignment
- java.lang.Object
-
- com.itextpdf.layout.properties.InlineVerticalAlignment
-
public class InlineVerticalAlignment extends java.lang.Object
A property corresponding to the css vertical-align property and used to set vertical alignment on inline blocks, it specifies the type of alignment and where needed a numerical value to complete it.
-
-
Field Summary
Fields Modifier and Type Field Description private InlineVerticalAlignmentType
type
private float
value
-
Constructor Summary
Constructors Constructor Description InlineVerticalAlignment()
Creates a default InlineVerticalAlignment, it gets the typeInlineVerticalAlignmentType.BASELINE
.InlineVerticalAlignment(InlineVerticalAlignmentType type)
Creates an InlineVerticalAlignment with a specified type.InlineVerticalAlignment(InlineVerticalAlignmentType type, float value)
Creates an InlineVerticalAlignment with a specified type and a value.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description InlineVerticalAlignmentType
getType()
Gets the type of InlineVerticalAlignment.float
getValue()
Gets the value.void
setType(InlineVerticalAlignmentType type)
Sets the typeInlineVerticalAlignmentType
.void
setValue(float value)
Sets the value.
-
-
-
Field Detail
-
type
private InlineVerticalAlignmentType type
-
value
private float value
-
-
Constructor Detail
-
InlineVerticalAlignment
public InlineVerticalAlignment()
Creates a default InlineVerticalAlignment, it gets the typeInlineVerticalAlignmentType.BASELINE
.
-
InlineVerticalAlignment
public InlineVerticalAlignment(InlineVerticalAlignmentType type)
Creates an InlineVerticalAlignment with a specified type.- Parameters:
type
-InlineVerticalAlignmentType
-
InlineVerticalAlignment
public InlineVerticalAlignment(InlineVerticalAlignmentType type, float value)
Creates an InlineVerticalAlignment with a specified type and a value. This will throw aPdfException
when used with a type that does not require a value.- Parameters:
type
-InlineVerticalAlignmentType
value
- In the case ofInlineVerticalAlignmentType.FIXED
a lenth in pts, in case ofInlineVerticalAlignmentType.FRACTION
a multiplier value.
-
-
Method Detail
-
getType
public InlineVerticalAlignmentType getType()
Gets the type of InlineVerticalAlignment.- Returns:
- the type
InlineVerticalAlignmentType
-
setType
public void setType(InlineVerticalAlignmentType type)
Sets the typeInlineVerticalAlignmentType
.- Parameters:
type
-InlineVerticalAlignmentType
-
getValue
public float getValue()
Gets the value.- Returns:
- value In the case of
InlineVerticalAlignmentType.FIXED
a lenth in pts, in case ofInlineVerticalAlignmentType.FRACTION
a multiplier value.
-
setValue
public void setValue(float value)
Sets the value.- Parameters:
value
- In the case ofInlineVerticalAlignmentType.FIXED
a lenth in pts, in case ofInlineVerticalAlignmentType.FRACTION
a multiplier value.
-
-