1 16 17 package org.apache.cocoon.components.elementprocessor.impl.poi.hssf.elements; 18 19 import org.apache.cocoon.components.elementprocessor.types.NumericConverter; 20 import org.apache.cocoon.components.elementprocessor.types.NumericResult; 21 22 import java.io.IOException ; 23 24 34 public class EPGeometry extends BaseElementProcessor { 35 private static final String _width_attribute = "Width"; 36 private static final String _height_attribute = "Height"; 37 private NumericResult _width; 38 private NumericResult _height; 39 40 43 public EPGeometry() { 44 super(null); 45 _width = null; 46 _height = null; 47 } 48 49 53 int getHeight() throws IOException { 54 if (_height == null) { 55 _height = NumericConverter.extractPositiveInteger( 56 getValue(_height_attribute)); 57 } 58 return _height.intValue(); 59 } 60 61 65 int getWidth() throws IOException { 66 if (_width == null) { 67 _width = NumericConverter.extractPositiveInteger( 68 getValue(_width_attribute)); 69 } 70 return _width.intValue(); 71 } 72 } | Popular Tags |