Package adams.core

Class ODFHelper


  • public class ODFHelper
    extends Object
    Helper class for PDF-related stuff.
    Version:
    $Revision$
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • ODFHelper

        public ODFHelper()
    • Method Detail

      • getCellLocation

        public static int[] getCellLocation​(String position)
                                     throws Exception
        Returns row/column index based on the provided position string (e.g., A12).
        Parameters:
        position - the position string to parse
        Returns:
        the array with row and column index (0-based indices)
        Throws:
        Exception - in case of an invalid position string
      • getColumnPosition

        public static String getColumnPosition​(int col)
        Returns the position letter(s) of the column.
        Parameters:
        col - the column index of the cell (0-based)
        Returns:
        the position string
      • getCellPosition

        public static String getCellPosition​(int row,
                                             int col)
        Returns the position of the cell. A position is a combination of a number of letters (for the column) and number (for the row).
        Parameters:
        row - the row index of the cell (0-based)
        col - the column index of the cell (0-based)
        Returns:
        the position string or null if not found