Examples of FrameRectangle


Examples of org.odftoolkit.simple.draw.FrameRectangle

  public void testHorizontalRelative() throws Exception{
      String content = "This is a text box";
    try {
      TextDocument textDoc = TextDocument.newTextDocument();
      Paragraph p = textDoc.addParagraph("paragraph");
      FrameRectangle frameR = new FrameRectangle(4.21, 1.32, 4.41, 3.92, SupportedLinearMeasure.IN);
     
      Textbox box = p.addTextbox(frameR);
      box.setName("tbox name");
      box.setTextContent(content);
     
View Full Code Here

Examples of org.odftoolkit.simple.draw.FrameRectangle

  public static void createForm() {
    try {
      TextDocument doc = TextDocument.newTextDocument();
      Form form = doc.createForm("Test Form");

      FormControl comboBox = form.createComboBox(doc, new FrameRectangle(
          0.7972, 1.2862, 2.4441, 0.2669, SupportedLinearMeasure.IN),
          "combo1", "dd", true);
      String[] items = { "aa", "bb", "cc", "dd", "ee", "ff", "gg", "hh",
          "ii", "jj" };
      ((ComboBox) comboBox).addItems(items);
View Full Code Here

Examples of org.odftoolkit.simple.draw.FrameRectangle

          break;
        }
      }
      Assert.assertNotNull(find);
      // change the bounding box
      find.setRectangle(new FrameRectangle(2.25455, 5, 3, 0.5,
          SupportedLinearMeasure.IN));
      Assert.assertEquals(3.0, find.getRectangle().getWidth());
      Assert.assertEquals(0.5, find.getRectangle().getHeight());
      Assert.assertEquals(5.0, find.getRectangle().getY());
      Assert.assertEquals(2.2546, find.getRectangle().getX());
View Full Code Here

Examples of org.odftoolkit.simple.draw.FrameRectangle

          break;
        }
      }
      Assert.assertNotNull(find);
      // change the bounding box
      find.setRectangle(new FrameRectangle(2.25455, 5, 3, 0.5,
          SupportedLinearMeasure.IN));
      Assert.assertEquals(3.0, find.getRectangle().getWidth());
      Assert.assertEquals(0.5, find.getRectangle().getHeight());
      Assert.assertEquals(5.0, find.getRectangle().getY());
      Assert.assertEquals(2.2546, find.getRectangle().getX());
View Full Code Here

Examples of org.odftoolkit.simple.draw.FrameRectangle

        TextPElement pElement = dom.newOdfElement(TextPElement.class);
        mCellElement.appendChild(pElement);
        newImage = Image.newImage(Paragraph.getInstanceof(pElement), imageUri);
      }
      if (imageUri != null) {
        FrameRectangle rect = newImage.getRectangle();
        double height = rect.getHeight();
        double width = rect.getWidth();
        long widthInMI = new Double(width / 100).longValue();
        Column column = getTableColumn();
        if (widthInMI > column.getWidth()) {
          column.setWidth(widthInMI);
        }
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.