Package io.keikai.ui.impl
Class MergeMatrixHelper
java.lang.Object
io.keikai.ui.impl.MergeMatrixHelper
- All Implemented Interfaces:
Serializable
Each sheet has its own MergeMatrixHelper and it manages all merged cells.
- Author:
- Dennis.Chen, jumperchen
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMergeMatrixHelper(List<CellRegion> mergeRange, int frozenRow, int frozenCol) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMergeRange(int left, int top, int right, int bottom, Set toadd, Set torem) voiddeleteMergeRange(int left, int top, int right, int bottom, Set torem) intgetBottomConnectedRow(int row, int left, int right) intgetLeftConnectedColumn(int col, int top, int bottom) getMergedRect(int id) ReturnsMergedRectMergedRect by idgetMergeRange(int row, int col) Get a merged range which contains cell(row,col)Get all merged range.getRangesByColumn(int col) Get merged range which contains colintgetRightConnectedColumn(int col, int top, int bottom) intgetTopConnectedRow(int row, int left, int right) booleanisMergeRangeLeftTop(int row, int col) Check is (row,col) in one of merge range's left-topvoidupdate(int frozenRow, int frozenCol) voidupdateMergeRange(int oleft, int otop, int oright, int obottom, int left, int top, int right, int bottom, Set toadd, Set torem)
-
Constructor Details
-
MergeMatrixHelper
- Parameters:
mergeRange- List of merge rangefrozenRow-frozenCol-
-
-
Method Details
-
update
public void update(int frozenRow, int frozenCol) -
isMergeRangeLeftTop
public boolean isMergeRangeLeftTop(int row, int col) Check is (row,col) in one of merge range's left-top -
getMergeRange
Get a merged range which contains cell(row,col) -
getRanges
Get all merged range.- Returns:
- a list which contains all merged range
-
getMergedRect
ReturnsMergedRectMergedRect by id- Parameters:
id-- Returns:
- MergedRect
-
getRangesByColumn
Get merged range which contains col- Parameters:
col- column index- Returns:
- a list which contains merged range
-
getRightConnectedColumn
public int getRightConnectedColumn(int col, int top, int bottom) -
getLeftConnectedColumn
public int getLeftConnectedColumn(int col, int top, int bottom) -
getBottomConnectedRow
public int getBottomConnectedRow(int row, int left, int right) -
getTopConnectedRow
public int getTopConnectedRow(int row, int left, int right) -
updateMergeRange
-
deleteMergeRange
-
addMergeRange
-