Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.poi.ss.usermodel.helpers
Class RowShifter

    java.lang.Object
      org.apache.poi.ss.usermodel.helpers.RowShifter

Direct Known Subclasses:
  HSSFRowShifter, XSSFRowShifter

    public abstract class RowShifter

extends java.lang.Object

Helper for shifting rows up or down This abstract class exists to consolidate duplicated code between XSSFRowShifter and HSSFRowShifter (currently methods sprinkled throughout HSSFSheet)

Field Summary
`protected Sheet` | `sheet`

Constructor Summary
`RowShifter(Sheet sh)`

Method Summary
`java.util.List<CellRangeAddress>` | `shiftMergedRegions(int startRow, int endRow, int n)` Shifts, grows, or shrinks the merged regions due to a row shift.
`abstract void` | `updateConditionalFormatting(FormulaShifter shifter)`
`abstract void` | `updateFormulas(FormulaShifter shifter)` Update formulas.
`abstract void` | `updateHyperlinks(FormulaShifter shifter)` Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink is of type LINK_DOCUMENT and refers to a cell that was shifted).
`abstract void` | `updateNamedRanges(FormulaShifter shifter)` Updated named ranges
`abstract void` | `updateRowFormulas(Row row, FormulaShifter shifter)` Update the formulas in specified row using the formula shifting policy specified by shifter

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### sheet

    protected final Sheet sheet

Constructor Detail

### RowShifter

    public RowShifter(Sheet sh)

Method Detail

### shiftMergedRegions

    public java.util.List<CellRangeAddress> shiftMergedRegions(int startRow,
                                                               int endRow,
                                                               int n)

  Shifts, grows, or shrinks the merged regions due to a row shift. Merged regions that are completely overlaid by shifting will be deleted.

  Parameters:
    `startRow` - the row to start shifting
    `endRow` - the row to end shifting
    `n` - the number of rows to shift
  Returns:
    an array of affected merged regions, doesn't contain deleted ones

### updateNamedRanges

    public abstract void updateNamedRanges(FormulaShifter shifter)

  Updated named ranges

### updateFormulas

    public abstract void updateFormulas(FormulaShifter shifter)

  Update formulas.

### updateRowFormulas

    @Internal
    public abstract void updateRowFormulas(Row row,
                                                    FormulaShifter shifter)

  Update the formulas in specified row using the formula shifting policy specified by shifter

  Parameters:
    `row` - the row to update the formulas on
    `shifter` - the formula shifting policy

### updateConditionalFormatting

    public abstract void updateConditionalFormatting(FormulaShifter shifter)

### updateHyperlinks

    public abstract void updateHyperlinks(FormulaShifter shifter)

  Shift the Hyperlink anchors (not the hyperlink text, even if the hyperlink is of type LINK_DOCUMENT and refers to a cell that was shifted). Hyperlinks do not track the content they point to.

  Parameters:
    `shifter` - the formula shifting policy

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2017 The Apache Software Foundation or its licensors, as applicable.