- 使用 Spring Initializr 创建 Spring Boot 应用程序
- 在Spring Boot中配置Cassandra
- 在 Spring Boot 上配置 Tomcat 连接池
- 将Camel消息路由到嵌入WildFly的Artemis上
本文整理了Java中org.apache.poi.xssf.usermodel.XSSFComment
类的一些代码示例,展示了XSSFComment
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XSSFComment
类的具体详情如下:
包路径:org.apache.poi.xssf.usermodel.XSSFComment
类名称:XSSFComment
暂无
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public void cell(String cellRef, String formattedValue, XSSFComment comment) {
if (firstCellOfRow) {
firstCellOfRow = false;
} else {
output.append('\t');
}
if (formattedValue != null) {
checkMaxTextSize(output, formattedValue);
output.append(formattedValue);
}
if (includeCellComments && comment != null) {
String commentText = comment.getString().getString().replace('\n', ' ');
output.append(formattedValue != null ? " Comment by " : "Comment by ");
checkMaxTextSize(output, commentText);
if (commentText.startsWith(comment.getAuthor() + ": ")) {
output.append(commentText);
} else {
output.append(comment.getAuthor()).append(": ").append(commentText);
}
}
}
代码示例来源:origin: org.apache.poi/poi-ooxml
public void setString(String string) {
setString(new XSSFRichTextString(string));
}
代码示例来源:origin: org.apache.poi/poi-ooxml
int column1 = o1.getColumn();
int column2 = o2.getColumn();
return o1.hashCode() - o2.hashCode();
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);
entry.getKey().setColumn(entry.getValue());
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Set the row of the cell that contains the comment
*
* If changing both row and column, use {@link #setAddress}.
*
* @param row the 0-based row of the cell that contains the comment
*/
@Override
public void setRow(int row) {
setAddress(row, getColumn());
}
代码示例来源:origin: org.apache.poi/poi-ooxml
@Override
public int hashCode() {
return ((getRow()*17) + getColumn())*31;
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Set the column of the cell that contains the comment
*
* If changing both row and column, use {@link #setAddress}.
*
* @param col the 0-based column of the cell that contains the comment
*/
@Override
public void setColumn(int col) {
setAddress(getRow(), col);
}
代码示例来源:origin: org.apache.poi/poi-ooxml
int row1 = o1.getRow();
int row2 = o2.getRow();
return o1.hashCode() - o2.hashCode();
XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
vml == null ? null : vml.findCommentShape(rownum, ref.getCol()));
entry.getKey().setRow(entry.getValue());
代码示例来源: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;
}
代码示例来源: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: ZuInnoTe/hadoopoffice
@Override
public void cell(String cellReference, String formattedValue, XSSFComment comment) {
// create empty column, if needed
CellAddress currentCellAddress = new CellAddress(cellReference);
for (int i=this.currentColumn;i<currentCellAddress.getColumn();i++) {
this.spreadSheetCellDAOCurrentRow.add(null);
this.currentColumn++;
}
// add column
SpreadSheetCellDAO currentDAO = null;
if (comment!=null) {
currentDAO = new SpreadSheetCellDAO(formattedValue,comment.getString().getString(), "", cellReference,this.sheetName);
} else {
currentDAO = new SpreadSheetCellDAO(formattedValue,"", "", cellReference,this.sheetName);
}
this.currentColumn++;
this.spreadSheetCellDAOCurrentRow.add(currentDAO);
}
@Override
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Assign a cell comment to a cell region in this worksheet
*
* @param cellRef cell region
* @param comment the comment to assign
* @deprecated since Nov 2009 use {@link XSSFCell#setCellComment(org.apache.poi.ss.usermodel.Comment)} instead
*/
@Deprecated
public static void setCellComment(String cellRef, XSSFComment comment) {
CellReference cellReference = new CellReference(cellRef);
comment.setRow(cellReference.getRow());
comment.setColumn(cellReference.getCol());
}
代码示例来源:origin: org.apache.poi/poi-ooxml
/**
* Creates a new XSSFComment, associated with a given
* low level comment object.
*/
public XSSFComment(CommentsTable comments, CTComment comment, CTShape vmlShape) {
_comment = comment;
_comments = comments;
_vmlShape = vmlShape;
// we potentially need to adjust the column/row information in the shape
// the same way as we do in setRow()/setColumn()
if(comment != null && vmlShape != null && vmlShape.sizeOfClientDataArray() > 0) {
CellReference ref = new CellReference(comment.getRef());
CTClientData clientData = vmlShape.getClientDataArray(0);
clientData.setRowArray(0, new BigInteger(String.valueOf(ref.getRow())));
clientData.setColumnArray(0, new BigInteger(String.valueOf(ref.getCol())));
avoidXmlbeansCorruptPointer(vmlShape);
}
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Set the row of the cell that contains the comment
*
* @param row the 0-based row of the cell that contains the comment
*/
public void setRow(int row) {
String oldRef = _comment.getRef();
String newRef =
(new CellReference(row, getColumn())).formatAsString();
_comment.setRef(newRef);
_comments.referenceUpdated(oldRef, _comment);
if(_vmlShape != null) _vmlShape.getClientDataArray(0).setRowArray(0, new BigInteger(String.valueOf(row)));
}
代码示例来源:origin: org.openl.rules/org.openl.lib.poi.dev
/**
* Set the column of the cell that contains the comment
*
* @param col the 0-based column of the cell that contains the comment
*/
public void setColumn(int col) {
String oldRef = _comment.getRef();
CellReference ref = new CellReference(getRow(), col);
_comment.setRef(ref.formatAsString());
_comments.referenceUpdated(oldRef, _comment);
if(_vmlShape != null) {
_vmlShape.getClientDataArray(0).setColumnArray(
new BigInteger[] { new BigInteger(String.valueOf(col)) }
);
// There is a very odd xmlbeans bug when changing the column
// arrays which can lead to corrupt pointer
// This call seems to fix them again... See bug #50795
_vmlShape.getClientDataList().toString();
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
int row1 = o1.getRow();
int row2 = o2.getRow();
return o1.hashCode() - o2.hashCode();
XSSFComment xssfComment = new XSSFComment(sheetComments, comment,
vml == null ? null : vml.findCommentShape(rownum, ref.getCol()));
entry.getKey().setRow(entry.getValue());
代码示例来源: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.servicemix.bundles/org.apache.servicemix.bundles.poi
@Override
public int hashCode() {
return ((getRow()*17) + getColumn())*31;
}
代码示例来源:origin: jbaliuka/x4j-analytic
public XLSXCellNode(XSSFSheet sheet,XSSFCell cell,int index,XLSXExpression expression) {
super(sheet,cell,expression);
assert cell != null : "null cell" ;
if(cell.getCTCell().isSetF()){
formulaStringValue = cell.getCTCell().getF().getStringValue();
}
colRef = CellReference.convertNumToColString(index);
int rowRef = getCell().getRowIndex() + 1;
absoluteRef = colRef + rowRef;
if(cell.getCTCell().isSetS()){
s = cell.getCTCell().getS();
}
workbookPr = getSheet().getWorkbook().getCTWorkbook().getWorkbookPr();
comment = cell.getCellComment();
if(comment != null){
commnetExpr = CellExpressionParser.parseExpression(comment.getString().getString());
}
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Set the row of the cell that contains the comment
*
* If changing both row and column, use {@link #setAddress}.
*
* @param row the 0-based row of the cell that contains the comment
*/
@Override
public void setRow(int row) {
setAddress(row, getColumn());
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.poi
/**
* Set the column of the cell that contains the comment
*
* If changing both row and column, use {@link #setAddress}.
*
* @param col the 0-based column of the cell that contains the comment
*/
@Override
public void setColumn(int col) {
setAddress(getRow(), col);
}
我尝试理解[c代码 -> 汇编]代码 void node::Check( data & _data1, vector& _data2) { -> push ebp -> mov ebp,esp ->
我需要在当前表单(代码)的上下文中运行文本文件中的代码。其中一项要求是让代码创建新控件并将其添加到当前窗体。 例如,在Form1.cs中: using System.Windows.Forms; ..
我有此 C++ 代码并将其转换为 C# (.net Framework 4) 代码。有没有人给我一些关于 malloc、free 和 sprintf 方法的提示? int monate = ee; d
我的网络服务器代码有问题 #include #include #include #include #include #include #include int
给定以下 html 代码,将列表中的第三个元素(即“美丽”一词)以斜体显示的 CSS 代码是什么?当然,我可以给这个元素一个 id 或一个 class,但 html 代码必须保持不变。谢谢
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以便用事实和引用来回答。 关闭 7 年前。
我试图制作一个宏来避免重复代码和注释。 我试过这个: #define GrowOnPage(any Page, any Component) Component.Width := Page.Surfa
我正在尝试将我的旧 C++ 代码“翻译”成头条新闻所暗示的 C# 代码。问题是我是 C# 中的新手,并不是所有的东西都像 C++ 中那样。在 C++ 中这些解决方案运行良好,但在 C# 中只是不能。我
在 Windows 10 上工作,R 语言的格式化程序似乎没有在 Visual Studio Code 中完成它的工作。我试过R support for Visual Studio Code和 R-T
我正在处理一些报告(计数),我必须获取不同参数的计数。非常简单但乏味。 一个参数的示例查询: qCountsEmployee = ( "select count(*) from %s wher
最近几天我尝试从 d00m 调试网络错误。我开始用尽想法/线索,我希望其他 SO 用户拥有可能有用的宝贵经验。我希望能够提供所有相关信息,但我个人无法控制服务器环境。 整个事情始于用户注意到我们应用程
我有一个 app.js 文件,其中包含如下 dojo amd 模式代码: require(["dojo/dom", ..], function(dom){ dom.byId('someId').i
我对“-gencode”语句中的“code=sm_X”选项有点困惑。 一个例子:NVCC 编译器选项有什么作用 -gencode arch=compute_13,code=sm_13 嵌入库中? 只有
我为我的表格使用 X-editable 框架。 但是我有一些问题。 $(document).ready(function() { $('.access').editable({
我一直在通过本教程学习 flask/python http://blog.miguelgrinberg.com/post/the-flask-mega-tutorial-part-i-hello-wo
我想将 Vim 和 EMACS 用于 CNC、G 代码和 M 代码。 Vim 或 EMACS 是否有任何语法或模式来处理这种类型的代码? 最佳答案 一些快速搜索使我找到了 this vim 和 thi
关闭。这个问题不符合Stack Overflow guidelines .它目前不接受答案。 想改进这个问题?更新问题,使其成为 on-topic对于堆栈溢出。 7年前关闭。 Improve this
这个问题在这里已经有了答案: Enabling markdown highlighting in Vim (5 个回答) 6年前关闭。 当我在 Vim 中编辑包含 Markdown 代码的 READM
我正在 Swift3 iOS 中开发视频应用程序。基本上我必须将视频 Assets 和音频与淡入淡出效果合并为一个并将其保存到 iPhone 画廊。为此,我使用以下方法: private func d
pipeline { agent any stages { stage('Build') { steps { e
我是一名优秀的程序员,十分优秀!