1 17 18 19 20 package org.apache.fop.fo.properties; 21 22 import org.apache.fop.fo.FObj; 23 import org.apache.fop.fo.PropertyList; 24 25 28 public class FontFamilyProperty extends ListProperty { 29 30 33 public static class Maker extends PropertyMaker { 34 35 38 public Maker(int propId) { 39 super(propId); 40 } 41 42 45 public Property convertProperty(Property p, 46 PropertyList propertyList, FObj fo) { 47 if (p instanceof FontFamilyProperty) { 48 return p; 49 } else { 50 return new FontFamilyProperty(p); 51 } 52 } 53 54 } 55 56 59 public FontFamilyProperty(Property prop) { 60 super(); 61 addProperty(prop); 62 } 63 64 68 public void addProperty(Property prop) { 69 if (prop.getList() != null) { 70 list.addAll(prop.getList()); 71 } else { 72 super.addProperty(prop); 73 } 74 } 75 76 77 public String getString() { 78 if (list.size() > 0) { 79 Property first = (Property)list.get(0); 80 return first.getString(); 81 } else { 82 return super.getString(); 83 } 84 } 85 86 } 87 | Popular Tags |