Class OdfTextListStyle

    • Field Detail

      • MAX_LIST_LEVEL

        protected static final int MAX_LIST_LEVEL
        Maximum number of levels in a list.
        See Also:
        Constant Field Values
      • SHOW_ALL_LEVELS

        public static final boolean SHOW_ALL_LEVELS
        List should show all levels of numbering.
        See Also:
        Constant Field Values
      • SHOW_ONE_LEVEL

        public static final boolean SHOW_ONE_LEVEL
        List should show only one level of numbering.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OdfTextListStyle

        public OdfTextListStyle​(OdfFileDom ownerDoc)
      • OdfTextListStyle

        public OdfTextListStyle​(OdfFileDom ownerDoc,
                                String name,
                                String specifiers,
                                String delim,
                                String spacing,
                                boolean showAllLevels)
        Creates an OdfListStyle.
        Parameters:
        ownerDoc - the document that this list style belongs to.
        name - the name of this list style.
        specifiers - the string of level specifiers.
        delim - the delimiter for splitting the string into levels.
        spacing - a css "length" telling how far to indent each level; also min. label width
        showAllLevels - true if you want to display all levels of numbering, false otherwise.
      • OdfTextListStyle

        public OdfTextListStyle​(OdfFileDom ownerDoc,
                                String name,
                                String[] specArray,
                                String spacing,
                                boolean showAllLevels)
        Constructor for OdfEasyListStyle.
        Parameters:
        ownerDoc - the document that this list style belongs to.
        name - the name of this list style.
        specArray - an array of strings of level specifications.
        spacing - a css "length" telling how far to indent each level; also min. label width
        showAllLevels - true if you want to display all levels of numbering, false otherwise.
    • Method Detail

      • getLevel

        public TextListLevelStyleElementBase getLevel​(int level)
        returns the given level or null if it does not exist
        Parameters:
        level - is the level number that should be returned
        Returns:
        an instance of TextListLevelStyleImageElement, TextListLevelStyleBulletElement, TextListLevelStyleNumberElement or null.
      • getOrCreateListLevel

        public TextListLevelStyleElementBase getOrCreateListLevel​(int level,
                                                                  Class clazz)
        always returns the given level with the given class. If that level does not exist or has a different class than it is (re)created.
        Parameters:
        level - is the level number that should be returned
        clazz - is the class of the level, should be TextListLevelStyleImageElement, TextListLevelStyleBulletElement or TextListLevelStyleNumberElement.
        Returns:
        a list level style with the given level and class