1 51 package org.apache.fop.datatypes; 52 53 import org.apache.fop.fo.expr.Numeric; 54 55 58 public class Length { 59 60 protected int millipoints = 0; 61 protected boolean bIsComputed = false; 62 63 66 public int mvalue() { 67 if (!bIsComputed) { 68 computeValue(); 69 } 70 return millipoints; 71 } 72 73 protected void computeValue() { 74 } 75 76 77 protected void setComputedValue(int millipoints) { 78 setComputedValue(millipoints, true); 79 } 80 81 protected void setComputedValue(int millipoints, boolean bSetComputed) { 82 this.millipoints = millipoints; 83 this.bIsComputed = bSetComputed; 84 } 85 86 public boolean isAuto() { 87 return false; 88 } 89 90 public boolean isComputed() { 91 return this.bIsComputed; 92 } 93 94 106 public double getTableUnits() { 107 return 0.0; 108 } 109 110 public void resolveTableUnit(double dTableUnit) { 111 } 112 113 public Numeric asNumeric() { 114 return null; 115 } 116 117 public String toString() { 118 String s = millipoints + "mpt"; 119 return s; 120 } 121 122 } 123 | Popular Tags |