Package org.zkoss.zss.model

Examples of org.zkoss.zss.model.Format


  }
 
  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

  }
 
  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);
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

        HTMLs.appendAttribute(sb, "z.zsh",zsh);
      }
       
     
      if(cell!=null){
        Format format = cell.getFormat();
        if(format != null && format.isTextWrap()){
          HTMLs.appendAttribute(sb, "z.wrap", "t");
        }
       
        TextHAlign textHAlign = cell.getTextHAlign();
        if (textHAlign != null) {
View Full Code Here

  }
 
  private void moveCell(CellIndex dstci) {
    if (_cell != null) {
      final Object val = _cell.getValue();
      final Format format = _cell.getFormat();
      _cell.setValue(null); //clear the value
      //get the destination cell, create one if not exist.
      final Cell dstcell = dstci.getCell();
      dstcell.setValue(val);
      ((CellImpl)dstcell).mySetFormat(format, false);
View Full Code Here

   
    Object value = cell.getText();
    String txt = value==null?"":value.toString();
   
    boolean wrap = false;
    Format format = cell.getFormat();
    if(format != null && format.isTextWrap()){
      wrap = true;
    }
   
    txt = Utils.escapeCellText(txt,wrap,wrap);
View Full Code Here

        JSONObj result = new JSONObj();
        result.setData("r", row);
        result.setData("c", col);
        result.setData("type", "udcell");
       
        Format format = (cell==null)?null:cell.getFormat();
        boolean wrap = false;
       
        CellFormatHelper cfh = new CellFormatHelper(sheet,row,col,getMergeMatrixHelper(sheet));
        String st = cfh.getHtmlStyle();
        String ist = cfh.getInnerHtmlStyle();
        if (st != null && !"".equals(st)){
          result.setData("st", st);// style of text cell.
        }
        if (ist != null && !"".equals(ist)){
          result.setData("ist", ist);// inner style of text cell
        }
        if (format!=null && format.isTextWrap()){
          wrap = true;
          result.setData("wrap", true);
        }
        if (cfh.hasRightBorder()){
          result.setData("rbo",true);
View Full Code Here

TOP

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

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.