|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.itextpdf.text.pdf.PdfDiv
public class PdfDiv
A special element to put a collection of elements at an absolute position.
Nested Class Summary | |
---|---|
static class |
PdfDiv.FloatType
|
static class |
PdfDiv.PositionType
|
Field Summary | |
---|---|
protected HashMap<PdfName,PdfObject> |
accessibleAttributes
|
protected UUID |
id
|
protected PdfName |
role
|
protected float |
spacingAfter
The spacing after the table. |
protected float |
spacingBefore
The spacing before the table. |
Fields inherited from interface com.itextpdf.text.Element |
---|
ALIGN_BASELINE, ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_JUSTIFIED, ALIGN_JUSTIFIED_ALL, ALIGN_LEFT, ALIGN_MIDDLE, ALIGN_RIGHT, ALIGN_TOP, ALIGN_UNDEFINED, ANCHOR, ANNOTATION, AUTHOR, CCITT_BLACKIS1, CCITT_ENCODEDBYTEALIGN, CCITT_ENDOFBLOCK, CCITT_ENDOFLINE, CCITTG3_1D, CCITTG3_2D, CCITTG4, CHAPTER, CHUNK, CREATIONDATE, CREATOR, DIV, HEADER, IMGRAW, IMGTEMPLATE, JBIG2, JPEG, JPEG2000, KEYWORDS, LANGUAGE, LIST, LISTITEM, MARKED, PARAGRAPH, PHRASE, PRODUCER, PTABLE, RECTANGLE, SECTION, SUBJECT, TITLE, WRITABLE_DIRECT, YMARK |
Constructor Summary | |
---|---|
PdfDiv()
|
Method Summary | |
---|---|
void |
addElement(Element element)
|
PdfObject |
getAccessibleAttribute(PdfName key)
Get the attribute of accessible element (everything in A dictionary + Lang , Alt , ActualText , E ). |
HashMap<PdfName,PdfObject> |
getAccessibleAttributes()
Gets all the properties of accessible element. |
float |
getActualHeight()
|
float |
getActualWidth()
|
BaseColor |
getBackgroundColor()
|
Float |
getBottom()
|
List<Chunk> |
getChunks()
Gets all the chunks in this element. |
ArrayList<Element> |
getContent()
|
float |
getContentHeight()
|
float |
getContentWidth()
|
PdfDiv.FloatType |
getFloatType()
|
Float |
getHeight()
|
UUID |
getId()
|
Float |
getLeft()
|
float |
getPaddingBottom()
|
float |
getPaddingLeft()
|
float |
getPaddingRight()
|
float |
getPaddingTop()
|
Float |
getPercentageHeight()
|
Float |
getPercentageWidth()
|
PdfDiv.PositionType |
getPosition()
|
Float |
getRight()
|
PdfName |
getRole()
Gets the role of the accessible element. |
float |
getSpacingAfter()
Gets the spacing after this table. |
float |
getSpacingBefore()
Gets the spacing before this table. |
int |
getTextAlignment()
Gets the alignment of this paragraph. |
Float |
getTop()
|
Float |
getWidth()
|
boolean |
isContent()
Checks if this element is a content object. |
boolean |
isNestable()
Checks if this element is nestable. |
int |
layout(PdfContentByte canvas,
boolean useAscender,
boolean simulate,
float llx,
float lly,
float urx,
float ury)
|
boolean |
process(ElementListener listener)
Processes the element by adding it (or the different parts) to an ElementListener . |
void |
setAccessibleAttribute(PdfName key,
PdfObject value)
Set the attribute of accessible element (everything in A dictionary + Lang , Alt , ActualText , E ). |
void |
setBackgroundColor(BaseColor backgroundColor)
|
void |
setBottom(Float bottom)
|
void |
setContent(ArrayList<Element> content)
|
void |
setContentHeight(float contentHeight)
|
void |
setContentWidth(float contentWidth)
|
void |
setFloatType(PdfDiv.FloatType floatType)
|
void |
setHeight(Float height)
|
void |
setId(UUID id)
|
void |
setLeft(Float left)
|
void |
setPaddingBottom(float paddingBottom)
|
void |
setPaddingLeft(float paddingLeft)
|
void |
setPaddingRight(float paddingRight)
|
void |
setPaddingTop(float paddingTop)
|
void |
setPercentageHeight(Float percentageHeight)
|
void |
setPercentageWidth(Float percentageWidth)
|
void |
setPosition(PdfDiv.PositionType position)
|
void |
setRight(Float right)
|
void |
setRole(PdfName role)
Sets the role of the accessiblee element. |
void |
setSpacingAfter(float spacing)
Sets the spacing after this table. |
void |
setSpacingBefore(float spacing)
Sets the spacing before this table. |
void |
setTextAlignment(int textAlignment)
Sets the alignment of this paragraph. |
void |
setTop(Float top)
|
void |
setWidth(Float width)
|
int |
type()
Gets the type of the text element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.itextpdf.text.Element |
---|
toString |
Field Detail |
---|
protected PdfName role
protected HashMap<PdfName,PdfObject> accessibleAttributes
protected UUID id
protected float spacingBefore
protected float spacingAfter
Constructor Detail |
---|
public PdfDiv()
Method Detail |
---|
public float getContentWidth()
public void setContentWidth(float contentWidth)
public float getContentHeight()
public void setContentHeight(float contentHeight)
public float getActualHeight()
public float getActualWidth()
public Float getPercentageHeight()
public void setPercentageHeight(Float percentageHeight)
public Float getPercentageWidth()
public void setPercentageWidth(Float percentageWidth)
public BaseColor getBackgroundColor()
public void setBackgroundColor(BaseColor backgroundColor)
public List<Chunk> getChunks()
getChunks
in interface Element
ArrayList
public int type()
type
in interface Element
public boolean isContent()
Element
isContent
in interface Element
Element.isContent()
public boolean isNestable()
Element
isNestable
in interface Element
Element.isNestable()
public boolean process(ElementListener listener)
ElementListener
.
process
in interface Element
listener
- an ElementListener
true
if the element was processed successfullypublic void setSpacingBefore(float spacing)
setSpacingBefore
in interface Spaceable
spacing
- the new spacingpublic void setSpacingAfter(float spacing)
setSpacingAfter
in interface Spaceable
spacing
- the new spacingpublic float getSpacingBefore()
getSpacingBefore
in interface Spaceable
public float getSpacingAfter()
getSpacingAfter
in interface Spaceable
public int getTextAlignment()
public void setTextAlignment(int textAlignment)
textAlignment
- the new alignmentpublic void addElement(Element element)
public Float getLeft()
public void setLeft(Float left)
public Float getRight()
public void setRight(Float right)
public Float getTop()
public void setTop(Float top)
public Float getBottom()
public void setBottom(Float bottom)
public Float getWidth()
public void setWidth(Float width)
public Float getHeight()
public void setHeight(Float height)
public float getPaddingLeft()
public void setPaddingLeft(float paddingLeft)
public float getPaddingRight()
public void setPaddingRight(float paddingRight)
public float getPaddingTop()
public void setPaddingTop(float paddingTop)
public float getPaddingBottom()
public void setPaddingBottom(float paddingBottom)
public PdfDiv.FloatType getFloatType()
public void setFloatType(PdfDiv.FloatType floatType)
public PdfDiv.PositionType getPosition()
public void setPosition(PdfDiv.PositionType position)
public ArrayList<Element> getContent()
public void setContent(ArrayList<Element> content)
public int layout(PdfContentByte canvas, boolean useAscender, boolean simulate, float llx, float lly, float urx, float ury) throws DocumentException
DocumentException
public PdfObject getAccessibleAttribute(PdfName key)
IAccessibleElement
A
dictionary + Lang
, Alt
, ActualText
, E
).
getAccessibleAttribute
in interface IAccessibleElement
public void setAccessibleAttribute(PdfName key, PdfObject value)
IAccessibleElement
A
dictionary + Lang
, Alt
, ActualText
, E
).
setAccessibleAttribute
in interface IAccessibleElement
public HashMap<PdfName,PdfObject> getAccessibleAttributes()
IAccessibleElement
getAccessibleAttributes
in interface IAccessibleElement
public PdfName getRole()
IAccessibleElement
getRole
in interface IAccessibleElement
public void setRole(PdfName role)
IAccessibleElement
null
if you don't want to tag this element.
Note that all child elements won't also be tagged.
setRole
in interface IAccessibleElement
public UUID getId()
getId
in interface IAccessibleElement
public void setId(UUID id)
setId
in interface IAccessibleElement
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |