public abstract class CommentsTableBase extends POIXMLDocumentPart implements 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).
POIXMLDocumentPart.RelationPart| 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 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(XSSFComment comment) |
protected void |
commit() |
XSSFComment |
createNewComment(ClientAnchor clientAnchor) |
int |
findAuthor(String author) |
XSSFComment |
findCellComment(CellAddress cellAddress) |
String |
getAuthor(long authorId) |
Iterator<CellAddress> |
getCellAddresses() |
protected abstract Logger |
getLogger() |
int |
getNumberOfAuthors() |
int |
getNumberOfComments() |
boolean |
isIgnoreDrawing() |
void |
readFrom(InputStream is)
Read this comments table from an XML file.
|
void |
referenceUpdated(CellAddress oldReference,
XSSFComment comment) |
boolean |
removeComment(CellAddress cellRef) |
void |
setIgnoreDrawing(boolean ignoreDrawing) |
void |
setSheet(Sheet sheet) |
void |
writeTo(OutputStream out)
Write this table out as XML.
|
_invokeOnDocumentRead, addRelation, createHyperlink, createRelationship, createRelationship, createRelationship, getNextPartNumber, getPackagePart, getParent, getReferenceRelationship, getReferenceRelationships, getRelationById, getRelationId, getRelationPartById, getRelationParts, getRelations, getTargetPart, isCommitted, onDocumentCreate, onDocumentRead, onDocumentRemove, onSave, prepareForCommit, read, rebase, removeReferenceRelationship, removeRelation, removeRelation, removeRelation, setCommitted, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcloseprotected 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 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()
protected void commit()
throws IOException
commit in class 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 Commentspublic int getNumberOfAuthors()
getNumberOfAuthors in interface Commentspublic int findAuthor(String author)
findAuthor in interface Commentspublic XSSFComment findCellComment(CellAddress cellAddress)
findCellComment in interface Commentspublic boolean removeComment(CellAddress cellRef)
removeComment in interface Commentspublic Iterator<CellAddress> getCellAddresses()
getCellAddresses in interface Commentspublic XSSFComment createNewComment(ClientAnchor clientAnchor)
createNewComment in interface Commentspublic void referenceUpdated(CellAddress oldReference, XSSFComment comment)
referenceUpdated in interface Commentspublic void commentUpdated(XSSFComment comment)
commentUpdated in interface Commentspublic void writeTo(OutputStream out) throws IOException
out - The stream to write to.IOException - if an error occurs while writing.