aspose.pdf
Class FloatingBox

java.lang.Object
  extended by aspose.pdf.Paragraph
      extended by aspose.pdf.FloatingBox
All Implemented Interfaces:
java.lang.Cloneable

public class FloatingBox
extends Paragraph
implements java.lang.Cloneable

Represents a FloatingBox Paragraph in a Pdf document. FloatingBox is custom positioned.

Typical usages are the following:

[Java] Pdf pdf1 = new Pdf(); Section sec1 = pdf1.getSections().add(); FloatingBox box1 = new FloatingBox(108,80); sec1.getParagraphs().add(box1); box1.setBoxHorizontalPositioning(BoxHorizontalPositioningType.Margin); box1.setBoxHorizontalAlignment(BoxHorizontalAlignmentType.Right); box1.setBoxVerticalPositioning(BoxVerticalPositioningType.Page); box1.setBoxVerticalAlignment(BoxVerticalAlignmentType.Center); box1.getParagraphs().add(new Text("This is a test for floating text box.")); pdf1.save("d:/test/test.pdf"); [XML] <?xml version="1.0" encoding="utf-8" ?> <Pdf xmlns="Aspose.Pdf"> <Section> <FloatingBox Width="1.5inch" Height="80" BoxHorizontalPositioning="Margin" BoxHorizontalAlignment="Right" BoxVerticalPositioning="Page" BoxVerticalAlignment="Center"> <Text> <Segment>This is a test for floating text box.</Segment> </Text> </FloatingBox> </Section> </Pdf>


Nested Class Summary
 
Nested classes/interfaces inherited from class aspose.pdf.Paragraph
Paragraph.VerticalPositionInfo
 
Field Summary
 boolean IsInCanvas
           
 
Fields inherited from class aspose.pdf.Paragraph
isNeedAddToPage, isPositionProcessed, RealPageNumber, VerticalPosInfo
 
Constructor Summary
FloatingBox()
          Constructor - initializes a new instance of the FloatingBox class.
FloatingBox(float width, float height)
          Constructor - initializes a new instance of the FloatingBox class with specified width and height.
 
Method Summary
 java.lang.Object clone()
          Clones a new FloatingBox object.
 java.lang.Object completeClone()
          Clones a new FloatingBox object.
 Color getBackgroundColor()
          Gets a Color object that indicates the background color of the floating box.
 BorderInfo getBorder()
          Gets a BorderInfo object that indicates the border info of the floating box.
 float getBoxHeight()
          Gets a float value that indicates the height of the floating box.
 BoxHorizontalAlignmentType getBoxHorizontalAlignment()
          Gets a BoxHorizontalAlignmentType object that indicates the horizontal alignment type of the floating box.
 BoxHorizontalPositioningType getBoxHorizontalPositioning()
          Gets a BoxHorizontalPositioningType object that indicates the horizontal positioning type of the floating box.
 BoxVerticalAlignmentType getBoxVerticalAlignment()
          Gets a BoxVerticalAlignmentType object that indicates the vertical alignment type of the floating box.
 BoxVerticalPositioningType getBoxVerticalPositioning()
          Gets a BoxVerticalPositioningType object that indicates the vertical positioning type of the floating box.
 float getBoxWidth()
          Gets a float value that indicates the width of the floating box.
 boolean getIsNeedRepeating()
          Gets a boolean value that indicates whether the paragraph need to be repeated on next page.
 boolean getIsWidthSet()
          Gets a boolean value that indicates whether width has been set.
 MarginInfo getPadding()
          Gets a MarginInfo object that indicates the padding of the floating box.
 Paragraphs getParagraphs()
          Gets a Paragraphs collection that indicates all paragraphs in the cell.
 VerticalAlignmentType getTextVerticalAlignment()
          Gets a VerticalAlignmentType enum that indicates the vertical alignment type of all paragraphs in the floating box.
 VerticalTextRotationType getVerticalTextRotationAngle()
          Gets a VerticalTextRotationType object that indicates the text rotation angle in floating box or cells.
 int getZIndex()
          Gets an int value that indicates the Z-order of the floating box.
 void setBackgroundColor(Color value)
          Sets a Color object that indicates the background color of the floating box.
 void setBorder(BorderInfo value)
          Sets a BorderInfo object that indicates the border info of the floating box.
 void setBoxHeight(float value)
          Sets a float value that indicates the height of the floating box.
 void setBoxHorizontalAlignment(BoxHorizontalAlignmentType value)
          Sets a BoxHorizontalAlignmentType object that indicates the horizontal alignment type of the floating box.
 void setBoxHorizontalPositioning(BoxHorizontalPositioningType value)
          Sets a BoxHorizontalPositioningType object that indicates the horizontal positioning type of the floating box.
 void setBoxVerticalAlignment(BoxVerticalAlignmentType value)
          Sets a BoxVerticalAlignmentType object that indicates the vertical alignment type of the floating box.
 void setBoxVerticalPositioning(BoxVerticalPositioningType value)
          Sets a BoxVerticalPositioningType object that indicates the vertical positioning type of the floating box.
 void setBoxWidth(float value)
          Sets a float value that indicates the width of the floating box.
 void setIsNeedRepeating(boolean value)
          Sets a boolean value that indicates whether the paragraph need to be repeated on next page.
 void setIsWidthSet(boolean value)
          Sets a boolean value that indicates whether width has been set.
 void setPadding(MarginInfo value)
          Sets a MarginInfo object that indicates the padding of the floating box.
 void setParagraphs(Paragraphs value)
          Sets a Paragraphs collection that indicates all paragraphs in the cell.
 void setTextVerticalAlignment(VerticalAlignmentType value)
          Sets a VerticalAlignmentType enum that indicates the vertical alignment type of all paragraphs in the floating box.
 void setVerticalTextRotationAngle(VerticalTextRotationType value)
          Sets a VerticalTextRotationType object that indicates the text rotation angle in floating box or cells.
 void setZIndex(int value)
          Sets an int value that indicates the Z-order of the floating box.
 
Methods inherited from class aspose.pdf.Paragraph
getHeight, getID, getIsNeedAddToPage, getIsPositionGot, getIsPositionProcessed, getLeft, getMargin, getMayNeedReprocess, getNeedReprocess, getNextParagraphInHeading, getPageNumber, getParentCell, getPositioningType, getPosX, getPosY, getRealPageNumber, getReferenceParagraphID, getRefPara, getSection, getTop, getVerticalPosInfo, getWidth, isDisabled, isEndNote, isFirstParagraph, isFirstParagraphInColumn, isFootNote, isFootNoteProcessed, isInHeaderFooter, isInList, isKeptTogether, isKeptWithNext, isOnOddPage, setEndNote, setFootNoteProcessed, setHeight, setID, setIsDisabled, setIsFirstParagraph, setIsFirstParagraphInColumn, setIsFootNote, setIsInHeaderFooter, setIsInList, setIsKeptTogether, setIsKeptWithNext, setIsNeedAddToPage, setIsOnOddPage, setIsPositionGot, setIsPositionProcessed, setLeft, setMargin, setMayNeedReprocess, setNeedReprocess, setNextParagraphInHeading, setPageNumber, setParentCell, setParentIsTable, setPositioningType, setPosX, setPosY, setRealPageNumber, setReferenceParagraphID, setRefPara, setSection, setTop, setVerticalPosInfo, setWidth
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IsInCanvas

public boolean IsInCanvas
Constructor Detail

FloatingBox

public FloatingBox()
Constructor - initializes a new instance of the FloatingBox class.


FloatingBox

public FloatingBox(float width,
                   float height)
Constructor - initializes a new instance of the FloatingBox class with specified width and height.

Parameters:
width - The width of the box.
height - The height of the box.
Method Detail

getIsWidthSet

public boolean getIsWidthSet()
Gets a boolean value that indicates whether width has been set.

Returns:
A boolean value.

setIsWidthSet

public void setIsWidthSet(boolean value)
Sets a boolean value that indicates whether width has been set.

Parameters:
value - A boolean value.

getBoxWidth

public float getBoxWidth()
Gets a float value that indicates the width of the floating box.

Returns:
A float value.

setBoxWidth

public void setBoxWidth(float value)
Sets a float value that indicates the width of the floating box.

Parameters:
value - A float value.

getBoxHeight

public float getBoxHeight()
Gets a float value that indicates the height of the floating box.

Returns:
A float value.

setBoxHeight

public void setBoxHeight(float value)
Sets a float value that indicates the height of the floating box.

Parameters:
value - A float value.

getIsNeedRepeating

public boolean getIsNeedRepeating()
Gets a boolean value that indicates whether the paragraph need to be repeated on next page. Default value is false. The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.

Returns:
A boolean value.

setIsNeedRepeating

public void setIsNeedRepeating(boolean value)
Sets a boolean value that indicates whether the paragraph need to be repeated on next page. Default value is false.The attribute is only valid when the paragraph itself and the object its ReferenceParagraphID referred to both are included in RepeatingRows.

Parameters:
value - A boolean value.

getParagraphs

public Paragraphs getParagraphs()
Gets a Paragraphs collection that indicates all paragraphs in the cell.

Returns:
A Paragraphs object.

setParagraphs

public void setParagraphs(Paragraphs value)
Sets a Paragraphs collection that indicates all paragraphs in the cell.

Parameters:
value - A Paragraphs object.

getBoxHorizontalPositioning

public BoxHorizontalPositioningType getBoxHorizontalPositioning()
Gets a BoxHorizontalPositioningType object that indicates the horizontal positioning type of the floating box.

Returns:
A BoxHorizontalPositioningType object.

setBoxHorizontalPositioning

public void setBoxHorizontalPositioning(BoxHorizontalPositioningType value)
Sets a BoxHorizontalPositioningType object that indicates the horizontal positioning type of the floating box.

Parameters:
value - A BoxHorizontalPositioningType object.

getBoxVerticalPositioning

public BoxVerticalPositioningType getBoxVerticalPositioning()
Gets a BoxVerticalPositioningType object that indicates the vertical positioning type of the floating box.

Returns:
A BoxVerticalPositioningType object.

setBoxVerticalPositioning

public void setBoxVerticalPositioning(BoxVerticalPositioningType value)
Sets a BoxVerticalPositioningType object that indicates the vertical positioning type of the floating box.

Parameters:
value - A BoxVerticalPositioningType object.

getBoxHorizontalAlignment

public BoxHorizontalAlignmentType getBoxHorizontalAlignment()
Gets a BoxHorizontalAlignmentType object that indicates the horizontal alignment type of the floating box.

Returns:
A BoxHorizontalAlignmentType object.

setBoxHorizontalAlignment

public void setBoxHorizontalAlignment(BoxHorizontalAlignmentType value)
Sets a BoxHorizontalAlignmentType object that indicates the horizontal alignment type of the floating box.

Parameters:
value - A BoxHorizontalAlignmentType object.

getBoxVerticalAlignment

public BoxVerticalAlignmentType getBoxVerticalAlignment()
Gets a BoxVerticalAlignmentType object that indicates the vertical alignment type of the floating box.

Returns:
A BoxVerticalAlignmentType object.

setBoxVerticalAlignment

public void setBoxVerticalAlignment(BoxVerticalAlignmentType value)
Sets a BoxVerticalAlignmentType object that indicates the vertical alignment type of the floating box.

Parameters:
value - A BoxVerticalAlignmentType object.

getTextVerticalAlignment

public VerticalAlignmentType getTextVerticalAlignment()
Gets a VerticalAlignmentType enum that indicates the vertical alignment type of all paragraphs in the floating box.

Returns:
A VerticalAlignmentType object.

setTextVerticalAlignment

public void setTextVerticalAlignment(VerticalAlignmentType value)
Sets a VerticalAlignmentType enum that indicates the vertical alignment type of all paragraphs in the floating box.

Parameters:
value - A VerticalAlignmentType object.

getBorder

public BorderInfo getBorder()
Gets a BorderInfo object that indicates the border info of the floating box.

Returns:
A BorderInfo object.

setBorder

public void setBorder(BorderInfo value)
Sets a BorderInfo object that indicates the border info of the floating box.

Parameters:
value - A BorderInfo object.

getBackgroundColor

public Color getBackgroundColor()
Gets a Color object that indicates the background color of the floating box.

Returns:
A Color object.

setBackgroundColor

public void setBackgroundColor(Color value)
Sets a Color object that indicates the background color of the floating box.

Parameters:
value - A Color object.

getPadding

public MarginInfo getPadding()
Gets a MarginInfo object that indicates the padding of the floating box.

Returns:
A MarginInfo object.

setPadding

public void setPadding(MarginInfo value)
Sets a MarginInfo object that indicates the padding of the floating box.

Parameters:
value - A MarginInfo object.

getVerticalTextRotationAngle

public VerticalTextRotationType getVerticalTextRotationAngle()
Gets a VerticalTextRotationType object that indicates the text rotation angle in floating box or cells.

Returns:
A VerticalTextRotationType object.

setVerticalTextRotationAngle

public void setVerticalTextRotationAngle(VerticalTextRotationType value)
Sets a VerticalTextRotationType object that indicates the text rotation angle in floating box or cells.

Parameters:
value - A VerticalTextRotationType object.

getZIndex

public int getZIndex()
Gets an int value that indicates the Z-order of the floating box. A floating box with larger ZIndex will be placed over the floating box with smaller ZIndex. ZIndex can be negative. Floating box with negative ZIndex will be placed behind the text in the page.

Returns:
Z index

setZIndex

public void setZIndex(int value)
Sets an int value that indicates the Z-order of the floating box. A floating box with larger ZIndex will be placed over the floating box with smaller ZIndex. ZIndex can be negative. Floating box with negative ZIndex will be placed behind the text in the page.

Parameters:
value - An int value.

clone

public java.lang.Object clone()
Clones a new FloatingBox object. Paragraphs in the floating box are not cloned.

Overrides:
clone in class java.lang.Object
Returns:
The new FloatingBox object.

completeClone

public java.lang.Object completeClone()
Clones a new FloatingBox object. All members in the FloatingBox are cloned.

Returns:
The new FloatingBox object.