public class PdfDiv extends Object implements Element, Spaceable, IAccessibleElement
| Modifier and Type | Class and Description |
|---|---|
static class |
PdfDiv.FloatType |
static class |
PdfDiv.PositionType |
| Modifier and Type | Field and Description |
|---|---|
protected HashMap<PdfName,PdfObject> |
accessibleAttributes |
protected AccessibleElementId |
id |
protected PdfName |
role |
protected float |
spacingAfter
The spacing after the table.
|
protected float |
spacingBefore
The spacing before the table.
|
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 and Description |
|---|
PdfDiv() |
| Modifier and Type | Method and Description |
|---|---|
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() |
AccessibleElementId |
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() |
float |
getYLine() |
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(AccessibleElementId 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.
|
protected PdfName role
protected AccessibleElementId id
protected float spacingBefore
protected float spacingAfter
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 float getYLine()
public int type()
public boolean isContent()
ElementisContent in interface ElementElement.isContent()public boolean isNestable()
ElementisNestable in interface ElementElement.isNestable()public boolean process(ElementListener listener)
ElementListener.public void setSpacingBefore(float spacing)
setSpacingBefore in interface Spaceablespacing - the new spacingpublic void setSpacingAfter(float spacing)
setSpacingAfter in interface Spaceablespacing - the new spacingpublic float getSpacingBefore()
getSpacingBefore in interface Spaceablepublic float getSpacingAfter()
getSpacingAfter in interface Spaceablepublic 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 int layout(PdfContentByte canvas, boolean useAscender, boolean simulate, float llx, float lly, float urx, float ury) throws DocumentException
DocumentExceptionpublic PdfObject getAccessibleAttribute(PdfName key)
IAccessibleElementA dictionary + Lang, Alt, ActualText, E).getAccessibleAttribute in interface IAccessibleElementpublic void setAccessibleAttribute(PdfName key, PdfObject value)
IAccessibleElementA dictionary + Lang, Alt, ActualText, E).setAccessibleAttribute in interface IAccessibleElementpublic HashMap<PdfName,PdfObject> getAccessibleAttributes()
IAccessibleElementgetAccessibleAttributes in interface IAccessibleElementpublic PdfName getRole()
IAccessibleElementgetRole in interface IAccessibleElementpublic void setRole(PdfName role)
IAccessibleElementnull if you don't want to tag this element.
Note that all child elements won't also be tagged.setRole in interface IAccessibleElementpublic AccessibleElementId getId()
getId in interface IAccessibleElementpublic void setId(AccessibleElementId id)
setId in interface IAccessibleElementCopyright © 2013. All rights reserved.