1 16 17 package org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements; 18 19 20 21 import org.apache.cocoon.components.elementprocessor.types.NumericConverter; 22 import org.apache.cocoon.components.elementprocessor.types.NumericResult; 23 24 import java.io.IOException ; 25 26 36 public class EP_Bottom extends BaseElementProcessor { 37 private static final String _points_attribute = "Points"; 38 private static final String _pref_unit_attribute = "PrefUnit"; 39 private NumericResult _points; 40 private NumericResult _pref_unit; 41 42 45 46 public EP_Bottom() { 47 super(null); 48 _points = null; 49 _pref_unit = null; 50 } 51 52 57 58 double getPoints() throws IOException { 59 if (_points == null) { 60 _points = 61 NumericConverter.extractDouble(getValue(_points_attribute)); 62 } 63 return _points.doubleValue(); 64 } 65 66 71 72 int getPrefUnit() throws IOException { 73 if (_pref_unit == null) { 74 _pref_unit = 75 PrintUnits.extractPrintUnits(getValue(_pref_unit_attribute)); 76 } 77 return _pref_unit.intValue(); 78 } 79 } | Popular Tags |