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 36 public class EPSelections extends BaseElementProcessor { 37 private static final String _cursor_col_attribute = "CursorCol"; 38 private static final String _cursor_row_attribute = "CursorRow"; 39 private NumericResult _cursor_col; 40 private NumericResult _cursor_row; 41 42 45 public EPSelections() { 46 super(null); 47 _cursor_col = null; 48 _cursor_row = null; 49 } 50 51 55 public int getCursorCol() throws IOException { 56 if (_cursor_col == null) { 57 _cursor_col = NumericConverter.extractNonNegativeInteger( 58 getValue(_cursor_col_attribute)); 59 } 60 return _cursor_col.intValue(); 61 } 62 63 67 public int getCursorRow() throws IOException { 68 if (_cursor_row == null) { 69 _cursor_row = NumericConverter.extractNonNegativeInteger( 70 getValue(_cursor_row_attribute)); 71 } 72 return _cursor_row.intValue(); 73 } 74 } | Popular Tags |