Module org.sejda.sambox
Class PDTableAttributeObject
java.lang.Object
org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
org.sejda.sambox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
org.sejda.sambox.pdmodel.documentinterchange.taggedpdf.PDStandardAttributeObject
org.sejda.sambox.pdmodel.documentinterchange.taggedpdf.PDTableAttributeObject
- All Implemented Interfaces:
COSObjectable
A Table attribute object.
- Author:
- Johannes Koch
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringstatic final Stringstandard attribute owner: Tableprotected static final Stringprotected static final Stringstatic final StringScope: Bothstatic final StringScope: Columnstatic final StringScope: Rowprotected static final StringFields inherited from class org.sejda.sambox.pdmodel.documentinterchange.taggedpdf.PDStandardAttributeObject
UNSPECIFIED -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PDTableAttributeObject(COSDictionary dictionary) Creates a new Table attribute object with a given dictionary. -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of columns in the enclosing table that shall be spanned by the cell (ColSpan).String[]Gets the headers (Headers).intGets the number of rows in the enclosing table that shall be spanned by the cell (RowSpan).getScope()Gets the scope (Scope).Gets the summary of the table’s purpose and structure.voidsetColSpan(int colSpan) Sets the number of columns in the enclosing table that shall be spanned by the cell (ColSpan).voidsetHeaders(String[] headers) Sets the headers (Headers).voidsetRowSpan(int rowSpan) Sets the number of rows in the enclosing table that shall be spanned by the cell (RowSpan).voidSets the scope (Scope).voidsetSummary(String summary) Sets the summary of the table’s purpose and structure.toString()Methods inherited from class org.sejda.sambox.pdmodel.documentinterchange.taggedpdf.PDStandardAttributeObject
getArrayOfString, getColor, getColorOrFourColors, getInteger, getName, getName, getNameOrArrayOfName, getNumber, getNumber, getNumberOrArrayOfNumber, getNumberOrName, getString, isSpecified, setArrayOfName, setArrayOfNumber, setArrayOfString, setColor, setFourColors, setInteger, setName, setNumber, setNumber, setStringMethods inherited from class org.sejda.sambox.pdmodel.documentinterchange.logicalstructure.PDAttributeObject
arrayToString, arrayToString, create, getOwner, isEmpty, notifyChanged, potentiallyNotifyChanged, setOwner, setStructureElementMethods inherited from class org.sejda.sambox.pdmodel.common.PDDictionaryWrapper
equals, getCOSObject, hashCode
-
Field Details
-
OWNER_TABLE
standard attribute owner: Table- See Also:
-
ROW_SPAN
- See Also:
-
COL_SPAN
- See Also:
-
HEADERS
- See Also:
-
SCOPE
- See Also:
-
SUMMARY
- See Also:
-
SCOPE_BOTH
Scope: Both- See Also:
-
SCOPE_COLUMN
Scope: Column- See Also:
-
SCOPE_ROW
Scope: Row- See Also:
-
-
Constructor Details
-
PDTableAttributeObject
public PDTableAttributeObject()Default constructor. -
PDTableAttributeObject
Creates a new Table attribute object with a given dictionary.- Parameters:
dictionary- the dictionary
-
-
Method Details
-
getRowSpan
public int getRowSpan()Gets the number of rows in the enclosing table that shall be spanned by the cell (RowSpan). The default value is 1.- Returns:
- the row span
-
setRowSpan
public void setRowSpan(int rowSpan) Sets the number of rows in the enclosing table that shall be spanned by the cell (RowSpan).- Parameters:
rowSpan- the row span
-
getColSpan
public int getColSpan()Gets the number of columns in the enclosing table that shall be spanned by the cell (ColSpan). The default value is 1.- Returns:
- the column span
-
setColSpan
public void setColSpan(int colSpan) Sets the number of columns in the enclosing table that shall be spanned by the cell (ColSpan).- Parameters:
colSpan- the column span
-
getHeaders
Gets the headers (Headers). An array of byte strings, where each string shall be the element identifier (see thePDStructureElement.getElementIdentifier()) for a TH structure element that shall be used as a header associated with this cell.- Returns:
- the headers.
-
setHeaders
Sets the headers (Headers). An array of byte strings, where each string shall be the element identifier (see thePDStructureElement.getElementIdentifier()) for a TH structure element that shall be used as a header associated with this cell.- Parameters:
headers- the headers
-
getScope
Gets the scope (Scope). It shall reflect whether the header cell applies to the rest of the cells in the row that contains it, the column that contains it, or both the row and the column that contain it.- Returns:
- the scope
-
setScope
Sets the scope (Scope). It shall reflect whether the header cell applies to the rest of the cells in the row that contains it, the column that contains it, or both the row and the column that contain it. The value shall be one of the following:SCOPE_ROW,SCOPE_COLUMN, orSCOPE_BOTH.
- Parameters:
scope- the scope
-
getSummary
Gets the summary of the table’s purpose and structure.- Returns:
- the summary
-
setSummary
Sets the summary of the table’s purpose and structure.- Parameters:
summary- the summary
-
toString
- Overrides:
toStringin classPDAttributeObject
-