Class Widget


  • public class Widget
    extends NativeObject

    A form field widget

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Rectangle getBoundingBox()
      The location on the page (Getter)
      boolean getHidden()
      The widget's visibility (Getter)
      boolean getLocked()
      Whether the widget can be modified (Getter)
      boolean getNoPrint()
      The widget's visibility when printing (Getter)
      void setHidden​(boolean value)
      The widget's visibility (Setter)
      void setLocked​(boolean value)
      Whether the widget can be modified (Setter)
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getBoundingBox

        public Rectangle getBoundingBox()
                                 throws CorruptException

        The location on the page (Getter)

        Throws:
        java.lang.IllegalStateException - if the object has already been closed
        CorruptException - if the PDF is corrupt
      • getHidden

        public boolean getHidden()

        The widget's visibility (Getter)

        If true then the widget is present, but is invisible and not available for user interaction. Depending on the getNoPrint() property it will, however, still be visible when printing.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setHidden

        public void setHidden​(boolean value)

        The widget's visibility (Setter)

        If true then the widget is present, but is invisible and not available for user interaction. Depending on the getNoPrint() property it will, however, still be visible when printing.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • getLocked

        public boolean getLocked()

        Whether the widget can be modified (Getter)

        This does not restrict modification of the widget's content.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • setLocked

        public void setLocked​(boolean value)

        Whether the widget can be modified (Setter)

        This does not restrict modification of the widget's content.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed
      • getNoPrint

        public boolean getNoPrint()

        The widget's visibility when printing (Getter)

        If true then the widget is not present in a print output of the document.
        Throws:
        java.lang.IllegalStateException - if the object has already been closed