FloatingBox

Overview

FloatingBox is a class in Aspose.Pdf FOSS for Java. Inherits from: BaseParagraph.

Represents a floating box container that can hold paragraph elements at a specific position on the page.

Properties

NameTypeAccessDescription
widthdoubleReadReturns the width of this floating box in points.
heightdoubleReadReturns the height of this floating box in points.
paragraphsParagraphsReadReturns the paragraphs collection for this floating box, creating it lazily if needed.
leftdoubleReadReturns the left position offset in points.
topdoubleReadReturns the top position offset in points.
backgroundColorColorReadReturns the background color of this floating box.
borderBorderInfoReadReturns the border styling for this floating box.
paddingMarginInfoReadReturns the padding (internal margin) for this floating box.
marginMarginInfoReadGets the margin information for this paragraph.
horizontalAlignmentHorizontalAlignmentReadGets the horizontal alignment of this paragraph within its container.
inLineParagraphbooleanReadReturns whether this paragraph is an inline element.
keptWithNextbooleanReadReturns whether this paragraph should be kept together with the next paragraph
on the same page during layout.
firstParagraphInColumnbooleanReadReturns whether this paragraph is the first in its column.
inNewPagebooleanReadReturns whether this paragraph should start on a new page during layout.
hyperlinkHyperlinkReadReturns the hyperlink attached to this paragraph (web, local or file
target), or {@code null} if the paragraph is not clickable.

Methods

SignatureDescription
FloatingBox()Creates a new FloatingBox with zero dimensions.
FloatingBox(width: double, height: double)Creates a new FloatingBox with the specified dimensions.
getWidth()doubleReturns the width of this floating box in points.
setWidth(width: double)Sets the width of this floating box in points.
getHeight()doubleReturns the height of this floating box in points.
setHeight(height: double)Sets the height of this floating box in points.
getParagraphs()ParagraphsReturns the paragraphs collection for this floating box, creating it lazily if needed.
setParagraphs(paragraphs: Paragraphs)Sets the paragraphs collection for this floating box.
getLeft()doubleReturns the left position offset in points.
setLeft(left: double)Sets the left position offset in points.
getTop()doubleReturns the top position offset in points.
setTop(top: double)Sets the top position offset in points.
getBackgroundColor()ColorReturns the background color of this floating box.
setBackgroundColor(backgroundColor: Color)Sets the background color of this floating box.
getBorder()BorderInfoReturns the border styling for this floating box.
setBorder(border: BorderInfo)Sets the border styling for this floating box.
getPadding()MarginInfoReturns the padding (internal margin) for this floating box.
setPadding(padding: MarginInfo)Sets the padding (internal margin) for this floating box.
getMargin()MarginInfoGets the margin information for this paragraph.
setMargin(margin: MarginInfo)Sets the margin information for this paragraph.
getHorizontalAlignment()HorizontalAlignmentGets the horizontal alignment of this paragraph within its container.
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment)Sets the horizontal alignment of this paragraph within its container.
isInLineParagraph()booleanReturns whether this paragraph is an inline element.
setInLineParagraph(inLineParagraph: boolean)Sets whether this paragraph should be treated as an inline element.
isKeptWithNext()booleanReturns whether this paragraph should be kept together with the next paragraph
on the same page during layout.
setKeptWithNext(keptWithNext: boolean)Sets whether this paragraph should be kept together with the next paragraph
on the same page during layout.
isFirstParagraphInColumn()booleanReturns whether this paragraph is the first in its column.
setFirstParagraphInColumn(firstParagraphInColumn: boolean)Sets whether this paragraph is the first in its column.
isInNewPage()booleanReturns whether this paragraph should start on a new page during layout.
setInNewPage(inNewPage: boolean)Sets whether this paragraph should start on a new page during layout.
getHyperlink()HyperlinkReturns the hyperlink attached to this paragraph (web, local or file
target), or {@code null} if the paragraph is not clickable.
setHyperlink(hyperlink: Hyperlink)Attaches a hyperlink to this paragraph.

See Also