Class TableOfContents


  • public class TableOfContents
    extends RenderElement
    Only supported in Word templates. Class representing a table of content for templates.
    • Constructor Summary

      Constructors 
      Constructor Description
      TableOfContents​(java.lang.String name, java.lang.String title, int depth, java.lang.String tabLeader)
      The most basic RenderElement.
    • Constructor Detail

      • TableOfContents

        public TableOfContents​(java.lang.String name,
                               java.lang.String title,
                               int depth,
                               java.lang.String tabLeader)
        The most basic RenderElement. It simply consists of a name and a value. In a template the tag '{name}' will be replaced by 'value'. If you don't want to mention an optional parameter and use the default value, put null (or O for an int) as argument.
        Parameters:
        name - Name of this property.
        title - Title of the table of content.
        depth - The depth of heading to be shown. (Optional, default : 3)
        tabLeader - How the space between title and page number should be filled. Can be "hyphen", "underscore", or "dot". (Optional, default : "dot")
    • Method Detail

      • getDepth

        public int getDepth()
        Returns:
        The depth of heading to be shown. Default : 3.
      • setDepth

        public void setDepth​(int depth)
        Parameters:
        depth - The depth of heading to be shown. Default : 3.
      • getTabLeader

        public java.lang.String getTabLeader()
        Returns:
        How the space between title and page number should be filled. Can be "hyphen", "underscore", or "dot" (default).
      • setTabLeader

        public void setTabLeader​(java.lang.String tabLeader)
        Parameters:
        tabLeader - How the space between title and page number should be filled. Can be "hyphen", "underscore", or "dot" (default).
      • getJSON

        public com.google.gson.JsonObject getJSON()
        Specified by:
        getJSON in class RenderElement
        Returns:
        JSONObject with the tags for this property for the Cloud Office Print server.
      • getTemplateTags

        public java.util.Set<java.lang.String> getTemplateTags()
        Specified by:
        getTemplateTags in class RenderElement
        Returns:
        An immutable set containing all available template tags this element can replace.