Package org.zkoss.zss.ui.impl

Examples of org.zkoss.zss.ui.impl.HeaderPositionHelper$HeaderPositionInfo


      return Spreadsheet.this.getWidgetHandler();
    }
   
    public String getRowOuterAttrs(int row){
      Sheet sheet = getSelectedSheet();
      HeaderPositionHelper helper = Spreadsheet.this.getRowPositionHelper(sheet);
      StringBuffer sb = new StringBuffer();
      sb.append("class=\"zsrow");
      int[] meta = helper.getMeta(row);
      int zsh = -1;
      if(meta!=null){
        zsh = meta[2];
        sb.append(" zsh").append(zsh);
      }
View Full Code Here


   
    public String getCellOuterAttrs(int row,int col){
      StringBuffer sb = new StringBuffer();
      Sheet sheet = getSelectedSheet();
      MergeMatrixHelper matrix = getMergeMatrixHelper(sheet);
      HeaderPositionHelper rowHelper = Spreadsheet.this.getRowPositionHelper(sheet);
      HeaderPositionHelper colHelper = Spreadsheet.this.getColumnPositionHelper(sheet);
      Cell cell = sheet.getCell(row,col);
     
     
      //class="zscell zscw${cstatus.index} zsrhi${rstatus.index} ${s:getCellSClass(self,rstatus.index,cstatus.index)}"
      sb.append("class=\"zscell");
      int zsh = -1;
      int zsw = -1;
      int[] meta = colHelper.getMeta(col);
      if(meta!=null){
        zsw = meta[2];
        sb.append(" zsw").append(zsw);
      }
      meta = rowHelper.getMeta(row);
View Full Code Here

   
    public String getCellInnerAttrs(int row,int col){
      Sheet sheet = getSelectedSheet();
      Cell cell = sheet.getCell(row,col);
      StringBuffer sb = new StringBuffer();
      HeaderPositionHelper rowHelper = Spreadsheet.this.getRowPositionHelper(sheet);
      HeaderPositionHelper colHelper = Spreadsheet.this.getColumnPositionHelper(sheet);
     
      //class="zscelltxt zscwi${cstatus.index} zsrhi${rstatus.index}"
      sb.append("class=\"zscelltxt");
      int[] meta = colHelper.getMeta(col);
      if(meta!=null){
        sb.append(" zswi").append(meta[2]);
      }
      meta = rowHelper.getMeta(row);
      if(meta!=null){
View Full Code Here

      return sb.toString();
    }
   
    public String getTopHeaderOuterAttrs(int col){
      Sheet sheet = getSelectedSheet();
      HeaderPositionHelper colHelper = Spreadsheet.this.getColumnPositionHelper(sheet);
      StringBuffer sb = new StringBuffer();
     
      //class="zstopcell zscw${status.index}"  z.c="${status.index}"
      sb.append("class=\"zstopcell");
      int zsw = -1;
      int[] meta = colHelper.getMeta(col);
      if(meta!=null){
        zsw = meta[2];
        sb.append(" zsw").append(zsw);
      }
      sb.append("\" ");
View Full Code Here

     
      return sb.toString();
    }
    public String getTopHeaderInnerAttrs(int col){
      Sheet sheet = getSelectedSheet();
      HeaderPositionHelper colHelper = Spreadsheet.this.getColumnPositionHelper(sheet);
      StringBuffer sb = new StringBuffer();
     
      //class="zstopcelltxt zscw${status.index}"
      sb.append("class=\"zstopcelltxt");
      int[] meta = colHelper.getMeta(col);
      if(meta!=null){
        sb.append(" zswi").append(meta[2]);
      }
      sb.append("\" ");
     
View Full Code Here

      return sb.toString();
    }
   
    public String getLeftHeaderOuterAttrs(int row){
      Sheet sheet = getSelectedSheet();
      HeaderPositionHelper rowHelper = Spreadsheet.this.getRowPositionHelper(sheet);
      StringBuffer sb = new StringBuffer();
     
      //class="zsleftcell zsrow zslrh${status.index}"  z.r="${status.index}"
      sb.append("class=\"zsleftcell zsrow");
      int zsh = -1;
      int[] meta = rowHelper.getMeta(row);
      if(meta!=null){
        zsh = meta[2];
        sb.append(" zslh").append(zsh);
      }
      sb.append("\" ");
View Full Code Here

      return sb.toString();
    }
   
    public String getLeftHeaderInnerAttrs(int row){
      Sheet sheet = getSelectedSheet();
      HeaderPositionHelper rowHelper = Spreadsheet.this.getRowPositionHelper(sheet);
      StringBuffer sb = new StringBuffer();
     
      sb.append("class=\"zsleftcelltxt ");
      int[] meta = rowHelper.getMeta(row);
      if(meta!=null){
        sb.append(" zslh").append(meta[2]);
      }
      sb.append("\" ");
     
View Full Code Here

      HTMLs.appendAttribute(sb, "z.hl", getRectStr(_highlightRect));
    }
   
   
    // generate customized row & column information
    HeaderPositionHelper colHelper = this.getColumnPositionHelper(sheet);
    HeaderPositionHelper rowHelper = this.getRowPositionHelper(sheet);
   
    HTMLs.appendAttribute(sb, "z.csc", getSizeHelperStr(colHelper));

    HTMLs.appendAttribute(sb, "z.csr", getSizeHelperStr(rowHelper));
   
View Full Code Here

    return mmhelper;
  }
 
  private HeaderPositionHelper getRowPositionHelper(Sheet sheet){
    if(sheet != getSelectedSheet()) throw new UiException("not current selected sheet ");
    HeaderPositionHelper helper = (HeaderPositionHelper)getAttribute(ROW_SIZE_HELPER_KEY);
   
    if(helper==null){
      int defaultSize = this.getRowheight();
      int rhs[][] = sheet.getRowHeights();
      //System.out.println("height====>"+rhs.length);
      ArrayList heights = new ArrayList();
      for(int i=0;i<rhs.length;i++){
        //System.out.println("height====>"+rhs[i][0]+","+rhs[i][1]);
        heights.add(new int []{rhs[i][0],rhs[i][1]});
      }
      int size = heights.size();
      int[][] cheights = new int[size][3];
      for(int i=0;i<size;i++){
        int[] r = (int[])heights.get(i);
        cheights[i][0]= r[0];
        cheights[i][1]= r[1];
        cheights[i][2]= _custRowId.next();
      }
     
      helper = new HeaderPositionHelper(defaultSize,cheights);
     
      setAttribute(ROW_SIZE_HELPER_KEY, helper);
    }
    return helper;
  }
View Full Code Here

    }
  }
 
  private HeaderPositionHelper getColumnPositionHelper(Sheet sheet){
    if(sheet != getSelectedSheet()) throw new UiException("not current selected sheet ");
    HeaderPositionHelper helper = (HeaderPositionHelper)getAttribute(COLUMN_SIZE_HELPER_KEY);
   
    if(helper==null){
      int defaultSize = this.getColumnwidth();
      int cws[][] = sheet.getColumnWidths();
      ArrayList widths = new ArrayList();
      //System.out.println("width====>"+cws.length);
      for(int i=0;i<cws.length ;i++){
        //System.out.println("width====>"+cws[i][0]+":"+cws[i][1]);
        widths.add(new int []{cws[i][0],cws[i][1]});
      }
      int size = widths.size();
      int[][] cwidths = new int[size][3];
      for(int i=0;i<size;i++){
        int[] r = (int[])widths.get(i);
        cwidths[i][0]= r[0];
        cwidths[i][1]= r[1];
        cwidths[i][2]= _custColId.next();
      }
     
      helper = new HeaderPositionHelper(defaultSize,cwidths);
     
      setAttribute(COLUMN_SIZE_HELPER_KEY, helper);
    }
    return helper;
  }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.ui.impl.HeaderPositionHelper$HeaderPositionInfo

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.