Package io.keikai.doc.io.schema.pdf
Class Line
java.lang.Object
io.keikai.doc.io.schema.pdf.Line
Internal Use Only.
Represents a line in a paragraph in PDF.
- Author:
- Jamson Chan
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInternal Use Only.static classInternal Use Only.static classInternal Use Only.static classInternal Use Only. -
Constructor Summary
ConstructorsConstructorDescriptionLine(float leftX, float rightX, PDFParagraph pdfParagraph) Create aLineinstance. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddInlines(Line.InlineItem inlineItem) AddPDFInlines by givenLine.InlineItem.Returns thePDFInlines in the line.floatgetLeftX()Returns the left x position of the line.floatReturns the extra vertical padding provides by different line height value.floatReturns the sum width of all the text (non-space) in the line.intReturns the number of non-suffix spaces in the line.floatReturns the extra vertical margin provides by different paragraph type.floatReturns the real height of the line.floatReturns the right x position of the line.floatgetWidth()Returns the width of the line.floatReturns the total width ignores the suffix spaces.
-
Constructor Details
-
Line
Create aLineinstance.- Parameters:
leftX- the left x position of the linerightX- the right x position of the linepdfParagraph- thePDFParagraphcontaining the line
-
-
Method Details
-
getInlines
Returns thePDFInlines in the line.- Returns:
- the
PDFInlines in the line.
-
addInlines
AddPDFInlines by givenLine.InlineItem.- Parameters:
inlineItem- theLine.InlineItemcontaining thePDFInlines to add
-
getLeftX
public float getLeftX()Returns the left x position of the line.- Returns:
- the left x position of the line
-
getRightX
public float getRightX()Returns the right x position of the line.- Returns:
- the right x position of the line
-
getWidth
public float getWidth()Returns the width of the line.- Returns:
- the width of the line
-
getRealHeight
public float getRealHeight()Returns the real height of the line.The height of a line is the maximum height of all the inlines (texts and components) in the line.
- Returns:
- the real height of the line
-
getParagraphTypeExtraMargin
public float getParagraphTypeExtraMargin()Returns the extra vertical margin provides by different paragraph type.It can represent margin-top and margin-bottom.
- Returns:
- the extra vertical margin provides by different paragraph type
-
getLineHeightExtraPadding
public float getLineHeightExtraPadding()Returns the extra vertical padding provides by different line height value.It can represent after padding-top and padding-bottom.
- Returns:
- the extra vertical padding provides by different line height value
-
getNonSuffixSpacesCount
public int getNonSuffixSpacesCount()Returns the number of non-suffix spaces in the line.- Returns:
- the number of non-suffix spaces in the line
-
getWidthExceptSuffixSpaces
public float getWidthExceptSuffixSpaces()Returns the total width ignores the suffix spaces.Note that this width could start from text or space, and MUST be ends with text.
- Returns:
- the total width of the text in the line
-
getNonSpaceWidth
public float getNonSpaceWidth()Returns the sum width of all the text (non-space) in the line.- Returns:
- the sum width of all the text (non-space) in the line.
-