Textbox extends Frame implements ListContainer, ParagraphContainer { public OdfElement getListContainerElement() { return getListContainerImpl().getListContainerElement(); } private  Textbox(DrawTextBoxElement textbox); static Textbox getInstanceof(DrawTextBoxElement element); static Textbox newTextbox(TextboxContainer container); void setTextContent(String content); void clearContent(); String getTextContent(); @Override DrawTextBoxElement getOdfElement(); List addList(); List addList(ListDecorator decorator); void clearList(); OdfElement getListContainerElement(); Iterator<List> getListIterator(); boolean removeList(List list); Paragraph addParagraph(String textContent); OdfElement getParagraphContainerElement(); boolean removeParagraph(Paragraph para); Paragraph getParagraphByIndex(int index, boolean isEmptyParagraphSkipped); Paragraph getParagraphByReverseIndex(int reverseIndex, boolean isEmptyParagraphSkipped); Iterator<Paragraph> getParagraphIterator();  }
@Test public void testGetListContainerElement() { try { PresentationDocument presentDoc = PresentationDocument.newPresentationDocument(); Slide slide1 = presentDoc.newSlide(1, "slide1", SlideLayout.TITLE_PLUS_2_TEXT_BLOCK); Textbox titleTextbox = slide1.getTextboxByUsage(PresentationDocument.PresentationClass.TITLE).get(0); Assert.assertNotNull(titleTextbox); titleTextbox.setTextContent("This is Title"); java.util.List<Textbox> boxList = slide1.getTextboxByUsage(PresentationDocument.PresentationClass.OUTLINE); Assert.assertNotNull(boxList); Assert.assertEquals(2, boxList.size()); Textbox leftTextbox = boxList.get(0); List list1 = leftTextbox.addList(); list1.addItem("Test outline1"); list1.addItem("Test outline2"); Textbox rightTextbox = boxList.get(1); Assert.assertNotNull(rightTextbox); ListDecorator decorator = new NumberDecorator(presentDoc); rightTextbox.setBackgroundColor(Color.RED); List list2 = rightTextbox.addList(decorator); list2.addItem("test AAA"); OdfElement odfEle = rightTextbox.getListContainerElement(); NodeList nodes = odfEle.getChildNodes(); for(int i=0;i<nodes.getLength();i++){ Node node = nodes.item(i); Assert.assertEquals("test AAA", node.getTextContent()); } presentDoc.save(ResourceUtilities.newTestOutputFile("abc.odp")); } catch (Exception e) { Logger.getLogger(TextBoxTest.class.getName()).log(Level.SEVERE, null, e); Assert.fail(); } }