org.apache.poi.xssf.usermodel

## Class XSSFComment

- java.lang.Object
- - org.apache.poi.xssf.usermodel.XSSFComment

- All Implemented Interfaces:
    Comment

      public class XSSFComment
      extends java.lang.Object
      implements Comment

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `XSSFComment(CommentsTable comments, org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment comment, com.microsoft.schemas.vml.CTShape vmlShape)` Creates a new XSSFComment, associated with a given low level comment object.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `CellAddress` | `getAddress()` Get the address of the cell that this comment is attached to
    `java.lang.String` | `getAuthor()` Name of the original comment author
    `ClientAnchor` | `getClientAnchor()` Return defines position of this anchor in the sheet.
    `int` | `getColumn()` Return the column of the cell that contains the comment
    `protected org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment` | `getCTComment()`
    `protected com.microsoft.schemas.vml.CTShape` | `getCTShape()`
    `int` | `getRow()` Return the row of the cell that contains the comment
    `XSSFRichTextString` | `getString()` Fetches the rich text string of the comment
    `int` | `hashCode()`
    `boolean` | `isVisible()` Returns whether this comment is visible.
    `void` | `setAddress(CellAddress address)` Set the address of the cell that this comment is attached to
    `void` | `setAddress(int row, int col)` Set the address of the cell that this comment is attached to
    `void` | `setAuthor(java.lang.String author)` Name of the original comment author.
    `void` | `setColumn(int col)` Set the column of the cell that contains the comment If changing both row and column, use `setAddress(int, int)`.
    `void` | `setRow(int row)` Set the row of the cell that contains the comment If changing both row and column, use `setAddress(int, int)`.
    `void` | `setString(RichTextString string)` Sets the rich text string used by this comment.
    `void` | `setString(java.lang.String string)`
    `void` | `setVisible(boolean visible)` Sets whether this comment is visible.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### XSSFComment

          public XSSFComment(CommentsTable comments,
                             org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment comment,
                             com.microsoft.schemas.vml.CTShape vmlShape)

      Creates a new XSSFComment, associated with a given low level comment object.

  - ### Method Detail

    - #### getAuthor

          public java.lang.String getAuthor()

      Description copied from interface: `Comment`
      Name of the original comment author
      Specified by:
        `getAuthor` in interface `Comment`
      Returns:
        Name of the original comment author. Default value is blank.

    - #### setAuthor

          public void setAuthor(java.lang.String author)

      Name of the original comment author. Default value is blank.
      Specified by:
        `setAuthor` in interface `Comment`
      Parameters:
        `author` - the name of the original author of the comment

    - #### getColumn

          public int getColumn()

      Description copied from interface: `Comment`
      Return the column of the cell that contains the comment
      Specified by:
        `getColumn` in interface `Comment`
      Returns:
        the 0-based column of the cell that the comment is associated with.

    - #### getRow

          public int getRow()

      Description copied from interface: `Comment`
      Return the row of the cell that contains the comment
      Specified by:
        `getRow` in interface `Comment`
      Returns:
        the 0-based row index of the cell that the comment is associated with.

    - #### isVisible

          public boolean isVisible()

      Returns whether this comment is visible.
      Specified by:
        `isVisible` in interface `Comment`
      Returns:
        `true` if the comment is visible, `false` otherwise

    - #### setVisible

          public void setVisible(boolean visible)

      Sets whether this comment is visible.
      Specified by:
        `setVisible` in interface `Comment`
      Parameters:
        `visible` - `true` if the comment is visible, `false` otherwise

    - #### getAddress

          public CellAddress getAddress()

      Description copied from interface: `Comment`
      Get the address of the cell that this comment is attached to
      Specified by:
        `getAddress` in interface `Comment`
      Returns:
        comment cell address

    - #### setAddress

          public void setAddress(int row,
                                 int col)

      Description copied from interface: `Comment`
      Set the address of the cell that this comment is attached to
      Specified by:
        `setAddress` in interface `Comment`

    - #### setAddress

          public void setAddress(CellAddress address)

      Description copied from interface: `Comment`
      Set the address of the cell that this comment is attached to
      Specified by:
        `setAddress` in interface `Comment`

    - #### setColumn

          public void setColumn(int col)

      Set the column of the cell that contains the comment If changing both row and column, use `setAddress(int, int)`.
      Specified by:
        `setColumn` in interface `Comment`
      Parameters:
        `col` - the 0-based column of the cell that contains the comment

    - #### setRow

          public void setRow(int row)

      Set the row of the cell that contains the comment If changing both row and column, use `setAddress(int, int)`.
      Specified by:
        `setRow` in interface `Comment`
      Parameters:
        `row` - the 0-based row of the cell that contains the comment

    - #### getString

          public XSSFRichTextString getString()

      Description copied from interface: `Comment`
      Fetches the rich text string of the comment
      Specified by:
        `getString` in interface `Comment`
      Returns:
        the rich text string of the comment

    - #### setString

          public void setString(RichTextString string)

      Sets the rich text string used by this comment.
      Specified by:
        `setString` in interface `Comment`
      Parameters:
        `string` - the XSSFRichTextString used by this object.

    - #### setString

          public void setString(java.lang.String string)

    - #### getClientAnchor

          public ClientAnchor getClientAnchor()

      Description copied from 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 `Comment.setAddress(org.apache.poi.ss.util.CellAddress)`.
      Specified by:
        `getClientAnchor` in interface `Comment`
      Returns:
        defines position of this anchor in the sheet

    - #### getCTComment

          protected org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment getCTComment()

      Returns:
        the xml bean holding this comment's properties

    - #### getCTShape

          protected com.microsoft.schemas.vml.CTShape getCTShape()

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `java.lang.Object`

Copyright 2020 The Apache Software Foundation or its licensors, as applicable.