Package org.odftoolkit.simple.text.list

Examples of org.odftoolkit.simple.text.list.ListDecorator


  @Test
  public void testAddRemoveIterateList() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Table table = Table.newTable(doc, 3, 3);
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      ListContainer container = table.getCellByPosition(0, 0);
      org.odftoolkit.simple.text.list.List bulletList = container.addList(bulletDecorator);
View Full Code Here


  @Test
  public void testAddRemoveIterateList() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Table table = Table.newTable(doc, 3, 3);
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      ListContainer container = table.getCellByPosition(0, 0);
      org.odftoolkit.simple.text.list.List bulletList = container.addList(bulletDecorator);
View Full Code Here

  @Test
  public void testAddRemoveIterateSubList() {
    try {
      doc = PresentationDocument.loadDocument(ResourceUtilities
          .getTestResourceAsStream(TEST_PRESENTATION_FILE_MAIN));
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      Slide slide = doc.newSlide(0, "test0", Slide.SlideLayout.TITLE_OUTLINE);
      ListContainer container = slide.getNotesPage();
View Full Code Here

    try {
      TextDocument doc = TextDocument.newTextDocument();
      Section sect = doc.appendSection("List Section");

      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator outLineDecorator = new OutLineDecorator(doc);
      String[] subItemContents = { "sub list item 1", "sub list item 2",
          "sub list item 3" };

      List list1 = new List(sect);
      boolean removeResult = sect.removeList(list1);
View Full Code Here

    try {

      TextDocument doc = TextDocument.newTextDocument();
      Section sect = doc.appendSection("List Section");

      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator outLineDecorator = new OutLineDecorator(doc);
      String[] subItemContents = { "sub list item 1", "sub list item 2",
          "sub list item 3" };

      // create 2 lists
      new List(sect, numberDecorator);
View Full Code Here

  @Test
  public void testAddRemoveIterateList() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Table table = Table.newTable(doc, 3, 3);
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      ListContainer container = table.getCellByPosition(0, 0);
      org.odftoolkit.simple.text.list.List bulletList = container.addList(bulletDecorator);
View Full Code Here

  @Test
  public void testAddRemoveIterateSubList() {
    try {
      doc = PresentationDocument.loadDocument(ResourceUtilities
          .getTestResourceAsStream(TEST_PRESENTATION_FILE_MAIN));
      ListDecorator bulletDecorator = new BulletDecorator(doc);
      ListDecorator numberDecorator = new NumberDecorator(doc);
      ListDecorator imageDecorator = new ImageDecorator(doc, ResourceUtilities.getURI("image_list_item.png"));
      String[] numberItemContents = { "number item 1", "number item 2", "number item 3" };

      // add list.
      ListContainer container = doc.newSlide(0, "test0", Slide.SlideLayout.TITLE_OUTLINE);
      org.odftoolkit.simple.text.list.List bulletList = container.addList(bulletDecorator);
View Full Code Here

     
      //
      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 one");
      list2.addItem("test two");
      list2.addItem("test three");
View Full Code Here

      list3.addItem("Test line3");
      //
      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 one");
      list2.addItem("test two");
      list2.addItem("test three");
View Full Code Here

      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();
View Full Code Here

TOP

Related Classes of org.odftoolkit.simple.text.list.ListDecorator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.