Class OutlineItem


  • public class OutlineItem
    extends NativeObject
    An outline item represents an entry in the outline tree of the document. It is also known as "Bookmark".
    • Method Detail

      • create

        public static OutlineItem create​(Document targetDocument,
                                         java.lang.String title,
                                         Destination destination)

        Create a new outline item (bookmark).

        The returned outline item is not yet part of the outline item tree, but it is associated with the given target document. It can be inserted at any position in the tree.
        Parameters:
        targetDocument - The output document with which the returned object is associated
        title - The title of the newly created outline item.
        destination - The destination that this outline item refers to or null if the item has no destination.
        Returns:
        The newly created outline item.
        Throws:
        java.lang.IllegalArgumentException - if the targetDocument argument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument argument is read-only
        java.lang.IllegalArgumentException - if the document associated with the destination argument has already been closed
        java.lang.IllegalArgumentException - if the destination argument belongs to a different document
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if title is null
      • copy

        public static OutlineItem copy​(Document targetDocument,
                                       OutlineItem outlineItem,
                                       OutlineCopyOptions options)
                                throws java.io.IOException,
                                       ConformanceException

        Copy an outline item

        Copy an outline item object including all descendants from an input document to the given targetDocument. The returned object is associated with the given target document but not yet part of it.
        Parameters:
        targetDocument - the output document with which the returned object is associated
        outlineItem - An outline item of a different document
        options - The options used to copy the item
        Returns:
        The copied outline item, associated with the current document.
        Throws:
        ConformanceException - The conformance level of the source document is not compatible with the conformance level of the target document.
        java.lang.IllegalArgumentException - if the targetDocument argument is null
        java.lang.IllegalArgumentException - if the targetDocument argument has already been closed
        java.lang.IllegalArgumentException - if the targetDocument argument is read-only
        java.lang.IllegalArgumentException - if the outlineItem argument is not associated with an input document
        java.lang.IllegalArgumentException - the target document contains implicitly copied outline items
        java.lang.IllegalArgumentException - the outlineItem argument is null
        java.lang.IllegalArgumentException - the outlineItem argument is not associated with an input document
        java.io.IOException - Error reading from the source document or writing to the target document
        java.lang.IllegalArgumentException - if targetDocument is null
        java.lang.IllegalArgumentException - if outlineItem is null
      • getTitle

        public java.lang.String getTitle()
        The title of the outline item.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
      • setTitle

        public void setTitle​(java.lang.String value)
        The title of the outline item.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
        java.lang.UnsupportedOperationException - the object is not associated to an output document.
        java.lang.IllegalArgumentException - if value is null
      • getBold

        public boolean getBold()
        If true, the outline item is displayed in bold font.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
      • setBold

        public void setBold​(boolean value)
        If true, the outline item is displayed in bold font.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
        java.lang.UnsupportedOperationException - the object is not associated to an output document.
      • getItalic

        public boolean getItalic()
        If true, the outline item is displayed in italic font.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
      • setItalic

        public void setItalic​(boolean value)
        If true, the outline item is displayed in italic font.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
        java.lang.UnsupportedOperationException - the object is not associated to an output document.
      • getDestination

        public Destination getDestination()
        The destination of the outline item.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
        java.lang.UnsupportedOperationException - the object is not associated to an input document.
      • setDestination

        public void setDestination​(Destination value)
        The destination of the outline item.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
        java.lang.UnsupportedOperationException - the object is not associated to an output document.
      • getIsOpen

        public boolean getIsOpen()
        • If true, the item is expanded.
        • If false, the item is collapsed.
        This is property is only meaningful if the item has child items.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
      • setIsOpen

        public void setIsOpen​(boolean value)
        • If true, the item is expanded.
        • If false, the item is collapsed.
        This is property is only meaningful if the item has child items.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.
        java.lang.UnsupportedOperationException - the object is not associated to an output document.
      • getChildren

        public OutlineItemList getChildren()
        The child items of this outline item.
        Throws:
        java.lang.IllegalStateException - the object has already been closed.
        java.lang.IllegalStateException - the associated document has already been closed.