Comment
Overview
Comment is a class in Aspose.Words FOSS for Java.
Inherits from: InlineStory, INodeWithAnnotationId, IMoveTrackableNode.
Represents a container for text of a comment.
Edition status of its 57 listed members (a property and its accessor methods are listed separately, overloads once): 57 not yet exercised by a verified example.
This class declares 37 methods for Comment objects in Java programs.
Available methods include: Comment, accept, acceptEnd, acceptStart, addReply, ensureMinimum, getAncestor, getAuthor, getDateTime, getDateTimeUtc, getDone, getFirstParagraph, and 24 additional methods.
Public members are accessible to any Java application after installing the Aspose.Words FOSS for Java package.
Properties: ancestor, author, dateTime, dateTimeUtc, deleteRevision, done, and 15 more.
Properties
| Name | Type | Access | Description |
|---|---|---|---|
nodeType | int | Read | Returns Comment. |
storyType | int | Read | Returns StoryType.COMMENTS. |
id | int | Read/Write | Gets or sets the comment identifier. |
initial | String | Read/Write | Returns or sets the initials of the user associated with a specific comment. |
dateTime | java.util.Date | Read/Write | Gets or sets the date time. |
dateTimeUtc | java.util.Date | Read | Gets the date time utc. |
author | String | Read/Write | Returns or sets the author name for a comment. |
ancestor | Comment | Read | Gets the ancestor. |
replies | CommentCollection | Read | Returns a collection of Comment objects that are immediate children of the specified comment. |
done | boolean | Read/Write | Gets or sets flag indicating that the comment has been marked done. |
parentId | int | Read/Write | Gets or sets the parent comment ID. |
parentParagraph | Paragraph | Read | Retrieves the parent Paragraph of this node. |
firstParagraph | Paragraph | Read | Gets the first paragraph in the story. |
lastParagraph | Paragraph | Read | Gets the last paragraph in the story. |
paragraphs | ParagraphCollection | Read | Gets a collection of paragraphs that are immediate children of the story. |
tables | TableCollection | Read | Gets a collection of tables that are immediate children of the story. |
insertRevision | boolean | Read | Gets the insert revision. |
deleteRevision | boolean | Read | Gets the delete revision. |
moveFromRevision | boolean | Read | Gets the move from revision. |
moveToRevision | boolean | Read | Gets the move to revision. |
font | Font | Read | Provides access to the font formatting of the anchor character of this object. |
Methods
| Signature | Description |
|---|---|
Comment(doc: DocumentBase) | Initializes a new instance of the Comment class. |
Comment(doc: DocumentBase, author: String, initial: String, dateTime: java.util.Date) | Creates a new Comment instance from doc, author, initial, dateTime. |
getNodeType() → int | Returns Comment. |
getStoryType() → int | Returns StoryType.COMMENTS. |
getId() → int | Gets or sets the comment identifier. |
setId(value: int) | Sets the id value. |
getInitial() → String | Returns or sets the initials of the user associated with a specific comment. |
setInitial(value: String) | Sets the initial value. |
getDateTime() → java.util.Date | Returns the date time. |
setDateTime(value: java.util.Date) | Sets the date time value. |
getDateTimeUtc() → java.util.Date | Returns the date time utc. |
getAuthor() → String | Returns or sets the author name for a comment. |
setAuthor(value: String) | Sets the author value. |
accept(visitor: DocumentVisitor) → boolean | Calls accept(visitor) on this Comment instance. |
addReply(author: String, initial: String, dateTime: java.util.Date, text: String) → Comment | Calls addReply(author, initial, dateTime, text) on this Comment instance. |
removeReply(reply: Comment) | Removes the specified reply to this comment. |
removeAllReplies() | Removes all replies to this comment. |
acceptStart(visitor: DocumentVisitor) → int | Accepts a visitor for visiting the start of the comment. |
acceptEnd(visitor: DocumentVisitor) → int | Accepts a visitor for visiting the end of the comment. |
setText(text: String) | This is a convenience method that allows to easily set text of the comment. |
getAncestor() → Comment | Returns the ancestor. |
getReplies() → CommentCollection | Returns a collection of Comment objects that are immediate children of the specified comment. |
getDone() → boolean | Gets or sets flag indicating that the comment has been marked done. |
setDone(value: boolean) | Sets the done value. |
getParentId() → int | Gets or sets the parent comment ID. |
setParentId(value: int) | Sets the parent id value. |
getParentParagraph() → Paragraph | Retrieves the parent Paragraph of this node. |
getFirstParagraph() → Paragraph | Gets the first paragraph in the story. |
getLastParagraph() → Paragraph | Gets the last paragraph in the story. |
getParagraphs() → ParagraphCollection | Gets a collection of paragraphs that are immediate children of the story. |
getTables() → TableCollection | Gets a collection of tables that are immediate children of the story. |
isInsertRevision() → boolean | Returns true if insert revision is set. |
isDeleteRevision() → boolean | Returns true if delete revision is set. |
isMoveFromRevision() → boolean | Returns true if move from revision is set. |
isMoveToRevision() → boolean | Returns true if move to revision is set. |
getFont() → Font | Provides access to the font formatting of the anchor character of this object. |
ensureMinimum() | If the last child is not a paragraph, creates and appends one empty paragraph. |