Package org.zkoss.poi.ss.usermodel

Examples of org.zkoss.poi.ss.usermodel.Comment


    }
    return srcStyle;
  }
 
  private static void copyComment(Cell srcCell, Cell dstCell) {
    final Comment srcComment = srcCell.getCellComment();
    Comment dstComment = dstCell.getCellComment();
    if (srcComment != null) {
      if (dstComment == null) {
        final Worksheet dstSheet = (Worksheet)dstCell.getSheet();
        final Workbook dstBook = dstSheet.getWorkbook();
        final CreationHelper dstFactory = dstBook.getCreationHelper();
        final Drawing drawing = dstSheet.createDrawingPatriarch();
        final ClientAnchor anchor = dstFactory.createClientAnchor();
        dstComment = drawing.createCellComment(anchor);
      }
      dstComment.setString(srcComment.getString());
      dstComment.setAuthor(srcComment.getAuthor());
      dstComment.setVisible(srcComment.isVisible());
      dstCell.setCellComment(dstComment);
    } else { //srcComment is null
      if (dstComment != null) {
        dstCell.removeCellComment();
      }
View Full Code Here

TOP

Related Classes of org.zkoss.poi.ss.usermodel.Comment

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.