git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1742880 13f79535-47bb-0310-9956-ffa450edef68tags/REL_3_15_BETA2
@@ -17,6 +17,7 @@ | |||
package org.apache.poi.xssf.usermodel.examples; | |||
import org.apache.poi.ss.usermodel.*; | |||
import org.apache.poi.ss.util.CellAddress; | |||
import org.apache.poi.xssf.usermodel.XSSFWorkbook; | |||
import java.io.IOException; | |||
@@ -68,8 +69,7 @@ public class CellComments { | |||
comment2.setString(str2); | |||
comment2.setAuthor("Apache POI"); | |||
comment2.setColumn(2); | |||
comment2.setRow(2); | |||
comment2.setAddress(new CellAddress("C3")); | |||
String fname = "comments.xlsx"; | |||
FileOutputStream out = new FileOutputStream(fname); |
@@ -113,6 +113,10 @@ public interface Comment { | |||
/** | |||
* Return defines position of this anchor in the sheet. | |||
* The anchor is the yellow box/balloon that is rendered on top of the sheets | |||
* when the comment is visible. | |||
* | |||
* To associate a comment with a different cell, use {@link #setAddress}. | |||
* | |||
* @return defines position of this anchor in the sheet | |||
*/ |
@@ -1039,8 +1039,7 @@ public final class XSSFCell implements Cell { | |||
return; | |||
} | |||
comment.setRow(getRowIndex()); | |||
comment.setColumn(getColumnIndex()); | |||
comment.setAddress(getRowIndex(), getColumnIndex()); | |||
} | |||
/** |