1 17 18 19 20 package org.apache.fop.fo.properties; 21 22 import org.apache.fop.datatypes.PercentBaseContext; 23 24 27 public class EnumLength extends LengthProperty { 28 private Property enumProperty; 29 30 public EnumLength(Property enumProperty) { 31 this.enumProperty = enumProperty; 32 } 33 34 37 public int getEnum() { 38 return enumProperty.getEnum(); 39 } 40 41 public boolean isAbsolute() { 42 return false; 43 } 44 45 48 public int getValue() { 49 log.error("getValue() called on " + enumProperty + " length"); 50 return 0; 51 } 52 53 56 public int getValue(PercentBaseContext context) { 57 log.error("getValue() called on " + enumProperty + " length"); 58 return 0; 59 } 60 61 64 public double getNumericValue() { 65 log.error("getNumericValue() called on " + enumProperty + " number"); 66 return 0; 67 } 68 69 72 public double getNumericValue(PercentBaseContext context) { 73 log.error("getNumericValue() called on " + enumProperty + " number"); 74 return 0; 75 } 76 77 80 public String getString() { 81 return enumProperty.toString(); 82 } 83 84 87 public Object getObject() { 88 return enumProperty.getObject(); 89 } 90 91 92 } 93 | Popular Tags |