int orgileft = (Integer) data.get("orgileft");
int orgitop = (Integer) data.get("orgitop");
int orgiright = (Integer) data.get("orgiright");
int orgibottom = (Integer) data.get("orgibottom");
final SelectionChangeEvent evt = new SelectionChangeEvent(
org.zkoss.zss.ui.event.Events.ON_SELECTION_CHANGE, comp, sheet,
action, left, top, right, bottom, orgileft, orgitop, orgiright,
orgibottom);
if (!isProtect(top, left, bottom, right, sheet)) {
final int xaction = evt.getAction();
if (xaction == SelectionChangeEvent.MOVE) {
final int nRow = top - orgitop;
final int nCol = left - orgileft;
switch(evt.getSelectionType()) {
case CellSelectionEvent.SELECT_ROW:
Utils.moveRows(sheet, orgitop, orgibottom, nRow);
break;
case CellSelectionEvent.SELECT_COLUMN:
Utils.moveColumns(sheet, orgileft, orgiright, nCol);
break;
case CellSelectionEvent.SELECT_CELLS:
Utils.moveCells(sheet, orgitop, orgileft, orgibottom, orgiright, nRow, nCol);
break;
}
} else if (xaction == SelectionChangeEvent.MODIFY) {
switch(evt.getSelectionType()) {
case CellSelectionEvent.SELECT_ROW:
Utils.fillRows(sheet, orgitop, orgibottom, top, bottom);
break;
case CellSelectionEvent.SELECT_COLUMN:
Utils.fillColumns(sheet, orgileft, orgiright, left, right);