public class PageSection extends Object implements ElementWithEmbeddedStyles
The PageSection class represents the union of a page section content and a page section style. It may be a footer or a header.
Some styles are embedded in the content (e.g. text styles)
| Modifier and Type | Class and Description |
|---|---|
static class |
PageSection.Type
Footer or Header ?
|
| Modifier and Type | Method and Description |
|---|---|
void |
addEmbeddedStyles(StylesContainer stylesContainer)
Add the styles of this element to the styles container, in styles.xml/automatic-styles.
|
static void |
appendPageSectionStyleXMLToAutomaticStyle(Footer footer,
XMLUtil util,
Appendable appendable)
Secure version of
pageSection.appendPageSectionStyleXMLToAutomaticStyle: if the
footer (or header) is
null,
then the default type is used. |
static void |
appendPageSectionStyleXMLToAutomaticStyle(Header header,
XMLUtil util,
Appendable appendable)
Secure version of
pageSection.appendPageSectionStyleXMLToAutomaticStyle: if the
footer (or header) is
null,
then the default type is used. |
void |
appendPageSectionStyleXMLToAutomaticStyle(XMLUtil util,
Appendable appendable,
PageSection.Type pageSectionType) |
void |
appendXMLToMasterStyle(XMLUtil util,
Appendable appendable) |
static RegionPageSectionBuilder |
regionBuilder()
Create a builder for a region builder, ie a builder for a footer/header with left, center
and right
|
static SimplePageSectionBuilder |
simpleBuilder()
Create a builder for a simple builder, ie a builder for a footer/header with only a center
region
|
static Footer |
simpleFooter(String text,
TextStyle ts)
Create a simple footer, with a styled text
|
static Header |
simpleHeader(String text,
TextStyle ts)
Create a simple header, with a styled text
|
public static void appendPageSectionStyleXMLToAutomaticStyle(Header header, XMLUtil util, Appendable appendable) throws IOException
pageSection.appendPageSectionStyleXMLToAutomaticStyle: if the
footer (or header) is
null,
then the default type is used.header - the footer or header, could be nullutil - an util to write XML dataappendable - the object ot which append footer/header styleIOException - if footer/header style wasn't appended.public static void appendPageSectionStyleXMLToAutomaticStyle(Footer footer, XMLUtil util, Appendable appendable) throws IOException
pageSection.appendPageSectionStyleXMLToAutomaticStyle: if the
footer (or header) is
null,
then the default type is used.footer - the footer or header, could be nullutil - an util to write XML dataappendable - the object ot which append footer/header styleIOException - if footer/header style wasn't appended.public static RegionPageSectionBuilder regionBuilder()
public static SimplePageSectionBuilder simpleBuilder()
public static Footer simpleFooter(String text, TextStyle ts)
text - the textts - the stylepublic static Header simpleHeader(String text, TextStyle ts)
text - the textts - the stylepublic void addEmbeddedStyles(StylesContainer stylesContainer)
ElementWithEmbeddedStylesaddEmbeddedStyles in interface ElementWithEmbeddedStylesstylesContainer - the styles containerpublic void appendPageSectionStyleXMLToAutomaticStyle(XMLUtil util, Appendable appendable, PageSection.Type pageSectionType) throws IOException
util - an instance of the util class for XML writingappendable - the appendable element where the method will write the XMLpageSectionType - the type (FOOTER or HEADER)IOException - If an I/O error occurspublic void appendXMLToMasterStyle(XMLUtil util, Appendable appendable) throws IOException
util - an instance of the util class for XML writingappendable - the appendable element where the method will write the XMLIOException - If an I/O error occursCopyright © 2016–2021. All rights reserved.