|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.aspose.pdf.elements.PdfElementBase
com.aspose.pdf.elements.Paragraph
com.aspose.pdf.elements.Table
Represents a table Paragraph in a Pdf document.
Constructor Summary | |
Table(Section section)
Initialize a new instance of the Table class. |
Method Summary | |
Color |
getBackgroundColor()
Gets Color object that indicates the background color of the table. |
BorderInfo |
getBorder()
Gets a BorderInfo object that indicates the table border info. |
java.lang.String |
getColumnWidths()
Gets a string that contains the width of each columns in this table. |
int |
getDefaultCellAlignmentType()
Gets a default AlignmentType that indicates the cell alignment type. |
BorderInfo |
getDefaultCellBorder()
Gets a BorderInfo object that indicates the default border style for all cells in this table. |
MarginInfo |
getDefaultCellPadding()
Gets a MarginInfo object that indicates the default cell padding in the table. |
TextInfo |
getDefaultCellTextInfo()
Gets a TextInfo object that indicates the default cell text format info. |
org.w3c.dom.Element |
getDOMElement()
Gets a DOM representation of the pdf element. |
float |
getFixedWidth()
Gets a float value that indicates the fixed width of the table. |
Rows |
getRows()
Gets a Rows collection that indicates all rows in the table. |
java.lang.String |
getVerticalAlignment()
Gets a VerticalAlignmentType that indicates the vertical alignment type. |
boolean |
isBroken()
Gets a bool value that indicates whether the table is broken or not. |
boolean |
isFirstRowRepeated()
Gets a bool value that indicates whether the first row is repeated when its table is broken. |
boolean |
isRowBroken()
Gets a bool value that indicates whether the row can be broken or not when its table is broken. |
boolean |
isSingleHeaderShown()
A bool value that indicates whether table with only a header (IsFirstRowRepeated=true and Rows.Count=1) be shown. |
void |
setBackgroundColor(Color color)
Sets a Color object that indicates the background color of the table. |
void |
setBorder(BorderInfo border)
Sets a BorderInfo object that indicates the table border info. |
void |
setColumnWidths(java.lang.String widths)
Sets a string that contains the width of each columns in this table. |
void |
setDefaultCellAlignmentType(int type)
Sets a default AlignmentType that indicates the cell alignment type. |
void |
setDefaultCellBorder(BorderInfo cellBorder)
Sets a BorderInfo object that indicates the default border style for all cells in this table. |
void |
setDefaultCellPadding(MarginInfo cellPadding)
Sets a MarginInfo object that indicates the default cell padding in the table. |
void |
setDefaultCellTextInfo(TextInfo defaultCellTextInfo)
Sets a TextInfo object that indicates the default cell text format info. |
void |
setFixedWidth(float width)
sets a float value that indicates the fixed width of the table. |
void |
setIsBroken(boolean broken)
Sets a bool value that indicates whether the table is broken or not. |
void |
setIsFirstRowRepeated(boolean firstRowRepeated)
Sets a bool value that indicates whether the first row is repeated when its table is broken. |
void |
setIsRowBroken(boolean rowBroken)
Sets a bool value that indicates whether the row can be broken or not when its table is broken. |
void |
setIsSingleHeaderShown(boolean singleHeaderShown)
A bool value that indicates whether table with only a header (IsFirstRowRepeated=true and Rows.Count=1) be shown. |
void |
setVerticalAlignment(java.lang.String alignmentType)
Sets a VerticalAlignmentType that indicates the vertical alignment type. |
Methods inherited from class com.aspose.pdf.elements.Paragraph |
clone, getLeft, getMargin, getTop, isDisabled, isFirstParagraph, isKeptTogether, isOnOddPage, setDisabled, setFirstParagraph, setKeptTogether, setLeft, setMargin, setOnOddPage, setTop |
Methods inherited from class com.aspose.pdf.elements.PdfElementBase |
getElementFactory, getID, getNameIndex, setID |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Table(Section section)
[SampleCode] Pdf pdf = new Pdf(); Section sec1 = pdf.getSections().add(); Table table = new Table(sec1); table.setColumnWidths(new float[]{150,150}); Row row1 = new Row(table); table.getRows().add(row1); Text someText = new Text(sec1,"some text"); Cell cell11 = new Cell(table); cell11.getParagraphs().add(someText); row1.getCells().add(cell11); Text otherText = new Text(sec1,"some more text"); Cell cell12 = new Cell(table); cell12.getParagraphs().add(otherText); row1.getCells().add(cell12);
section
- The section that owns the Table paragraph.Method Detail |
public Rows getRows()
public MarginInfo getDefaultCellPadding()
public void setDefaultCellPadding(MarginInfo cellPadding)
public Color getBackgroundColor()
public void setBackgroundColor(Color color)
color
- The backgroundColor to set.public int getDefaultCellAlignmentType()
public void setDefaultCellAlignmentType(int type)
public BorderInfo getDefaultCellBorder()
public void setDefaultCellBorder(BorderInfo cellBorder)
public TextInfo getDefaultCellTextInfo()
public void setDefaultCellTextInfo(TextInfo defaultCellTextInfo)
defaultCellTextInfo
- The Default Cell TextInfo to set.public java.lang.String getColumnWidths()
public void setColumnWidths(java.lang.String widths)
widths
- The column Widths to set.public java.lang.String getVerticalAlignment()
public void setVerticalAlignment(java.lang.String alignmentType)
VerticalAlignmentType
public BorderInfo getBorder()
public void setBorder(BorderInfo border)
border
- The Table BorderInfo to set.public boolean isSingleHeaderShown()
public void setIsSingleHeaderShown(boolean singleHeaderShown)
public boolean isBroken()
public void setIsBroken(boolean broken)
broken
- The IsBroken to set.public boolean isFirstRowRepeated()
public void setIsFirstRowRepeated(boolean firstRowRepeated)
firstRowRepeated
- The IsFirstRowRepeated to set.public boolean isRowBroken()
public void setIsRowBroken(boolean rowBroken)
rowBroken
- The IsRowBroken to set.public org.w3c.dom.Element getDOMElement() throws AsposeBaseException
PdfElementBase
getDOMElement
in class Paragraph
AsposeBaseException
PdfElementBase.getDOMElement()
public float getFixedWidth()
public void setFixedWidth(float width)
width
- The FixedWidth to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |