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 EPSelection extends BaseElementProcessor { 37 private static final String _start_col_attribute = "startCol"; 38 private static final String _start_row_attribute = "startRow"; 39 private static final String _end_col_attribute = "endCol"; 40 private static final String _end_row_attribute = "endRow"; 41 private NumericResult _start_col; 42 private NumericResult _start_row; 43 private NumericResult _end_col; 44 private NumericResult _end_row; 45 46 49 public EPSelection() { 50 super(null); 51 _start_col = null; 52 _start_row = null; 53 _end_col = null; 54 _end_row = null; 55 } 56 57 61 public int getStartRow() throws IOException { 62 if (_start_row == null) { 63 _start_row = NumericConverter.extractNonNegativeInteger( 64 getValue(_start_row_attribute)); 65 } 66 return _start_row.intValue(); 67 } 68 69 73 public int getStartCol() throws IOException { 74 if (_start_col == null) { 75 _start_col = NumericConverter.extractNonNegativeInteger( 76 getValue(_start_col_attribute)); 77 } 78 return _start_col.intValue(); 79 } 80 81 85 public int getEndRow() throws IOException { 86 if (_end_row == null) { 87 _end_row = NumericConverter.extractNonNegativeInteger( 88 getValue(_end_row_attribute)); 89 } 90 return _end_row.intValue(); 91 } 92 93 97 public int getEndCol() throws IOException { 98 if (_end_col == null) { 99 _end_col = NumericConverter.extractNonNegativeInteger( 100 getValue(_end_col_attribute)); 101 } 102 return _end_col.intValue(); 103 } 104 } | Popular Tags |