Package org.pdfclown.documents.contents.composition

Examples of org.pdfclown.documents.contents.composition.PrimitiveComposer.showText()


          false,
          false
          ),
        getFontSize()
        );
      composer.showText(
        (String)field.getValue(),
        new Point2D.Double(0,size.getHeight()/2),
        AlignmentXEnum.Left,
        AlignmentYEnum.Middle,
        0
View Full Code Here


        getFontSize()
        );
      double y = 3;
      for(ChoiceItem item : field.getItems())
      {
        composer.showText(
          item.getText(),
          new Point2D.Double(0,y)
          );
        y += getFontSize() * 1.175;
        if(y > size.getHeight())
View Full Code Here

    // Set the color to fill the text characters!
    composer.setFillColor(
      new DeviceRGBColor(115f/255, 164f/255, 232f/255)
      );
    // Show the text!
    composer.showText(
      "PDFClown", // Text to show.
      new Point2D.Double(size.getWidth()/2d,size.getHeight()/2d), // Anchor location: page center.
      AlignmentXEnum.Center, // Horizontal placement (relative to the anchor): center.
      AlignmentYEnum.Middle, // Vertical placement (relative to the anchor): middle.
      50 // Rotation: 50-degree-counterclockwise.
View Full Code Here

        false
        ),
      120
      );
    // Show the text!
    composer.showText(
      "PDFClown",
      new Point2D.Double(
        0,
        templateSize.getHeight() - composer.getState().getFont().getAscent(composer.getState().getFontSize())
        )
View Full Code Here

      );

    // 4. Field creation.
    // 4.a. Push button.
    {
      composer.showText(
        "PushButton:",
        new Point2D.Double(140, 68),
        AlignmentXEnum.Right,
        AlignmentYEnum.Middle,
        0
View Full Code Here

      }
    }

    // 4.b. Check box.
    {
      composer.showText(
        "CheckBox:",
        new Point2D.Double(140, 118),
        AlignmentXEnum.Right,
        AlignmentYEnum.Middle,
        0
View Full Code Here

      fieldStyle.apply(field); // 4.3. Appearance style applied.
    }

    // 4.c. Radio button.
    {
      composer.showText(
        "RadioButton:",
        new Point2D.Double(140, 168),
        AlignmentXEnum.Right,
        AlignmentYEnum.Middle,
        0
View Full Code Here

      fieldStyle.apply(field); // 4.3. Appearance style applied.
    }

    // 4.d. Text field.
    {
      composer.showText(
        "TextField:",
        new Point2D.Double(140, 218),
        AlignmentXEnum.Right,
        AlignmentYEnum.Middle,
        0
View Full Code Here

      items.add("Paola Turci");
      items.add("Sarah Vaughan");

      // 4.e1. List box.
      {
        composer.showText(
          "ListBox:",
          new Point2D.Double(140, 268),
          AlignmentXEnum.Right,
          AlignmentYEnum.Middle,
          0
View Full Code Here

        fieldStyle.apply(field); // 4.3. Appearance style applied.
      }

      // 4.e2. Combo box.
      {
        composer.showText(
          "ComboBox:",
          new Point2D.Double(140, 350),
          AlignmentXEnum.Right,
          AlignmentYEnum.Middle,
          0
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.