Class StickyNote

    • Method Detail

      • create

        public static StickyNote create​(Document targetDocument,
                                        Point topLeft,
                                        java.lang.String content,
                                        Paint paint)

        Create a sticky note annotation.

        The returned sticky note annotation is not yet part of any page. It can be added to a page's list of annotations.
        Parameters:
        targetDocument - The output document with which the returned object is associated
        topLeft - The location of the annotation's upper left corner on the page
        content - The text content
        paint - The paint for the sticky note icon.
        Returns:
        The newly created sticky note annotation
        Throws:
        java.lang.IllegalArgumentException - if the targetDocument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument is read-only
        java.lang.IllegalArgumentException - if the color space of the paint argument is not a device color space
        java.lang.IllegalArgumentException - if the paint has a non-nullpdftoolbox.pdf.content.Paint.getTransparency with pdftoolbox.pdf.content.Transparency.getBlendMode other than pdftoolbox.pdf.content.BlendMode.NORMAL
        java.lang.IllegalArgumentException - if the paint argument is not associated with the targetDocument
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if topLeft is null
        java.lang.IllegalArgumentException - if paint is null
      • getPaint

        public Paint getPaint()
                       throws CorruptException

        The paint for the icon and the popup (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        CorruptException - if the PDF is corrupt and the annotation's paint cannot be read
      • getPopup

        public Popup getPopup()

        The pop-up (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed