Package org.odftoolkit.simple.table

Examples of org.odftoolkit.simple.table.Cell.addParagraph()


  private void replace(ReplacementAction replacementAction) throws Exception {
    TextDocument docToReplaceIn = TextDocument.newTextDocument();
    Table newTable = docToReplaceIn.getTableBuilder().newTable(2, 2);
    Cell cell = newTable.getCellByPosition(0, 0);
    cell.addParagraph("<<ONE>>");
    cell.addParagraph("<<TWO>>");

    Map<String, String> replacements = new TreeMap<String, String>();
    replacements.put("<<ONE>>", "1");
    replacements.put("<<TWO>>", "2");
View Full Code Here


  private void replace(ReplacementAction replacementAction) throws Exception {
    TextDocument docToReplaceIn = TextDocument.newTextDocument();
    Table newTable = docToReplaceIn.getTableBuilder().newTable(2, 2);
    Cell cell = newTable.getCellByPosition(0, 0);
    cell.addParagraph("<<ONE>>");
    cell.addParagraph("<<TWO>>");

    Map<String, String> replacements = new TreeMap<String, String>();
    replacements.put("<<ONE>>", "1");
    replacements.put("<<TWO>>", "2");
View Full Code Here

      radiobutton.setCurrentSelected(true);
      radiobutton.setAnchorType(AnchorType.AS_CHARACTER);

      Table table1 = Table.newTable(doc, 2, 2);
      Cell cell = table1.getCellByPosition("B1");
      para = cell.addParagraph("Insert a check box here.");
      form.createRadioButton(para, radioRtg, "RadioGroup1",
          "RadioButton 4", "4");
      doc.save(ResourceUtilities
          .newTestOutputFile("TestCreateRadioButton.odt"));
View Full Code Here

      form2.createLabel(para, btnRtg, "Label", "Label");

      Form form3 = doc.createForm("Form3");
      Table table1 = Table.newTable(doc, 2, 2);
      Cell cell = table1.getCellByPosition("A1");
      para = cell.addParagraph("Insert a text box here.");
      form3.createTextBox(para, btnRtg, "Text Box", "TextBox", true);

      Assert.assertNotNull(doc.getFormByName("Form1"));

      doc.save(ResourceUtilities.newTestOutputFile("TestCreateForm.odt"));
View Full Code Here

      textBox.setAnchorType(AnchorType.TO_CHARACTER);

      // textbox3
      Table table = Table.newTable(doc, 2, 2);
      Cell cell = table.getCellByPosition("B1");
      para = cell.addParagraph("Insert a text box here.");
      form.createTextBox(para, textBoxRtg, "TextBox3", "TextBox3", false);
     
      doc.save(ResourceUtilities
          .newTestOutputFile("TestCreateTextBox.odt"));
View Full Code Here

      // list box3
      Table table = Table.newTable(doc, 2, 2);
      table.setTableName("Table");
      Cell cell = table.getCellByPosition("B1");
      para = cell.addParagraph("Insert a list box here.");
      form.createListBox(para, listBoxRtg, "list3", false, true);

      doc.save(ResourceUtilities
          .newTestOutputFile("TestCreateListBox.odt"));
View Full Code Here

      checkbox.setCurrentState(FormCheckboxState.CHECKED);
      checkbox.setAnchorType(AnchorType.AS_CHARACTER);

      Table table1 = Table.newTable(doc, 2, 2);
      Cell cell = table1.getCellByPosition("B1");
      para = cell.addParagraph("Insert a check box here.");
      form.createCheckBox(para, checkBoxRtg, "CheckBox 4", "CheckBox 4",
          "4");
      doc.save(ResourceUtilities
          .newTestOutputFile("TestCreateCheckbox.odt"));
View Full Code Here

      Paragraph para = doc.addParagraph("Insert a button here.");
      form.createButton(para, btnRtg, "Button3", "Push Button 3");

      Table table1 = Table.newTable(doc, 2, 2);
      Cell cell = table1.getCellByPosition("A1");
      para = cell.addParagraph("Insert a button here:");
      form.createButton(para, btnRtg, "Button4", "Push Button 4");

      doc.save(ResourceUtilities
          .newTestOutputFile("TestCreateButton.odt"));
View Full Code Here

      comboBox.setAnchorType(AnchorType.AS_CHARACTER);

      Table table = Table.newTable(doc, 2, 2);
      table.setTableName("Table");
      Cell cell = table.getCellByPosition("B1");
      para = cell.addParagraph("Insert a combo box here.");
      form.createComboBox(para, comboRtg, "combo3", "default text", true);

      doc.save(ResourceUtilities
          .newTestOutputFile("TestCreateComboBox.odt"));
View Full Code Here

      Paragraph para = doc.addParagraph("Insert a Label here.");
      form.createLabel(para, labelRtg, "Label3", "Label3");
      // label4
      Table table1 = Table.newTable(doc, 2, 2);
      Cell cell = table1.getCellByPosition("B1");
      para = cell.addParagraph("Insert a Label here.");
      form.createLabel(para, labelRtg, "Label4", "Label4");
      doc
          .save(ResourceUtilities
              .newTestOutputFile("TestCreateLabel.odt"));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.