gpt4 book ai didi

org.apache.poi.xssf.usermodel.XSSFComment.()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-22 15:41:05 25 4
gpt4 key购买 nike

本文整理了Java中org.apache.poi.xssf.usermodel.XSSFComment.<init>()方法的一些代码示例,展示了XSSFComment.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFComment.<init>()方法的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFComment
类名称:XSSFComment
方法名:<init>

XSSFComment.<init>介绍

[英]Creates a new XSSFComment, associated with a given low level comment object.
[中]创建与给定的低级注释对象关联的新XSSFComment。

代码示例

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Finds the cell comment at cellAddress, if one exists
 *
 * @param cellAddress the address of the cell to find a comment
 * @return cell comment if one exists, otherwise returns null
 */
@Override
public XSSFComment findCellComment(CellAddress cellAddress) {
  CTComment ct = getCTComment(cellAddress);
  return ct == null ? null : new XSSFComment(this, ct, null);
}

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Returns all cell comments on this sheet.
 * @return A map of each Comment in this sheet, keyed on the cell address where
 * the comment is located.
 * @deprecated use <code>getCellAddresses</code> instead
 */
@Removal(version = "4.2")
@Deprecated
public Map<CellAddress, XSSFComment> getCellComments() {
  prepareCTCommentCache();
  final TreeMap<CellAddress, XSSFComment> map = new TreeMap<>();
  
  for (final Entry<CellAddress, CTComment> e : commentRefs.entrySet()) {
    map.put(e.getKey(), new XSSFComment(this, e.getValue(), null));
  }
  
  return map;
}

代码示例来源:origin: org.apache.poi/poi-ooxml

/**
 * Return cell comment at row, column, if one exists. Otherwise returns null.
 *
 * @param address the location of the cell comment
 * @return the cell comment, if one exists. Otherwise return null.
 */
@Override
public XSSFComment getCellComment(CellAddress address) {
  if (sheetComments == null) {
    return null;
  }
  final int row = address.getRow();
  final int column = address.getColumn();
  CellAddress ref = new CellAddress(row, column);
  CTComment ctComment = sheetComments.getCTComment(ref);
  if(ctComment == null) {
    return null;
  }
  XSSFVMLDrawing vml = getVMLDrawing(false);
  return new XSSFComment(sheetComments, ctComment,
      vml == null ? null : vml.findCommentShape(row, column));
}

代码示例来源:origin: org.apache.poi/poi-ooxml

int newColumnIndex = shiftedRowNum(startColumnIndex, endColumnIndex, n, columnIndex);
if(newColumnIndex != columnIndex){
  XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
      vml == null ? null : vml.findCommentShape(ref.getRow(), columnIndex));
  commentsToShift.put(xssfComment, newColumnIndex);

代码示例来源:origin: org.apache.poi/poi-ooxml

XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
    vml == null ? null : vml.findCommentShape(rownum, ref.getCol()));

代码示例来源:origin: org.apache.poi/poi-ooxml

return new XSSFComment(comments, comments.newComment(ref), vmlShape);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Finds the cell comment at cellAddress, if one exists
 *
 * @param cellAddress the address of the cell to find a comment
 * @return cell comment if one exists, otherwise returns null
 */
@Override
public XSSFComment findCellComment(CellAddress cellAddress) {
  CTComment ct = getCTComment(cellAddress);
  return ct == null ? null : new XSSFComment(this, ct, null);
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

public XSSFComment findCellComment(String cellRef) {
  CTComment ct = getCTComment(cellRef);
  return ct == null ? null : new XSSFComment(this, ct, null);
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Returns all cell comments on this sheet.
 * @return A map of each Comment in this sheet, keyed on the cell address where
 * the comment is located.
 * @deprecated use <code>getCellAddresses</code> instead
 */
@Removal(version = "4.2")
@Deprecated
public Map<CellAddress, XSSFComment> getCellComments() {
  prepareCTCommentCache();
  final TreeMap<CellAddress, XSSFComment> map = new TreeMap<>();
  
  for (final Entry<CellAddress, CTComment> e : commentRefs.entrySet()) {
    map.put(e.getKey(), new XSSFComment(this, e.getValue(), null));
  }
  
  return map;
}

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

public XSSFComment getCellComment(int row, int column) {
  if (sheetComments == null) {
    return null;
  }
  String ref = new CellReference(row, column).formatAsString();
  CTComment ctComment = sheetComments.getCTComment(ref);
  if(ctComment == null) return null;
  XSSFVMLDrawing vml = getVMLDrawing(false);
  return new XSSFComment(sheetComments, ctComment,
      vml == null ? null : vml.findCommentShape(row, column));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

/**
 * Return cell comment at row, column, if one exists. Otherwise returns null.
 *
 * @param address the location of the cell comment
 * @return the cell comment, if one exists. Otherwise return null.
 */
@Override
public XSSFComment getCellComment(CellAddress address) {
  if (sheetComments == null) {
    return null;
  }
  final int row = address.getRow();
  final int column = address.getColumn();
  CellAddress ref = new CellAddress(row, column);
  CTComment ctComment = sheetComments.getCTComment(ref);
  if(ctComment == null) {
    return null;
  }
  XSSFVMLDrawing vml = getVMLDrawing(false);
  return new XSSFComment(sheetComments, ctComment,
      vml == null ? null : vml.findCommentShape(row, column));
}

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
    vml == null ? null : vml.findCommentShape(rownum, ref.getCol()));

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

int newColumnIndex = shiftedRowNum(startColumnIndex, endColumnIndex, n, columnIndex);
if(newColumnIndex != columnIndex){
  XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
      vml == null ? null : vml.findCommentShape(ref.getRow(), columnIndex));
  commentsToShift.put(xssfComment, newColumnIndex);

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi

return new XSSFComment(comments, comments.newComment(ref), vmlShape);

代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev

/**
 * Creates a comment.
 * @param anchor the client anchor describes how this comment is attached
 *               to the sheet.
 * @return the newly created comment.
 */
public XSSFComment createCellComment(ClientAnchor anchor) {
  XSSFClientAnchor ca = (XSSFClientAnchor)anchor;
  XSSFSheet sheet = (XSSFSheet)getParent();
  //create comments and vmlDrawing parts if they don't exist
  CommentsTable comments = sheet.getCommentsTable(true);
  XSSFVMLDrawing vml = sheet.getVMLDrawing(true);
  schemasMicrosoftComVml.CTShape vmlShape = vml.newCommentShape();
  if(ca.isSet()){
    String position =
        ca.getCol1() + ", 0, " + ca.getRow1() + ", 0, " +
        ca.getCol2() + ", 0, " + ca.getRow2() + ", 0";
    vmlShape.getClientDataArray(0).setAnchorArray(0, position);
  }
  XSSFComment shape = new XSSFComment(comments, comments.newComment(), vmlShape);
  shape.setColumn(ca.getCol1());
  shape.setRow(ca.getRow1());
  return shape;
}

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com