Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.xwpf.usermodel
Class XWPFTableCell

    java.lang.Object
      org.apache.poi.xwpf.usermodel.XWPFTableCell

All Implemented Interfaces:
  IBody

    public class XWPFTableCell

extends java.lang.Object
implements IBody

Field Summary
`protected java.util.List<IBodyElement>` | `bodyElements`
`protected java.util.List<XWPFParagraph>` | `paragraphs`
`protected IBody` | `part`
`protected java.util.List<XWPFTable>` | `tables`

Constructor Summary
`XWPFTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell, XWPFTableRow tableRow, IBody part)` If a table cell does not include at least one block-level element, then this document shall be considered corrupt

Method Summary
`XWPFParagraph` | `addParagraph()` Add a Paragraph to this Table Cell
`void` | `addParagraph(XWPFParagraph p)` add a Paragraph to this TableCell
`java.util.List<IBodyElement>` | `getBodyElements()` returns an Iterator with paragraphs and tables
`org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc` | `getCTTc()`
`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 table 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 of position pos
`java.util.List<XWPFParagraph>` | `getParagraphs()` returns a list of paragraphs
`IBody` | `getPart()` get the to which the TableCell belongs
`BodyType` | `getPartType()` get the PartType of the body, for example DOCUMENT, HEADER, FOOTER, FOOTNOTE,
`XWPFTable` | `getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)` get a table by its CTTbl-Object
`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
`XWPFTableRow` | `getTableRow()`
`java.util.List<XWPFTable>` | `getTables()` Return the table(s) that holds the text of the IBodyPart, for complex cases where a paragraph isn't used.
`java.lang.String` | `getText()`
`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` | `removeParagraph(int pos)` removes a paragraph of this tablecell
`void` | `setParagraph(XWPFParagraph p)`
`void` | `setText(java.lang.String text)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### paragraphs

    protected java.util.List<XWPFParagraph> paragraphs

### tables

    protected java.util.List<XWPFTable> tables

### bodyElements

    protected java.util.List<IBodyElement> bodyElements

### part

    protected IBody part

Constructor Detail

### XWPFTableCell

    public XWPFTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell,
                         XWPFTableRow tableRow,
                         IBody part)

  If a table cell does not include at least one block-level element, then this document shall be considered corrupt

Method Detail

### getCTTc

    @Internal
    public org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc getCTTc()

### getBodyElements

    public java.util.List<IBodyElement> getBodyElements()

  returns an Iterator with paragraphs and tables

  Specified by:
    `getBodyElements` in interface `IBody`
  See Also:
    `IBody.getBodyElements()`

### setParagraph

    public void setParagraph(XWPFParagraph p)

### getParagraphs

    public java.util.List<XWPFParagraph> getParagraphs()

  returns a list of paragraphs

  Specified by:
    `getParagraphs` in interface `IBody`

### addParagraph

    public XWPFParagraph addParagraph()

  Add a Paragraph to this Table Cell

  Returns:
    The paragraph which was added

### addParagraph

    public void addParagraph(XWPFParagraph p)

  add a Paragraph to this TableCell

  Parameters:
    `p` - the paragaph which has to be added

### removeParagraph

    public void removeParagraph(int pos)

  removes a paragraph of this tablecell

  Parameters:
    `pos` -

### getParagraph

    public 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 table the method will return this paragraph if there is no corresponding `XWPFParagraph` the method will return null

  Specified by:
    `getParagraph` in interface `IBody`
  Parameters:
    `p` - is instance of CTP and is searching for an XWPFParagraph
  Returns:
    null if there is no XWPFParagraph with an corresponding CTPparagraph in the paragraphList of this table XWPFParagraph with the correspondig CTP p

### setText

    public void setText(java.lang.String text)

### getTableRow

    public XWPFTableRow getTableRow()

### insertNewParagraph

    public XWPFParagraph insertNewParagraph(org.apache.xmlbeans.XmlCursor cursor)

  add a new paragraph at position of the cursor

  Specified by:
    `insertNewParagraph` in interface `IBody`
  Parameters:
    `cursor` -
  Returns:
    the inserted paragraph

### insertNewTbl

    public XWPFTable insertNewTbl(org.apache.xmlbeans.XmlCursor cursor)

  Description copied from interface: `IBody`
  inserts a new Table at the cursor position.

  Specified by:
    `insertNewTbl` in interface `IBody`

### getParagraphArray

    public XWPFParagraph getParagraphArray(int pos)

  Description copied from interface: `IBody`
  Returns the paragraph that of position pos

  Specified by:
    `getParagraphArray` in interface `IBody`
  See Also:
    `IBody.getParagraphArray(int)`

### getPart

    public IBody getPart()

  get the to which the TableCell belongs

  Specified by:
    `getPart` in interface `IBody`
  Returns:
    the Part, to which the body belongs
  See Also:
    `IBody.getPart()`

### getPartType

    public BodyType getPartType()

  Description copied from interface: `IBody`
  get the PartType of the body, for example DOCUMENT, HEADER, FOOTER, FOOTNOTE,

  Specified by:
    `getPartType` in interface `IBody`
  Returns:
    the PartType of the body
  See Also:
    `IBody.getPartType()`

### getTable

    public XWPFTable getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl ctTable)

  get a table by its CTTbl-Object

  Specified by:
    `getTable` in interface `IBody`
  See Also:
    `IBody.getTable(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTbl)`

### getTableArray

    public XWPFTable getTableArray(int pos)

  Description copied from interface: `IBody`
  Returns the table at position pos

  Specified by:
    `getTableArray` in interface `IBody`
  See Also:
    `IBody.getTableArray(int)`

### getTables

    public java.util.List<XWPFTable> getTables()

  Description copied from interface: `IBody`
  Return the table(s) that holds the text of the IBodyPart, for complex cases where a paragraph isn't used.

  Specified by:
    `getTables` in interface `IBody`
  See Also:
    `IBody.getTables()`

### insertTable

    public void insertTable(int pos,
                            XWPFTable table)

  inserts an existing XWPFTable to the arrays bodyElements and tables

  Specified by:
    `insertTable` in interface `IBody`
  See Also:
    `IBody.insertTable(int, org.apache.poi.xwpf.usermodel.XWPFTable)`

### getText

    public java.lang.String getText()

### getTableCell

    public XWPFTableCell getTableCell(org.openxmlformats.schemas.wordprocessingml.x2006.main.CTTc cell)

  get the TableCell which belongs to the TableCell

  Specified by:
    `getTableCell` in interface `IBody`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2010 The Apache Software Foundation or its licensors, as applicable.