Class ElementFactory


  • public class ElementFactory
    extends Object
    This class is able to create Element objects based on a list of properties.
    • Constructor Detail

      • ElementFactory

        public ElementFactory()
    • Method Detail

      • getChunk

        public static Chunk getChunk​(Properties attributes)
        Creates a Chunk object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        a Chunk
      • getPhrase

        public static Phrase getPhrase​(Properties attributes)
        Creates a Phrase object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        a Phrase
      • getAnchor

        public static Anchor getAnchor​(Properties attributes)
        Creates an Anchor object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        an Anchor
      • getParagraph

        public static Paragraph getParagraph​(Properties attributes)
        Creates a Paragraph object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        a Paragraph
      • getListItem

        public static ListItem getListItem​(Properties attributes)
        Creates a ListItem object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        a ListItem
      • getList

        public static List getList​(Properties attributes)
        Creates a List object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        the List
      • getCell

        public static Cell getCell​(Properties attributes)
        Creates a Cell object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        a Cell
      • getTable

        public static Table getTable​(Properties attributes)
        Creates an Table object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        a Table
      • getChapter

        public static ChapterAutoNumber getChapter​(Properties attributes)
        Creates a ChapterAutoNumber object based on a list of properties.
        Parameters:
        attributes - The properties to base the parameters on
        Returns:
        a Chapter
      • getSection

        public static Section getSection​(Section parent,
                                         Properties attributes)
        Creates a Section object based on a list of properties.
        Parameters:
        attributes - The attributes to base the parameters on
        parent - The parent Section to add a Section to
        Returns:
        a Section
      • getImage

        public static Image getImage​(Properties attributes)
                              throws BadElementException,
                                     IOException
        Creates an Image object based on a list of properties.
        Parameters:
        attributes - The properties to base the Image on
        Returns:
        an Image
        Throws:
        IOException - thrown if an I/O problem occurs
        BadElementException - the exception thrown when the Element doesn't have the right form
      • getAnnotation

        public static Annotation getAnnotation​(Properties attributes)
        Creates an Annotation object based on a list of properties.
        Parameters:
        attributes - The properties to base the Annotation on
        Returns:
        an Annotation