Package org.zkoss.zss.ui

Examples of org.zkoss.zss.ui.Rect


    CellHelper.shiftEntireColumnRight(spreadsheet.getSelectedSheet(),
        rect.getLeft(), rect.getRight());
  }

  public void deleteColumn() {
    Rect rect = spreadsheet.getSelection();
    if (rect == null)
      return;
   
    CellHelper.shiftEntireColumnLeft(spreadsheet.getSelectedSheet(),
        rect.getLeft(), rect.getRight());
  }
View Full Code Here


        spreadsheet.getSelection().getTop(),
        spreadsheet.getSelection().getBottom());
  }

  public void deleteRow() {
    Rect rect = spreadsheet.getSelection();
    CellHelper.shiftEntireRowUp(spreadsheet.getSelectedSheet(), rect.getTop(), rect.getBottom());
  }
View Full Code Here

    lastSheetName = name;
    spreadsheet.focus(); //move focus in to spreadsheet
  }

  public void hide(boolean hide) {
    Rect rect = spreadsheet.getSelection();
    if (rect == null)
      return;
   
    Ranges.range(spreadsheet.getSelectedSheet(),
        rect.getTop(), rect.getLeft(),
        rect.getBottom(), rect.getRight()).setHidden(hide);
  }
View Full Code Here

    Ranges.range(spreadsheet.getSelectedSheet()).setSheetName(name);
  }

  public void shiftCell(int direction) {
    Worksheet sheet = spreadsheet.getSelectedSheet();
    Rect rect = spreadsheet.getSelection();
   
    switch (direction) {
    case DesktopWorkbenchContext.SHIFT_CELL_UP:
      CellHelper.shiftCellUp(sheet, rect);
      break;
View Full Code Here

  }

  public void addChart(int row, int col, ChartType chartType) {
    Worksheet sheet = spreadsheet.getSelectedSheet();
   
    Rect selection = spreadsheet.getSelection();
    Ranges.range(sheet).addChart(getClientCenterAnchor(row, col, 600, 300), newChartData(chartType, selection), chartType, ChartGrouping.STANDARD, LegendPosition.RIGHT);
  }
View Full Code Here

    Worksheet sheet = ss.getSelectedSheet();
    MergeMatrixHelper mmhelper = ((SpreadsheetCtrl)ss.getExtraCtrl()).getMergeMatrixHelper(sheet);
    Set blocks = mmhelper.getRangesByColumn(max);
    Iterator iter = blocks.iterator();
    while(iter.hasNext()){
      Rect rect = (Rect)iter.next();
      int top = rect.getTop();
      //int left = rect.getLeft();
      int right = rect.getRight();
      //int bottom = rect.getBottom();
      if(top<row_top || top<row_bottom){
        continue;
      }
     
View Full Code Here

    int tRow = (Integer) data.get("tRow");
    int bRow = (Integer) data.get("bRow");
    int lCol = (Integer) data.get("lCol");
    int rCol = (Integer) data.get("rCol");
    Integer action = (Integer) data.get("action");
    Rect r = action != null ?
        new Rect(action, lCol, tRow, rCol, bRow) : new Rect(lCol, tRow, rCol, bRow);
    return r;
  }
View Full Code Here

   * Execute when user press key
   * @param event
   */
  public void doCtrlKey(KeyEvent event) {
    Worksheet sheet = _spreadsheet.getSelectedSheet();
    Rect selection = event.getSelection();
    if (sheet == null || !isValidSelection(selection)) {
      return;
    }
   
    if (46 == event.getKeyCode()) {
View Full Code Here

      if (!validSheet) {
        clearClipboard();
        return;
      }
     
      final Rect srcRect = _clipboard.sourceRect;
      Range rng = Utils.pasteSpecial(srcSheet,
          srcRect,
          _spreadsheet.getSelectedSheet(),
          selection.getTop(),
          selection.getLeft(),
          selection.getBottom(),
          selection.getRight(),
          pasteType,
          pasteOperation,
          skipBlank, transpose);
     
      if (_clipboard.type == Clipboard.Type.CUT) {
        Ranges
        .range(srcSheet, srcRect.getTop(), srcRect.getLeft(), srcRect.getBottom(), srcRect.getRight())
        .clearContents();
       
        clearStyleImp(srcRect, srcSheet);
       
        _clipboard = null;//clear used clipboard
        _spreadsheet.setHighlight(null);
      }
     
      if (rng != null) {
        _spreadsheet.setSelection(new Rect(rng.getColumn(), rng.getRow(),
            rng.getLastColumn(), rng.getLastRow()))
      }
    }
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.ui.Rect

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.