Class XSSFComment

    • 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.
      • XSSFComment

        public XSSFComment​(Comments 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.
        Since:
        POI 5.2.0
    • Method Detail

      • getAuthor

        public String getAuthor()
        Specified by:
        getAuthor in interface Comment
        Returns:
        Name of the original comment author. Default value is blank.
      • setAuthor

        public void setAuthor​(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()
        Specified by:
        getColumn in interface Comment
        Returns:
        the 0-based column of the cell that the comment is associated with.
      • getRow

        public int getRow()
        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
      • setAddress

        public void setAddress​(int row,
                               int col)
        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
      • 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​(String string)
      • getCTComment

        public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTComment getCTComment()
        Returns:
        the xml bean holding this comment's properties
        Since:
        POI 5.2.0 (was protected before POI 5.2.0)
      • getCTShape

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

        public int hashCode()
        Overrides:
        hashCode in class Object