public abstract class XWPFAbstractFootnoteEndnote extends java.lang.Object implements java.lang.Iterable<XWPFParagraph>, IBody
XWPFFootnote
and end notes
XWPFEndnote
).
The only significant difference between footnotes and end notes is which part they go on. Footnotes are managed by the Footnotes part XWPFFootnotes
and end notes are managed by the Endnotes part XWPFEndnotes
.
Modifier and Type | Field and Description |
---|---|
protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn |
ctFtnEdn |
protected XWPFDocument |
document |
protected XWPFAbstractFootnotesEndnotes |
footnotes |
Modifier | Constructor and Description |
---|---|
|
XWPFAbstractFootnoteEndnote() |
protected |
XWPFAbstractFootnoteEndnote(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn note, XWPFAbstractFootnotesEndnotes footnotes) |
protected |
XWPFAbstractFootnoteEndnote(XWPFDocument document, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn body) |
Modifier and Type | Method and Description |
---|---|
XWPFParagraph |
addNewParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP paragraph)
Add a new
XWPFParagraph to the end of the footnote.
(在脚注末尾添加一个新的 XWPFParagraph。)
|
XWPFTable |
addNewTbl(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table)
Add a new
XWPFTable to the end of the footnote.
(在脚注末尾添加一个新的 XWPFTable。)
|
XWPFParagraph |
createParagraph()
Appends a new
XWPFParagraph to this footnote.
(在此脚注中附加一个新的 XWPFParagraph。)
|
XWPFTable |
createTable()
Appends a new
XWPFTable to this footnote
(将新的 XWPFTable 附加到此脚注)
|
XWPFTable |
createTable(int rows, int cols)
Appends a new
XWPFTable to this footnote
(将新的 XWPFTable 附加到此脚注)
|
abstract void |
ensureFootnoteRef(XWPFParagraph p)
Ensure that the specified paragraph has a reference marker for this footnote by adding a footnote reference if one is not found.
(如果未找到脚注引用,请通过添加脚注引用来确保指定段落具有此脚注的引用标记。)
|
java.util.List<IBodyElement> |
getBodyElements()
Gets the body elements (
IBodyElement ) of the footnote.
(获取脚注的正文元素 (IBodyElement)。)
|
org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn |
getCTFtnEdn()
Gets the underlying CTFtnEdn object for the footnote.
(获取脚注的基础 CTFtnEdn 对象。)
|
java.math.BigInteger |
getId()
Get the ID of the footnote.
(获取脚注的 ID。)
|
POIXMLDocumentPart |
getOwner()
The owning object for this footnote
(此脚注的拥有对象)
|
XWPFParagraph |
getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
Returns the paragraph corresponding to the provided
CTP .
(返回与提供的 CTP 对应的段落。)
|
XWPFParagraph |
getParagraphArray(int pos)
Returns the
XWPFParagraph at position pos in footnote's paragraph array.
(返回脚注段落数组中位置 pos 的 XWPFParagraph。)
|
java.util.List<XWPFParagraph> |
getParagraphs()
Get the list of
XWPFParagraph s in the footnote.
(获取脚注中的 XWPFParagraphs 列表。)
|
POIXMLDocumentPart |
getPart()
Get the Part to which the footnote belongs, which you need for adding relationships to other parts
(获取脚注所属的Part,你需要添加到其他部分的关系)
|
BodyType |
getPartType()
Get the part type
BodyType of the footnote.
(获取脚注的部件类型 BodyType。)
|
java.util.List<XWPFPictureData> |
getPictures()
Gets the list of
XWPFPictureData s in the footnote.
(获取脚注中的 XWPFPitureDatas 列表。)
|
XWPFTable |
getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)
|
XWPFTable |
getTableArray(int pos)
Gets the
XWPFTable at the specified position from the footnote's table array.
(从脚注的表格数组中获取指定位置的 XWPFTable。)
|
XWPFTableCell |
getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
get the
XWPFTableCell that belongs to the CTTc cell.
(获取属于 CTTc 单元的 XWPFTableCell。)
|
java.util.List<XWPFTable> |
getTables()
Get the list of
XWPFTable s in the footnote.
(在脚注中获取 XWPFTables 列表。)
|
XWPFDocument |
getXWPFDocument()
Get the
XWPFDocument the footnote is part of.
(获取脚注所在的 XWPFDocument。)
|
protected void |
init() |
XWPFParagraph |
insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
Add a new
XWPFParagraph at position of the cursor.
(在光标位置添加一个新的 XWPFParagraph。)
|
XWPFTable |
insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
Insert a table constructed from OOXML table markup.
(插入由 OOXML 表标记构造的表。)
|
void |
insertTable(int pos, XWPFTable table)
Inserts an existing {@link XWPFTable) into the arrays bodyElements and tables.
(将现有的 {@link XWPFTable) 插入到数组 bodyElements 和表中。)
|
java.util.Iterator<XWPFParagraph> |
iterator()
Get an iterator over the
XWPFParagraph s in the footnote.
(获取脚注中 XWPFParagraphs 的迭代器。)
|
void |
setCTFtnEdn(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn footnote)
Set the underlying CTFtnEdn for the footnote.
(为脚注设置底层 CTFtnEdn。)
|
protected org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn ctFtnEdn
protected XWPFAbstractFootnotesEndnotes footnotes
protected XWPFDocument document
public XWPFAbstractFootnoteEndnote()
@Internal protected XWPFAbstractFootnoteEndnote(XWPFDocument document, org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn body)
@Internal protected XWPFAbstractFootnoteEndnote(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn note, XWPFAbstractFootnotesEndnotes footnotes)
protected void init()
public java.util.List<XWPFParagraph> getParagraphs()
XWPFParagraph
s in the footnote.
(获取脚注中的 XWPFParagraphs 列表。)
getParagraphs
in interface
IBody
(接口 IBody 中的 getParagraphs)
public java.util.Iterator<XWPFParagraph> iterator()
XWPFParagraph
s in the footnote.
(获取脚注中 XWPFParagraphs 的迭代器。)
iterator
in interface
java.lang.Iterable<XWPFParagraph>
(接口 java.lang.Iterable 中的迭代器
public java.util.List<XWPFTable> getTables()
XWPFTable
s in the footnote.
(在脚注中获取 XWPFTables 列表。)
public java.util.List<XWPFPictureData> getPictures()
XWPFPictureData
s in the footnote.
(获取脚注中的 XWPFPitureDatas 列表。)
public java.util.List<IBodyElement> getBodyElements()
IBodyElement
) of the footnote.
(获取脚注的正文元素 (IBodyElement)。)
getBodyElements
in interface
IBody
(接口 IBody 中的 getBodyElements)
public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn getCTFtnEdn()
public void setCTFtnEdn(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFtnEdn footnote)
Use XWPFDocument.createFootnote()
to create new footnotes.
footnote
- The CTFtnEdn object that will underly the footnote.
(footnote - 将作为脚注基础的 CTFtnEdn 对象。)
public XWPFTable getTableArray(int pos)
XWPFTable
at the specified position from the footnote's table array.
(从脚注的表格数组中获取指定位置的 XWPFTable。)
getTableArray
in interface
IBody
(接口 IBody 中的 getTableArray)
pos
- in table array
(pos - 在表数组中)
XWPFTable
at position pos, or null if there is no table at position pos.
(位置 pos 处的 XWPFTable,如果位置 pos 处没有表,则返回 null。)
IBody.getTableArray(int)
public void insertTable(int pos, XWPFTable table)
insertTable
in interface
IBody
(接口 IBody 中的 insertTable)
pos
- Position, in the bodyElements array, to insert the table
(pos - 在 bodyElements 数组中插入表格的位置)
table
- {@link XWPFTable) to be inserted
(表 - {@link XWPFTable) 要插入)
IBody.insertTable(int pos, XWPFTable table)
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, or null if there is no corresponding
XWPFTable
.
(如果该头的tableList中存在参数ctTable对应的XWPFTable,则该方法将返回该表,如果没有对应的XWPFTable,则返回null。)
getTable
in interface
IBody
(接口 IBody 中的 getTable)
ctTable
-
(ctTable -)
IBody.getTable(CTTbl ctTable)
public XWPFParagraph getParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP p)
IBody
CTP
.
(返回与提供的 CTP 对应的段落。)
getParagraph
in interface
IBody
(接口 IBody 中的 getParagraph)
p
- is instance of CTP and is searching for an XWPFParagraph
(p - 是 CTP 的实例,正在搜索 XWPFParagraph)
CTP
, or
null
if there is no corresponding paragraph in this body.
(与 CTP 对应的段落,如果此正文中没有对应的段落,则为 null。)
public XWPFParagraph getParagraphArray(int pos)
XWPFParagraph
at position pos in footnote's paragraph array.
(返回脚注段落数组中位置 pos 的 XWPFParagraph。)
getParagraphArray
in interface
IBody
(接口 IBody 中的 getParagraphArray)
pos
- Array position of the paragraph to get.
(pos - 要获取的段落的数组位置。)
XWPFParagraph
at position pos, or null if there is no paragraph at that position.
(位置 pos 的 XWPFParagraph,如果该位置没有段落,则返回 null。)
IBody.getParagraphArray(int pos)
public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)
XWPFTableCell
that belongs to the CTTc cell.
(获取属于 CTTc 单元的 XWPFTableCell。)
getTableCell
in interface
IBody
(接口 IBody 中的 getTableCell)
cell
-
(细胞 -)
XWPFTableCell
that corresponds to the CTTc cell, if there is one, otherwise null.
(XWPFTableCell 对应 CTTc 单元格,如果有,则为空。)
IBody.getTableCell(CTTc cell)
public POIXMLDocumentPart getOwner()
XWPFFootnotes
object that contains this footnote.
(包含此脚注的 XWPFFootnotes 对象。)
public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)
insertNewTbl
in interface
IBody
(接口 IBody 中的 insertNewTbl)
cursor
-
(光标 -)
XWPFTable
(插入的 XWPFTable)
IBody.insertNewTbl(XmlCursor cursor)
public XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)
XWPFParagraph
at position of the cursor.
(在光标位置添加一个新的 XWPFParagraph。)
insertNewParagraph
in interface
IBody
(接口 IBody 中的 insertNewParagraph)
cursor
-
(光标 -)
XWPFParagraph
(插入的 XWPFP 段落)
IBody.insertNewParagraph(XmlCursor cursor)
public XWPFTable addNewTbl(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl table)
XWPFTable
to the end of the footnote.
(在脚注末尾添加一个新的 XWPFTable。)
public XWPFParagraph addNewParagraph(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTP paragraph)
XWPFParagraph
to the end of the footnote.
(在脚注末尾添加一个新的 XWPFParagraph。)
paragraph
- CTP paragraph from which to construct the
XWPFParagraph
(段落 - 从中构造 XWPFParagraph 的 CTP 段落)
XWPFParagraph
(添加的 XWPFP 段落)
public XWPFDocument getXWPFDocument()
XWPFDocument
the footnote is part of.
(获取脚注所在的 XWPFDocument。)
getXWPFDocument
in interface
IBody
(接口 IBody 中的 getXWPFDocument)
IBody.getXWPFDocument()
public POIXMLDocumentPart getPart()
getPart
in interface
IBody
(接口 IBody 中的 getPart)
POIXMLDocumentPart
that contains the footnote.
(包含脚注的 POIXMLDocumentPart。)
IBody.getPart()
public BodyType getPartType()
BodyType
of the footnote.
(获取脚注的部件类型 BodyType。)
getPartType
in interface
IBody
(接口 IBody 中的 getPartType)
BodyType
value.
(BodyType 值。)
IBody.getPartType()
public java.math.BigInteger getId()
Footnote IDs are unique across all bottom-of-the-page and end note footnotes.
(获取脚注的 ID。脚注 ID 在所有页底脚注和尾注脚注中都是唯一的。)public XWPFParagraph createParagraph()
XWPFParagraph
to this footnote.
(在此脚注中附加一个新的 XWPFParagraph。)
XWPFParagraph
(新的 XWPFP 段落)
public abstract void ensureFootnoteRef(XWPFParagraph p)
This method is for the first paragraph in the footnote, not paragraphs that will refer to the footnote. For references to the footnote, use XWPFParagraph#addFootnoteReference(XWPFFootnote)
.
The first run of the first paragraph in a footnote should contain a CTFtnEdnRef
object.
p
- The
XWPFParagraph
to ensure
(p - XWPFP 段落以确保)
public XWPFTable createTable()
XWPFTable
to this footnote
(将新的 XWPFTable 附加到此脚注)
XWPFTable
(新的 XWPFTTable)
public XWPFTable createTable(int rows, int cols)
XWPFTable
to this footnote
(将新的 XWPFTable 附加到此脚注)
rows
- Number of rows to initialize the table with
(rows - 用于初始化表的行数)
cols
- Number of columns to initialize the table with
(cols - 用于初始化表的列数)
XWPFTable
with the specified number of rows and columns
(具有指定行数和列数的新 XWPFTable)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.