1 51 package org.apache.fop.datatypes; 52 53 import org.apache.fop.fo.Property; 54 import org.apache.fop.fo.properties.Constants; 55 56 59 public class CondLength implements CompoundDatatype { 60 61 private Property length; 62 private Property conditionality; 63 64 public void setComponent(String sCmpnName, Property cmpnValue, 66 boolean bIsDefault) { 67 if (sCmpnName.equals("length")) 68 length = cmpnValue; 69 else if (sCmpnName.equals("conditionality")) 70 conditionality = cmpnValue; 71 } 72 73 public Property getComponent(String sCmpnName) { 74 if (sCmpnName.equals("length")) 75 return length; 76 else if (sCmpnName.equals("conditionality")) 77 return conditionality; 78 else 79 return null; 80 } 81 82 public Property getConditionality() { 83 return this.conditionality; 84 } 85 86 public Property getLength() { 87 return this.length; 88 } 89 90 public boolean isDiscard() { 91 return this.conditionality.getEnum() == Constants.DISCARD; 92 } 93 94 public int mvalue() { 95 return this.length.getLength().mvalue(); 96 } 97 98 } 99 | Popular Tags |