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

Norman Richards norman.richards at jboss.com
Tue Apr 3 13:15:45 EDT 2007


  User: nrichards
  Date: 07/04/03 13:15:45

  Modified:    src/pdf/org/jboss/seam/pdf/ui  UIFont.java
  Log:
  add color to font
  
  Revision  Changes    Path
  1.8       +14 -1     jboss-seam/src/pdf/org/jboss/seam/pdf/ui/UIFont.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: UIFont.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/pdf/org/jboss/seam/pdf/ui/UIFont.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- UIFont.java	20 Feb 2007 04:14:20 -0000	1.7
  +++ UIFont.java	3 Apr 2007 17:15:45 -0000	1.8
  @@ -1,6 +1,11 @@
   package org.jboss.seam.pdf.ui;
   
  +import java.awt.Color;
  +
   import javax.faces.context.*;
  +
  +import org.jboss.seam.pdf.ITextUtils;
  +
   import com.lowagie.text.*;
   
   public class UIFont
  @@ -8,12 +13,12 @@
   {
       public static final String COMPONENT_TYPE   = "org.jboss.seam.pdf.ui.UIParagraph";
   
  -
       Font   font; 
       
       String familyName;
       int    size   = Font.UNDEFINED;
       String style; 
  +    Color  color;
   
       public void setFamily(String familyName) {
           this.familyName = familyName;
  @@ -27,6 +32,10 @@
           this.style = style;
       }
   
  +    public void setColor(String color) {
  +        this.color = ITextUtils.colorValue(color);
  +    }
  +
       @Override
       public Font getFont() {
           return font;
  @@ -54,6 +63,10 @@
           if (style != null) {
               font.setStyle(style);
           }
  +        
  +        if (color != null) {
  +            font.setColor(color);
  +        }
       }
   
       @Override
  
  
  



More information about the jboss-cvs-commits mailing list