Package org.zkoss.zss.ui

Examples of org.zkoss.zss.ui.Spreadsheet$HelperContainer


    final String[] data = request.getData();
    if (data == null || data.length != 17)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA,
        new Object[] {Objects.toString(data), this});
   
    Spreadsheet spreadsheet = ((Spreadsheet)comp);
    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl)spreadsheet.getExtraCtrl());
   
    String sheetId = data[0];
   
    int dpWidth = Integer.parseInt(data[1]);//pixel value of data panel width
    int dpHeight = Integer.parseInt(data[2]);//pixel value of data panel height
View Full Code Here


   
    final Map data = (Map) request.getData();
    if (data == null || data.size() < 2)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {Objects.toString(data), ActionCommand.class });
   
    Spreadsheet spreadsheet = ((Spreadsheet) comp);
    String tag = (String) data.get("tag");
    String act = (String) data.get("act");
    if ("toolbar".equals(tag)) {
      spreadsheet.getActionHandler().dispatch(act, data);
    } else if ("sheet".equals(tag) && spreadsheet.getBook() != null) {
      String sheetId = (String) data.get("sheetId");
      Worksheet sheet = Utils.getSheetByUuid(spreadsheet.getBook(), sheetId);
      if (sheet != null) {
        processSheet(act, data, sheet, spreadsheet);
      }
    }
  }
View Full Code Here

    final Map data = (Map) request.getData();
    if (data == null || data.size() != 17)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {Objects.toString(data), BlockSyncCommand.class });

    Spreadsheet spreadsheet = ((Spreadsheet) comp);
    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl) spreadsheet.getExtraCtrl());

    String sheetId = (String) data.get("sheetId");
    int dpWidth = (Integer) data.get("dpWidth");// pixel value of data panel width
    int dpHeight = (Integer) data.get("dpHeight");// pixel value of data panel height
    int viewWidth = (Integer) data.get("viewWidth");// pixel value of view width(scrollpanel.clientWidth)
View Full Code Here

   
    final Map data = (Map) request.getData();
    if (data == null || data.size() != 5)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {Objects.toString(data), SelectSheetCommand.class });
   
    Spreadsheet spreadsheet = ((Spreadsheet) comp);
    String sheetId = (String) data.get("sheetId");
    int left = (Integer) data.get("left");
    int right = (Integer) data.get("right");
    int top = (Integer) data.get("top");
    int bottom = (Integer) data.get("bottom");
   
    Worksheet sheet = spreadsheet.getSelectedSheet();
   
    if (sheetId.equals(((SheetCtrl)sheet).getUuid())) {
      final SpreadsheetCtrl spreadsheetCtrl = ((SpreadsheetCtrl) spreadsheet.getExtraCtrl());
     
      JSONObject mainBlock = spreadsheetCtrl.getRangeAttrs(sheet, SpreadsheetCtrl.Header.BOTH, SpreadsheetCtrl.CellAttribute.ALL, left, top, right, bottom);
      if (spreadsheet.getColumnfreeze() >= 0) {
        mainBlock.put("leftFrozen",
            spreadsheetCtrl.getRangeAttrs(sheet, SpreadsheetCtrl.Header.BOTH, SpreadsheetCtrl.CellAttribute.ALL, 0, top, spreadsheet.getColumnfreeze(), bottom));
      }
      if (spreadsheet.getRowfreeze() >= 0) {
        mainBlock.put("topFrozen",
            spreadsheetCtrl.getRangeAttrs(sheet, SpreadsheetCtrl.Header.BOTH, SpreadsheetCtrl.CellAttribute.ALL, left, 0, right, spreadsheet.getRowfreeze()));
      }
      spreadsheet.smartUpdate("activeRangeUpdate", mainBlock);
    }
  }
View Full Code Here

    int row = (Integer) data.get("row");
    int col = (Integer) data.get("col");
    int mx = (Integer) data.get("mx");//x offset against body
    int my = (Integer) data.get("my");
   
    Spreadsheet spreadsheet = (Spreadsheet) comp;
    Worksheet sheet = ((Spreadsheet) comp).getSelectedSheet();
    if (!Utils.getSheetUuid(sheet).equals(sheetId))
      return;
   
    if ("lc".equals(type)) {
View Full Code Here

   
    final Map data = (Map) request.getData();
    if (data == null || data.size() != 14)
      throw new UiException(MZk.ILLEGAL_REQUEST_WRONG_DATA, new Object[] {Objects.toString(data), SelectSheetCommand.class });
   
    Spreadsheet spreadsheet = ((Spreadsheet) comp);
    String sheetId = (String) data.get("sheetId");
    boolean cacheInClient = (Boolean) data.get("cache");
    int row = (Integer)data.get("row");
    int col = (Integer)data.get("col");
   
    //selection
    int top = (Integer)data.get("top");
    int right = (Integer)data.get("right");
    int bottom = (Integer)data.get("bottom");
    int left = (Integer)data.get("left");
   
    //highlight
    int highlightLeft = (Integer)data.get("hleft");
    int highlightTop = (Integer)data.get("htop");
    int highlightRight = (Integer)data.get("hright");
    int highlightBottom = (Integer)data.get("hbottom");
   
    //freeze
    int rowfreeze = AuRequests.getInt(data, "frow", -1);
    int colfreeze = AuRequests.getInt(data, "fcol", -1);
   
    Book book = spreadsheet.getBook();
    int len = book.getNumberOfSheets();
    for (int i = 0; i < len; i++) {
      Worksheet sheet = book.getWorksheetAt(i);
      if (sheetId.equals(((SheetCtrl)sheet).getUuid())) {
        spreadsheet.setSelectedSheetDirectly(sheet.getSheetName(), cacheInClient, row, col,
            left, top, right, bottom,
            highlightLeft, highlightTop, highlightRight, highlightBottom,
            rowfreeze, colfreeze);
        break;
      }
View Full Code Here

 
  public void onFocusedEvent(CellEvent event){
    int row=event.getRow();
    int col=event.getColumn();
   
    Spreadsheet targetSpreadsheet;
    if(event.getTarget()==ss[0])
      ss[1].moveEditorFocus("ss1", "ss1", "red", row, col);
    else
      ss[0].moveEditorFocus("ss0", "ss0", "green", row, col);
  }
View Full Code Here

  Spreadsheet spreadsheet;
  Book book;
 

  public void afterCompose() {
    spreadsheet = new Spreadsheet();
    windowPopupOnceByName("fileOpenViewWin");
    windowPopupOnceByName("menuPrintWin");
        try {
      Class.forName("com.mysql.jdbc.Driver").newInstance();
    } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.zkoss.zss.ui.Spreadsheet$HelperContainer

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.