Class RowShifter
java.lang.Object
org.apache.poi.ss.usermodel.helpers.BaseRowColShifter
org.apache.poi.ss.usermodel.helpers.RowShifter
- Direct Known Subclasses:
HSSFRowShifter,XSSFRowShifter
Helper for shifting rows up or down
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionshiftMergedRegions(int startRow, int endRow, int n) Shifts, grows, or shrinks the merged regions due to a row shift.static voidvalidateShiftLeftParameters(int firstShiftColumnIndex, int lastShiftColumnIndex, int step) Verify that the given column indices and step denote a valid range of columns to shift to the leftstatic voidvalidateShiftParameters(int firstShiftColumnIndex, int lastShiftColumnIndex, int step) Verify that the given column indices and step denote a valid range of columns to shiftMethods inherited from class org.apache.poi.ss.usermodel.helpers.BaseRowColShifter
shiftRange, updateConditionalFormatting, updateFormulas, updateHyperlinks, updateNamedRanges
-
Constructor Details
-
RowShifter
-
-
Method Details
-
shiftMergedRegions
Shifts, grows, or shrinks the merged regions due to a row shift. Merged regions that are completely overlaid by shifting will be deleted.- Specified by:
shiftMergedRegionsin classBaseRowColShifter- Parameters:
startRow- the row to start shiftingendRow- the row to end shiftingn- the number of rows to shift- Returns:
- an array of affected merged regions, doesn't contain deleted ones
-
validateShiftParameters
public static void validateShiftParameters(int firstShiftColumnIndex, int lastShiftColumnIndex, int step) Verify that the given column indices and step denote a valid range of columns to shift- Parameters:
firstShiftColumnIndex- the column to start shiftinglastShiftColumnIndex- the column to end shiftingstep- length of the shifting step
-
validateShiftLeftParameters
public static void validateShiftLeftParameters(int firstShiftColumnIndex, int lastShiftColumnIndex, int step) Verify that the given column indices and step denote a valid range of columns to shift to the left- Parameters:
firstShiftColumnIndex- the column to start shiftinglastShiftColumnIndex- the column to end shiftingstep- length of the shifting step
-