[jboss-cvs] jboss-seam/src/pdf/org/jboss/seam/pdf/ui ...

Norman Richards norman.richards at jboss.com
Sun Dec 24 17:54:32 EST 2006


  User: nrichards
  Date: 06/12/24 17:54:32

  Modified:    src/pdf/org/jboss/seam/pdf/ui   UIParagraph.java
  Added:       src/pdf/org/jboss/seam/pdf/ui   UIAnchor.java
  Log:
  add UIAnchor, add UIParagraph properties
  
  Revision  Changes    Path
  1.2       +72 -1     jboss-seam/src/pdf/org/jboss/seam/pdf/ui/UIParagraph.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIParagraph.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/pdf/org/jboss/seam/pdf/ui/UIParagraph.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- UIParagraph.java	24 Dec 2006 16:21:33 -0000	1.1
  +++ UIParagraph.java	24 Dec 2006 22:54:32 -0000	1.2
  @@ -17,10 +17,51 @@
       Paragraph paragraph;
       String alignment;
   
  +    
  +    Float firstLineIndent;
  +    Float extraParagraphSpace;
  +    Float leading;
  +    Float multipliedLeading;
  +    Float spacingBefore;
  +    Float spacingAfter;
  +    Float indentationLeft;
  +    Float indentationRight;
  +
  +    Boolean keepTogether;
  +
       public void setAlignment(String alignment) {
           this.alignment = alignment;
       }
   
  +    public void setFirstLineIndent(Float firstLineIndent) {
  +        this.firstLineIndent = firstLineIndent;
  +    }
  +
  +    public void setExtraParagraphSpace(Float extraParagraphSpace) {
  +        this.extraParagraphSpace = extraParagraphSpace;
  +    }
  +    public void setLeading(Float leading) {
  +        this.leading = leading;
  +    }
  +    public void setMultipliedLeading(Float multipliedLeading) {
  +        this.multipliedLeading = multipliedLeading;
  +    }
  +    public void setSpacingBefore(Float spacingBefore) {
  +        this.spacingBefore = spacingBefore;
  +    }
  +    public void setSpacingAfter(Float spacingAfter) {
  +        this.spacingAfter = spacingAfter;
  +    }
  +    public void setIndentationLeft(Float indentationLeft) {
  +        this.indentationLeft = indentationLeft;
  +    }
  +    public void setIndentationRight(Float indentationRight) {
  +        this.indentationRight = indentationRight;
  +    }
  +    public void setKeepTogether(Boolean keepTogether) {
  +        this.keepTogether = keepTogether;
  +    }
  +
       public Object getITextObject() {
           return paragraph;
       }
  @@ -33,9 +74,39 @@
               paragraph = new Paragraph("", font);
           }
   
  -        if (alignment !=null) {
  +        if (alignment != null) {
               paragraph.setAlignment(alignment);
           }
  +        
  +        if (firstLineIndent != null) {
  +            paragraph.setFirstLineIndent(firstLineIndent);
  +        }
  +
  +        if (extraParagraphSpace != null) {
  +            paragraph.setExtraParagraphSpace(extraParagraphSpace);
  +        }
  +        if (leading != null) {
  +            if (multipliedLeading != null) {
  +                paragraph.setLeading(leading, multipliedLeading);
  +            } else {
  +                paragraph.setLeading(leading);
  +            }
  +        }
  +        if (spacingBefore != null) {
  +            paragraph.setSpacingBefore(spacingBefore);
  +        }
  +        if (spacingAfter != null) {
  +            paragraph.setSpacingAfter(spacingAfter);
  +        }
  +        if (indentationLeft != null) {
  +            paragraph.setIndentationLeft(indentationLeft);
  +        }
  +        if (indentationRight != null) {
  +            paragraph.setIndentationRight(indentationRight);
  +        }
  +        if (keepTogether != null) {
  +            paragraph.setKeepTogether(keepTogether);
  +        }
       }
   
       public void add(Object o) {
  
  
  
  1.1      date: 2006/12/24 22:54:32;  author: nrichards;  state: Exp;jboss-seam/src/pdf/org/jboss/seam/pdf/ui/UIAnchor.java
  
  Index: UIAnchor.java
  ===================================================================
  package org.jboss.seam.pdf.ui;
  
  import javax.faces.event.*;
  import javax.faces.context.*;
  import javax.faces.component.*;
  import javax.servlet.http.*;
  import java.io.*;
  
  import com.lowagie.text.*;
  import com.lowagie.text.pdf.*;
  
  public class UIAnchor
      extends ITextComponent
  {
      public static final String COMPONENT_TYPE   = "org.jboss.seam.pdf.ui.UIAnchor";
  
      Anchor anchor;
      
      String name;
      String reference;
  
      public void setName(String name) {
          this.name = name;
      }
      public void setReference(String reference) {
          this.reference = reference;
      }
  
      public Object getITextObject() {
          return anchor;
      }
  
      public void createITextObject() {
          anchor = new Anchor();
  
          if (name != null) {
              anchor.setName(name);
          }
  
          if (reference != null) {
              anchor.setReference(reference);
          }
      }
  
      public void add(Object o) {
          anchor.add(o);
      }
  }
  
  
  



More information about the jboss-cvs-commits mailing list