Package org.zkoss.zss.ui.event

Examples of org.zkoss.zss.ui.event.SelectionChangeEvent


    int orgibottom = Integer.parseInt(data[9]);
   
    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl)((Spreadsheet)comp).getExtraCtrl());
    ctrl.setSelectionRect(left,top,right,bottom);   
   
    Events.postEvent(new SelectionChangeEvent(org.zkoss.zss.ui.event.Events.ON_SELECTION_CHANGE
        , comp, sheet,action,left,top,right,bottom,orgileft,orgitop,orgiright,orgibottom));
  }
View Full Code Here


    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);
View Full Code Here

TOP

Related Classes of org.zkoss.zss.ui.event.SelectionChangeEvent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.