Package com.aowagie.text.factories
Class ElementFactory
java.lang.Object
com.aowagie.text.factories.ElementFactory
This class is able to create Element objects based on a list of properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Anchor
getAnchor
(Properties attributes) Creates an Anchor object based on a list of properties.static Annotation
getAnnotation
(Properties attributes) Creates an Annotation object based on a list of properties.static Cell
getCell
(Properties attributes) Creates a Cell object based on a list of properties.static ChapterAutoNumber
getChapter
(Properties attributes) Creates a ChapterAutoNumber object based on a list of properties.static Chunk
getChunk
(Properties attributes) Creates a Chunk object based on a list of properties.static Image
getImage
(Properties attributes) Creates an Image object based on a list of properties.static List
getList
(Properties attributes) Creates a List object based on a list of properties.static ListItem
getListItem
(Properties attributes) Creates a ListItem object based on a list of properties.static Paragraph
getParagraph
(Properties attributes) Creates a Paragraph object based on a list of properties.static Phrase
getPhrase
(Properties attributes) Creates a Phrase object based on a list of properties.static Section
getSection
(Section parent, Properties attributes) Creates a Section object based on a list of properties.static Table
getTable
(Properties attributes) Creates an Table object based on a list of properties.private static void
setRectangleProperties
(Rectangle rect, Properties attributes) Sets some Rectangle properties (for a Cell, Table,...).private static void
setSectionParameters
(Section section, Properties attributes) Helper method to create a Chapter/Section object.
-
Constructor Details
-
ElementFactory
public ElementFactory()
-
-
Method Details
-
getChunk
Creates a Chunk object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- a Chunk
-
getPhrase
Creates a Phrase object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- a Phrase
-
getAnchor
Creates an Anchor object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- an Anchor
-
getParagraph
Creates a Paragraph object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- a Paragraph
-
getListItem
Creates a ListItem object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- a ListItem
-
getList
Creates a List object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- the List
-
getCell
Creates a Cell object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- a Cell
-
getTable
Creates an Table object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- a Table
-
setRectangleProperties
Sets some Rectangle properties (for a Cell, Table,...).- Parameters:
rect
- Rectangleattributes
- Attributes
-
getChapter
Creates a ChapterAutoNumber object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- a Chapter
-
getSection
Creates a Section object based on a list of properties.- Parameters:
parent
- Parentattributes
- Attributes- Returns:
- a Section
-
setSectionParameters
Helper method to create a Chapter/Section object.- Parameters:
section
- Sectionattributes
- Attributes
-
getImage
public static Image getImage(Properties attributes) throws BadElementException, MalformedURLException, IOException Creates an Image object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- an Image
- Throws:
BadElementException
- on errorIOException
- on errorMalformedURLException
- on error
-
getAnnotation
Creates an Annotation object based on a list of properties.- Parameters:
attributes
- Attributes- Returns:
- an Annotation
-