|
||||||||||
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 | |
---|---|
protected java.util.List<IBodyElement> |
bodyElements
|
protected XWPFDocument |
document
|
protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr |
headerFooter
|
protected java.util.List<XWPFParagraph> |
paragraphs
|
protected java.util.List<XWPFPictureData> |
pictures
|
protected java.util.List<XWPFTable> |
tables
|
Fields inherited from class org.apache.poi.POIXMLDocumentPart |
---|
DEFAULT_XML_OPTIONS |
Constructor Summary | |
---|---|
protected |
XWPFHeaderFooter()
|
|
XWPFHeaderFooter(POIXMLDocumentPart parent,
PackagePart part,
PackageRelationship rel)
|
protected |
XWPFHeaderFooter(XWPFDocument doc,
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr hdrFtr)
|
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<XWPFPictureData> |
getAllPackagePictures()
get all Pictures in this package |
java.util.List<XWPFPictureData> |
getAllPictures()
|
java.util.List<IBodyElement> |
getBodyElements()
Returns an Iterator with paragraphs and tables, in the order that they occur in the text. |
java.util.List<XWPFParagraph> |
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<XWPFParagraph> |
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<XWPFTable> |
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) |
XWPFDocument |
getXWPFDocument()
Return XWPFDocument |
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 |
---|
addRelation, commit, createRelationship, createRelationship, createRelationship, getPackagePart, getPackageRelationship, getParent, getRelations, onDocumentCreate, onDocumentRead, onSave, read, rebase, removeRelation, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.poi.xwpf.usermodel.IBody |
---|
getPart, getPartType |
Field Detail |
---|
protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr headerFooter
protected java.util.List<XWPFParagraph> paragraphs
protected java.util.List<XWPFTable> tables
protected java.util.List<XWPFPictureData> pictures
protected XWPFDocument document
protected java.util.List<IBodyElement> bodyElements
Constructor Detail |
---|
protected XWPFHeaderFooter(XWPFDocument doc, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr hdrFtr)
protected XWPFHeaderFooter()
public XWPFHeaderFooter(POIXMLDocumentPart parent, PackagePart part, PackageRelationship rel) throws java.io.IOException
java.io.IOException
Method Detail |
---|
@Internal public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTHdrFtr _getHdrFtr()
public java.util.List<IBodyElement> getBodyElements()
IBody
getBodyElements
in interface IBody
public java.util.List<XWPFParagraph> getParagraphs()
getParagraphs
in interface IBody
public java.util.List<XWPFTable> getTables() throws java.lang.ArrayIndexOutOfBoundsException
getTables
in interface IBody
java.lang.ArrayIndexOutOfBoundsException
public 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 IBody
ctTable
- 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 IBody
p
- is instance of CTP and is searching for an XWPFParagraph
public XWPFParagraph getParagraphArray(int pos)
getParagraphArray
in interface IBody
public java.util.List<XWPFParagraph> getListParagraph()
XWPFParagraph
public java.util.List<XWPFPictureData> getAllPictures()
public java.util.List<XWPFPictureData> 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 formatpublic 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 IBody
cursor
-
public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
IBody
insertNewTbl
in interface IBody
cursor
-
public POIXMLDocumentPart getOwner()
public XWPFTable getTableArray(int pos)
getTableArray
in interface IBody
IBody.getTableArray(int)
public void insertTable(int pos, XWPFTable table)
insertTable
in interface IBody
pos
- table
- public void readHdrFtr()
public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
getTableCell
in interface IBody
cell
- public XWPFDocument getXWPFDocument()
IBody
getXWPFDocument
in interface IBody
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |