[seam-commits] Seam SVN: r11343 - branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Tue Aug 4 20:20:13 EDT 2009


Author: norman.richards at jboss.com
Date: 2009-08-04 20:20:12 -0400 (Tue, 04 Aug 2009)
New Revision: 11343

Modified:
   branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIFont.java
Log:
JBSEAM-2369

Modified: branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIFont.java
===================================================================
--- branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIFont.java	2009-08-04 18:37:16 UTC (rev 11342)
+++ branches/community/Seam_2_2/src/pdf/org/jboss/seam/pdf/ui/UIFont.java	2009-08-05 00:20:12 UTC (rev 11343)
@@ -6,7 +6,7 @@
 
 public class UIFont extends ITextComponent
 {
-   public static final String COMPONENT_TYPE = "org.jboss.seam.pdf.ui.UIParagraph";
+   public static final String COMPONENT_TYPE = "org.jboss.seam.pdf.ui.UIFont";
 
    Font font;
 
@@ -15,6 +15,7 @@
    int size = Font.UNDEFINED;
    String style;
    String color;
+   boolean embedded = false;
 
    public String getName()
    {
@@ -70,6 +71,14 @@
    {
       this.color = color;
    }
+      
+   public boolean getEmbedded() {
+      return (Boolean) valueBinding("embedded", embedded);
+   }
+   
+   public void setEmbedded(boolean embedded) {
+      this.embedded = embedded;
+   }
 
    @Override
    public Font getFont()
@@ -92,22 +101,17 @@
    @Override
    public void createITextObject(FacesContext context)
    {
-      if (encoding == null)
-      {
+      if (encoding == null) {
          font = FontFactory.getFont(getName(), getSize());
+      } else {
+         font = FontFactory.getFont(getName(), getEncoding(), getEmbedded(), getSize());
       }
-      else
-      {
-         font = FontFactory.getFont(getName(), getEncoding(), getSize());
-      }
-
-      if (getStyle() != null)
-      {
+      
+      if (getStyle() != null) {
          font.setStyle(getStyle());
       }
-
-      if (getColor() != null)
-      {
+      
+      if (getColor() != null) {
          font.setColor(ITextUtils.colorValue(getColor()));
       }
    }



More information about the seam-commits mailing list