1 17 package org.apache.fop.fo; 18 19 import org.apache.fop.fo.expr.PropertyException; 20 import org.apache.fop.fo.properties.Property; 21 22 26 public class StaticPropertyList extends PropertyList { 27 private Property[] explicit; 28 private Property[] values; 29 30 35 public StaticPropertyList(FObj fObjToAttach, PropertyList parentPropertyList) { 36 super(fObjToAttach, parentPropertyList); 37 explicit = new Property[Constants.PROPERTY_COUNT + 1]; 38 values = new Property[Constants.PROPERTY_COUNT + 1]; 39 } 40 41 46 public Property getExplicit(int propId) { 47 return explicit[propId]; 48 } 49 50 55 public void putExplicit(int propId, Property value) { 56 explicit[propId] = value; 57 if (values[propId] != null) { values[propId] = value; 59 } 60 } 61 62 67 public Property get(int propId, boolean bTryInherit, boolean bTryDefault) 68 throws PropertyException 69 { 70 Property p = values[propId]; 71 if (p == null) { 72 p = values[propId] = super.get(propId, bTryInherit, bTryDefault); 73 } 74 return p; 75 } 76 } 77 | Popular Tags |