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
| Name | Type | Access | Description |
|---|---|---|---|
width | double | Read | Returns the width of this floating box in points. |
height | double | Read | Returns the height of this floating box in points. |
paragraphs | Paragraphs | Read | Returns the paragraphs collection for this floating box, creating it lazily if needed. |
left | double | Read | Returns the left position offset in points. |
top | double | Read | Returns the top position offset in points. |
backgroundColor | Color | Read | Returns the background color of this floating box. |
border | BorderInfo | Read | Returns the border styling for this floating box. |
padding | MarginInfo | Read | Returns the padding (internal margin) for this floating box. |
margin | MarginInfo | Read | Gets the margin information for this paragraph. |
horizontalAlignment | HorizontalAlignment | Read | Gets the horizontal alignment of this paragraph within its container. |
inLineParagraph | boolean | Read | Returns whether this paragraph is an inline element. |
keptWithNext | boolean | Read | Returns whether this paragraph should be kept together with the next paragraph |
| on the same page during layout. | |||
firstParagraphInColumn | boolean | Read | Returns whether this paragraph is the first in its column. |
inNewPage | boolean | Read | Returns whether this paragraph should start on a new page during layout. |
hyperlink | Hyperlink | Read | Returns the hyperlink attached to this paragraph (web, local or file |
| target), or {@code null} if the paragraph is not clickable. |
Methods
| Signature | Description |
|---|---|
FloatingBox() | Creates a new FloatingBox with zero dimensions. |
FloatingBox(width: double, height: double) | Creates a new FloatingBox with the specified dimensions. |
getWidth() → double | Returns the width of this floating box in points. |
setWidth(width: double) | Sets the width of this floating box in points. |
getHeight() → double | Returns the height of this floating box in points. |
setHeight(height: double) | Sets the height of this floating box in points. |
getParagraphs() → Paragraphs | Returns the paragraphs collection for this floating box, creating it lazily if needed. |
setParagraphs(paragraphs: Paragraphs) | Sets the paragraphs collection for this floating box. |
getLeft() → double | Returns the left position offset in points. |
setLeft(left: double) | Sets the left position offset in points. |
getTop() → double | Returns the top position offset in points. |
setTop(top: double) | Sets the top position offset in points. |
getBackgroundColor() → Color | Returns the background color of this floating box. |
setBackgroundColor(backgroundColor: Color) | Sets the background color of this floating box. |
getBorder() → BorderInfo | Returns the border styling for this floating box. |
setBorder(border: BorderInfo) | Sets the border styling for this floating box. |
getPadding() → MarginInfo | Returns the padding (internal margin) for this floating box. |
setPadding(padding: MarginInfo) | Sets the padding (internal margin) for this floating box. |
getMargin() → MarginInfo | Gets the margin information for this paragraph. |
setMargin(margin: MarginInfo) | Sets the margin information for this paragraph. |
getHorizontalAlignment() → HorizontalAlignment | Gets the horizontal alignment of this paragraph within its container. |
setHorizontalAlignment(horizontalAlignment: HorizontalAlignment) | Sets the horizontal alignment of this paragraph within its container. |
isInLineParagraph() → boolean | Returns whether this paragraph is an inline element. |
setInLineParagraph(inLineParagraph: boolean) | Sets whether this paragraph should be treated as an inline element. |
isKeptWithNext() → boolean | Returns 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() → boolean | Returns whether this paragraph is the first in its column. |
setFirstParagraphInColumn(firstParagraphInColumn: boolean) | Sets whether this paragraph is the first in its column. |
isInNewPage() → boolean | Returns 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() → Hyperlink | Returns 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. |