|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.POIXMLDocumentPart
org.apache.poi.xwpf.usermodel.XWPFHeaderFooter
public abstract class XWPFHeaderFooter
Parent of XWPF headers and footers
| Field Summary |
|---|
| Fields inherited from class org.apache.poi.POIXMLDocumentPart |
|---|
DEFAULT_XML_OPTIONS |
| Constructor Summary | |
|---|---|
XWPFHeaderFooter(PackagePart part,
PackageRelationship rel)
|
|
| Method Summary | |
|---|---|
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr |
_getHdrFtr()
|
int |
addPicture(byte[] pictureData,
int format)
Adds a picture to the document. |
int |
addPicture(java.io.InputStream is,
int format)
Adds a picture to the document. |
PackageRelationship |
addPictureReference(byte[] pictureData,
int format)
Add the picture to drawing relations |
PackageRelationship |
addPictureReference(java.io.InputStream is,
int format)
Add the picture to drawing relations |
java.util.List |
getAllPackagePictures()
get all Pictures in this package |
java.util.List |
getAllPictures()
|
java.util.List |
getBodyElements()
Returns an Iterator with paragraphs and tables, in the order that they occur in the text. |
java.util.List |
getListParagraph()
get a List of all Paragraphs |
int |
getNextPicNameNumber(int format)
get the next free ImageNumber |
POIXMLDocumentPart |
getOwner()
|
XWPFParagraph |
getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
if there is a corresponding XWPFParagraph of the parameter ctTable in the paragraphList of this header or footer
the method will return this paragraph
if there is no corresponding XWPFParagraph the method will return null |
XWPFParagraph |
getParagraphArray(int pos)
Returns the paragraph that holds the text of the header or footer. |
java.util.List |
getParagraphs()
Returns the paragraph(s) that holds the text of the header or footer. |
XWPFPictureData |
getPictureDataByID(java.lang.String blipID)
returns the PictureData by blipID |
XWPFTable |
getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
if there is a corresponding XWPFTable of the parameter ctTable in the tableList of this header
the method will return this table
if there is no corresponding XWPFTable the method will return null |
XWPFTable |
getTableArray(int pos)
Returns the table at position pos |
XWPFTableCell |
getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
get the TableCell which belongs to the TableCell |
java.util.List |
getTables()
Return the table(s) that holds the text of the header or footer, for complex cases where a paragraph isn't used. |
java.lang.String |
getText()
Returns the textual content of the header/footer, by flattening out the text of its paragraph(s) |
XWPFParagraph |
insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
add a new paragraph at position of the cursor |
XWPFTable |
insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
inserts a new Table at the cursor position. |
void |
insertTable(int pos,
XWPFTable table)
inserts an existing XWPFTable to the arrays bodyElements and tables |
void |
readHdrFtr()
|
void |
setHeaderFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr headerFooter)
set a new headerFooter |
| Methods inherited from class org.apache.poi.POIXMLDocumentPart |
|---|
createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelations, removeRelation, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.poi.xwpf.usermodel.IBody |
|---|
getPart, getPartType |
| Constructor Detail |
|---|
public XWPFHeaderFooter(PackagePart part,
PackageRelationship rel)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr _getHdrFtr()
public java.util.List getBodyElements()
IBody
getBodyElements in interface IBodypublic java.util.List getParagraphs()
getParagraphs in interface IBody
public java.util.List getTables()
throws java.lang.ArrayIndexOutOfBoundsException
getTables in interface IBodyjava.lang.ArrayIndexOutOfBoundsExceptionpublic java.lang.String getText()
public void setHeaderFooter(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr headerFooter)
public XWPFTable getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
XWPFTable of the parameter ctTable in the tableList of this header
the method will return this table
if there is no corresponding XWPFTable the method will return null
getTable in interface IBodyctTable - public XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
XWPFParagraph of the parameter ctTable in the paragraphList of this header or footer
the method will return this paragraph
if there is no corresponding XWPFParagraph the method will return null
getParagraph in interface IBodyp - is instance of CTP and is searching for an XWPFParagraph
public XWPFParagraph getParagraphArray(int pos)
getParagraphArray in interface IBodypublic java.util.List getListParagraph()
XWPFParagraphpublic java.util.List getAllPictures()
public java.util.List getAllPackagePictures()
public int addPicture(java.io.InputStream is,
int format)
throws java.io.IOException
is - The stream to read image fromformat - The format of the picture.
getAllPictures() .
java.io.IOException
public int addPicture(byte[] pictureData,
int format)
pictureData - The picture bytesformat - The format of the picture.
getAllPictures() .public int getNextPicNameNumber(int format)
format -
public XWPFPictureData getPictureDataByID(java.lang.String blipID)
blipID -
java.lang.Exception
public PackageRelationship addPictureReference(byte[] pictureData,
int format)
pictureData - the picture bytesformat - the picture format
public PackageRelationship addPictureReference(java.io.InputStream is,
int format)
is - the stream to read picture data frompublic XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
insertNewParagraph in interface IBodycursor -
public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
IBody
insertNewTbl in interface IBodycursor -
public POIXMLDocumentPart getOwner()
public XWPFTable getTableArray(int pos)
getTableArray in interface IBodyIBody.getTableArray(int)
public void insertTable(int pos,
XWPFTable table)
insertTable in interface IBodypos - table - public void readHdrFtr()
public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
getTableCell in interface IBodycell -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||