public abstract class CommentsTableBase extends org.apache.poi.ooxml.POIXMLDocumentPart implements org.apache.poi.xssf.model.Comments, AutoCloseable
The comments table contains all the necessary information for displaying the string: the text, formatting properties, and phonetic properties (for East Asian languages).
| Modifier and Type | Field and Description |
|---|---|
protected ConcurrentMap<Integer,String> |
authors |
protected ConcurrentMap<String,com.github.pjfanning.poi.xssf.streaming.SerializableComment> |
comments |
protected boolean |
fullFormat |
protected boolean |
ignoreDrawing |
protected org.apache.poi.ss.usermodel.Sheet |
sheet |
| Modifier | Constructor and Description |
|---|---|
protected |
CommentsTableBase(boolean fullFormat) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Iterator<Integer> |
authorsKeyIterator() |
protected abstract Iterator<String> |
commentsKeyIterator() |
void |
commentUpdated(org.apache.poi.xssf.usermodel.XSSFComment comment) |
protected void |
commit() |
org.apache.poi.xssf.usermodel.XSSFComment |
createNewComment(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor) |
int |
findAuthor(String author) |
org.apache.poi.xssf.usermodel.XSSFComment |
findCellComment(org.apache.poi.ss.util.CellAddress cellAddress) |
String |
getAuthor(long authorId) |
Iterator<org.apache.poi.ss.util.CellAddress> |
getCellAddresses() |
protected abstract org.slf4j.Logger |
getLogger() |
int |
getNumberOfAuthors() |
int |
getNumberOfComments() |
boolean |
isIgnoreDrawing() |
void |
readFrom(InputStream is)
Read this comments table from an XML file.
|
void |
referenceUpdated(org.apache.poi.ss.util.CellAddress oldReference,
org.apache.poi.xssf.usermodel.XSSFComment comment) |
boolean |
removeComment(org.apache.poi.ss.util.CellAddress cellRef) |
void |
setIgnoreDrawing(boolean ignoreDrawing) |
void |
setSheet(org.apache.poi.ss.usermodel.Sheet sheet) |
void |
writeTo(OutputStream out)
Write this table out as XML.
|
_invokeOnDocumentRead, addRelation, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommitted, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeRelation, removeRelation, removeRelation, setCommitted, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloseprotected org.apache.poi.ss.usermodel.Sheet sheet
protected boolean ignoreDrawing
protected final boolean fullFormat
protected ConcurrentMap<String,com.github.pjfanning.poi.xssf.streaming.SerializableComment> comments
protected ConcurrentMap<Integer,String> authors
protected abstract org.slf4j.Logger getLogger()
public void setIgnoreDrawing(boolean ignoreDrawing)
ignoreDrawing - set to true if you don't need the drawing/shape data on the comments
(default is false) - ignoring the drawing/shape data can save memorypublic boolean isIgnoreDrawing()
@Internal public void setSheet(org.apache.poi.ss.usermodel.Sheet sheet)
setSheet in interface org.apache.poi.xssf.model.Commentsprotected void commit()
throws IOException
commit in class org.apache.poi.ooxml.POIXMLDocumentPartIOExceptionpublic void readFrom(InputStream is) throws IOException
is - The input stream containing the XML document.IOException - if an error occurs while reading.public int getNumberOfComments()
getNumberOfComments in interface org.apache.poi.xssf.model.Commentspublic int getNumberOfAuthors()
getNumberOfAuthors in interface org.apache.poi.xssf.model.Commentspublic String getAuthor(long authorId)
getAuthor in interface org.apache.poi.xssf.model.Commentspublic int findAuthor(String author)
findAuthor in interface org.apache.poi.xssf.model.Commentspublic org.apache.poi.xssf.usermodel.XSSFComment findCellComment(org.apache.poi.ss.util.CellAddress cellAddress)
findCellComment in interface org.apache.poi.xssf.model.Commentspublic boolean removeComment(org.apache.poi.ss.util.CellAddress cellRef)
removeComment in interface org.apache.poi.xssf.model.Commentspublic Iterator<org.apache.poi.ss.util.CellAddress> getCellAddresses()
getCellAddresses in interface org.apache.poi.xssf.model.Commentspublic org.apache.poi.xssf.usermodel.XSSFComment createNewComment(org.apache.poi.ss.usermodel.ClientAnchor clientAnchor)
createNewComment in interface org.apache.poi.xssf.model.Commentspublic void referenceUpdated(org.apache.poi.ss.util.CellAddress oldReference,
org.apache.poi.xssf.usermodel.XSSFComment comment)
referenceUpdated in interface org.apache.poi.xssf.model.Commentspublic void commentUpdated(org.apache.poi.xssf.usermodel.XSSFComment comment)
commentUpdated in interface org.apache.poi.xssf.model.Commentspublic void writeTo(OutputStream out) throws IOException
out - The stream to write to.IOException - if an error occurs while writing.