1 51 package org.apache.fop.fo; 52 53 54 public class StringProperty extends Property { 55 56 public static class Maker extends Property.Maker { 57 58 public Maker(String propName) { 59 super(propName); 60 } 61 62 public Property make(PropertyList propertyList, String value, 63 FObj fo) { 64 int vlen = value.length() - 1; 71 if (vlen > 0) { 72 char q1 = value.charAt(0); 73 if (q1 == '"' || q1 == '\'') { 74 if (value.charAt(vlen) == q1) { 75 return new StringProperty(value.substring(1, vlen)); 76 } 77 System.err.println("Warning String-valued property starts with quote" 78 + " but doesn't end with quote: " 79 + value); 80 } 82 } 83 return new StringProperty(value); 84 } 85 86 } 88 private String str; 89 90 public StringProperty(String str) { 91 this.str = str; 92 } 94 95 public Object getObject() { 96 return this.str; 97 } 98 99 public String getString() { 100 return this.str; 101 } 102 103 } 104 | Popular Tags |