java.lang.Object
io.github.tonywasher.joceanus.prometheus.service.sheet.PrometheusSheetSheet

public abstract class PrometheusSheetSheet extends Object
Class representing a sheet within a workBook.
  • Constructor Details

    • PrometheusSheetSheet

      protected PrometheusSheetSheet(PrometheusSheetWorkBook pWorkBook, String pName, boolean pReadOnly)
      Constructor for Excel Sheet.
      Parameters:
      pWorkBook - the workBook
      pName - the sheet name
      pReadOnly - is the sheet readOnly?
  • Method Details

    • getWorkBook

      public PrometheusSheetWorkBook getWorkBook()
      Obtain the workBook.
      Returns:
      the workBook
    • getName

      public String getName()
      Obtain the name of the sheet.
      Returns:
      the name
    • getSheetIndex

      public abstract int getSheetIndex()
      Get sheet index.
      Returns:
      the index of the sheet
    • isReadOnly

      public boolean isReadOnly()
      Is the sheet readOnly?
      Returns:
      true/false
    • isHidden

      public abstract boolean isHidden()
      Is the sheet hidden?
      Returns:
      true/false
    • setHidden

      public abstract void setHidden(boolean isHidden)
      Set sheet hidden status.
      Parameters:
      isHidden - true/false
    • getRowCount

      public abstract int getRowCount()
      Get row count.
      Returns:
      the count of rows
    • getReadOnlyRowByIndex

      public abstract PrometheusSheetRow getReadOnlyRowByIndex(int pRowIndex)
      Obtain the row at required index within the sheet, if it exists.
      Parameters:
      pRowIndex - the requested row index
      Returns:
      the requested row.
    • getMutableRowByIndex

      public abstract PrometheusSheetRow getMutableRowByIndex(int pRowIndex)
      Obtain the row at required index within the sheet, create it if it does not exist.
      Parameters:
      pRowIndex - the requested row index
      Returns:
      the requested row.
    • getReadOnlyColumnByIndex

      public abstract PrometheusSheetColumn getReadOnlyColumnByIndex(int pColIndex)
      Obtain the column by index.
      Parameters:
      pColIndex - the column index
      Returns:
      the column
    • getMutableColumnByIndex

      public abstract PrometheusSheetColumn getMutableColumnByIndex(int pColIndex)
      Obtain the column by index, creating column if it does not exist.
      Parameters:
      pColIndex - the column index
      Returns:
      the column
    • declareRange

      public abstract void declareRange(String pName, PrometheusSheetCellPosition pFirstCell, PrometheusSheetCellPosition pLastCell) throws OceanusException
      Name a range.
      Parameters:
      pName - the name of the range
      pFirstCell - the first cell in the range
      pLastCell - the last cell in the range
      Throws:
      OceanusException - on error
    • declareRange

      public void declareRange(String pName, PrometheusSheetCellPosition pSingleCell) throws OceanusException
      Name a single cell as a range.
      Parameters:
      pName - the name of the range
      pSingleCell - the cell to name
      Throws:
      OceanusException - on error
    • applyDataValidation

      public abstract void applyDataValidation(PrometheusSheetCellPosition pFirstCell, PrometheusSheetCellPosition pLastCell, String pName) throws OceanusException
      Apply data validation to a range of cells.
      Parameters:
      pFirstCell - the first cell in the range
      pLastCell - the last cell in the range
      pName - the name of the validation range list
      Throws:
      OceanusException - on error
    • applyDataFilter

      public abstract void applyDataFilter(PrometheusSheetCellPosition pBaseCell, int pNumRows) throws OceanusException
      Apply data validation to a range of cells.
      Parameters:
      pBaseCell - the first cell in the range
      pNumRows - the number of rows in the filter
      Throws:
      OceanusException - on error
    • createFreezePane

      public abstract void createFreezePane(PrometheusSheetCellPosition pFreezeCell)
      Create freeze panes.
      Parameters:
      pFreezeCell - the cell to freeze at
    • iteratorForRange

      protected abstract ListIterator<PrometheusSheetRow> iteratorForRange(int pFirstIndex, int pLastIndex)
      Obtain an iterator of non-null rows for the view.
      Parameters:
      pFirstIndex - the first row in the view
      pLastIndex - the last row in the view
      Returns:
      the iterator