Class PrometheusSheetRow
java.lang.Object
io.github.tonywasher.joceanus.prometheus.service.sheet.PrometheusSheetRow
Class representing a row within a sheet or a view.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPrometheusSheetRow(PrometheusSheetSheet pSheet, int pRowIndex, boolean pReadOnly) Constructor.protectedPrometheusSheetRow(PrometheusSheetView pView, int pRowIndex) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionabstract intDetermine number of cells in this row.abstract intDetermine index of the max valued cell.getMutableCellByIndex(int pIndex) Get the cell at the required index.abstract PrometheusSheetRowGet the next row.abstract PrometheusSheetRowGet the previous row.abstract PrometheusSheetCellgetReadOnlyCellByIndex(int pIndex) Get the cell at the required index.intObtain the row index.getSheet()Obtain the underlying sheet.getView()Obtain the underlying view.protected abstract PrometheusSheetCellgetWriteableCellByIndex(int pIndex) Get the cell at the required index.abstract booleanisHidden()Is the column hidden?booleanIs the row readOnly?protected abstract ListIterator<PrometheusSheetCell> iteratorForRange(int pFirstIndex, int pLastIndex) Obtain an iterator of non-null cells for the row in the view.voidsetHidden(boolean isHidden) Set hidden status.protected abstract voidsetHiddenValue(boolean isHidden) Set hidden status.
-
Constructor Details
-
PrometheusSheetRow
Constructor.- Parameters:
pSheet- the sheet for the rowpRowIndex- the Row indexpReadOnly- is the row readOnly?
-
PrometheusSheetRow
Constructor.- Parameters:
pView- the view for the rowpRowIndex- the Row index
-
-
Method Details
-
getSheet
Obtain the underlying sheet.- Returns:
- the underlying sheet
-
getView
Obtain the underlying view.- Returns:
- the underlying view
-
getRowIndex
public int getRowIndex()Obtain the row index.- Returns:
- row index
-
isReadOnly
public boolean isReadOnly()Is the row readOnly?- Returns:
- true/false
-
getNextRow
Get the next row.- Returns:
- the next row
-
getPreviousRow
Get the previous row.- Returns:
- the previous row
-
getCellCount
public abstract int getCellCount()Determine number of cells in this row.- Returns:
- the number of cells.
-
getMaxValuedCellIndex
public abstract int getMaxValuedCellIndex()Determine index of the max valued cell.- Returns:
- the index.
-
setHidden
public void setHidden(boolean isHidden) Set hidden status.- Parameters:
isHidden- is the column hidden?
-
setHiddenValue
protected abstract void setHiddenValue(boolean isHidden) Set hidden status.- Parameters:
isHidden- is the column hidden?
-
isHidden
public abstract boolean isHidden()Is the column hidden?- Returns:
- true/false
-
getReadOnlyCellByIndex
Get the cell at the required index.- Parameters:
pIndex- the column index.- Returns:
- the cell
-
getMutableCellByIndex
Get the cell at the required index.- Parameters:
pIndex- the column index.- Returns:
- the cell
-
getWriteableCellByIndex
Get the cell at the required index.- Parameters:
pIndex- the column index.- Returns:
- the cell
-
iteratorForRange
protected abstract ListIterator<PrometheusSheetCell> iteratorForRange(int pFirstIndex, int pLastIndex) Obtain an iterator of non-null cells for the row in the view.- Parameters:
pFirstIndex- the first cell in the viewpLastIndex- the last cell in the view- Returns:
- the iterator
-