Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Cell


      }
    }
  }
 
  public static void setFillColor(Sheet sheet,int row,int col,String color){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setFillColor(color);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here


      }
    }
  }
 
  public static void setTextWrap(Sheet sheet,int row,int col,boolean wrap){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setTextWrap(wrap);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

      }
    }
  }
 
  public static void setFontSize(Sheet sheet,int row,int col,int size){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setFontSize(size);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

      }
    }
  }
 
  public static void setFontStrikethrough(Sheet sheet,int row,int col,boolean b){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setFontStrikethrough(b);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

      }
    }
  }
 
  public static void setFontType(Sheet sheet,int row,int col,String type){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setFontType(type);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

    BorderStyle bs = new BorderStyleImpl(color,linestyle);
    setBorder(sheet,row,col,bs,0x2);
  }
 
  public static void setBorder(Sheet sheet,int row,int col,BorderStyle bs,int at){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        if((at&0x08)!=0)((FormatImpl)format).setBorderLeft(bs);
        if((at&0x04)!=0)((FormatImpl)format).setBorderTop(bs);
        if((at&0x02)!=0)((FormatImpl)format).setBorderRight(bs);
        if((at&0x01)!=0)((FormatImpl)format).setBorderBottom(bs);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

      }
    }
  }
 
  public static void setFontStyle(Sheet sheet,int row,int col,FontStyle style){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setFontStyle(style);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

      }
    }
  }
 
  public static void setFontUnderline(Sheet sheet,int row,int col,FontUnderline underline){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setFontUnderline(underline);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

      }
    }
  }
 
  public static void setTextHAlign(Sheet sheet,int row,int col,TextHAlign textHAlign){
    Cell cell = Utils.getCell(sheet,row,col);
    if(cell!=null){
      Format format = cloneCellFormat(cell);
      if(format instanceof FormatImpl){
        ((FormatImpl)format).setTextHAlign(textHAlign);
        cell.setFormat(format);
      }
    }
  }
View Full Code Here

        if (bb != null) {
          hitBottom = appendBorderStyle(sb, "bottom", bb);
        }
      }
    }
    Cell next = null;
    if (!hitBottom) {
      next = _sheet.getCell(_row + 1, _col);
      /*if(next == null){ // don't search into merge ranges
        //check is _row+1,_col in merge range
        MergedRect rect = _mmHelper.getMergeRange(_row+1, _col);
        if(rect !=null){
          next = _sheet.getCell(rect.getTop(),rect.getLeft());
        }
      }*/
      if (next != null) {
        Format format = next.getFormat();
        if (format != null){
          BorderStyle bb = format.getBorderTop();// get top border of
          if (bb != null) {
            // set next row top border as cell's bottom border;
            hitBottom = appendBorderStyle(sb, "bottom", bb);
          }
        }
      }
    }
   
    //border depends on next cell's background color
    if(!hitBottom && next !=null){
      Format format = next.getFormat();
      if (format != null){
        String bgColor = format.getFillColor();
        if (AUTO_COLOR.equals(bgColor)) {
          bgColor = null;
        }
View Full Code Here

TOP

Related Classes of org.zkoss.zss.model.Cell

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.