public class PageStyle extends Object implements AddableToOdsElements, ElementWithEmbeddedStyles, Hidable
The PageStyle class represents a combination of a master page style and a page layout style: formatting + header and footer. 16.5 style:page-layout The style:page-layout element represents the styles that specify the formatting properties of a page. 16.9 style:master-page In text and spreadsheet documents, the style:master-page element contains the content of headers and footers.
| Modifier and Type | Field and Description |
|---|---|
static PaperFormat |
DEFAULT_FORMAT
The default format (A4)
|
static String |
DEFAULT_MASTER_PAGE_NAME
The classic default master page name
|
static PageStyle |
DEFAULT_MASTER_PAGE_STYLE
The default master page style
|
static PageStyle |
DEFAULT_PAGE_STYLE
The default style
|
static PagePrintOrientation |
DEFAULT_PRINT_ORIENTATION
The default print orientation (VERTICAL)
|
static PageWritingMode |
DEFAULT_WRITING_MODE
The default writing mode (left to right and top to bottom)
|
| 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.
|
void |
addToElements(OdsElements odsElements)
Add this to OdsElements
|
void |
appendXMLToAutomaticStyle(XMLUtil util,
Appendable appendable)
Write the XML format for this object.
|
void |
appendXMLToMasterStyle(XMLUtil util,
Appendable appendable) |
static PageStyleBuilder |
builder(String name)
Create a new builder
|
String |
getMasterName() |
MasterPageStyle |
getMasterPageStyle() |
PageLayoutStyle |
getPageLayoutStyle() |
boolean |
isHidden() |
public static final String DEFAULT_MASTER_PAGE_NAME
public static final PaperFormat DEFAULT_FORMAT
public static final PagePrintOrientation DEFAULT_PRINT_ORIENTATION
public static final PageWritingMode DEFAULT_WRITING_MODE
public static final PageStyle DEFAULT_MASTER_PAGE_STYLE
public static final PageStyle DEFAULT_PAGE_STYLE
public static PageStyleBuilder builder(String name)
name - the name of the style to buildpublic boolean isHidden()
public MasterPageStyle getMasterPageStyle()
public PageLayoutStyle getPageLayoutStyle()
public String getMasterName()
public void addEmbeddedStyles(StylesContainer stylesContainer)
ElementWithEmbeddedStylesaddEmbeddedStyles in interface ElementWithEmbeddedStylesstylesContainer - the styles containerpublic void addToElements(OdsElements odsElements)
AddableToOdsElementsaddToElements in interface AddableToOdsElementsodsElements - the OdsElements instance where to add this.public void appendXMLToAutomaticStyle(XMLUtil util, Appendable appendable) throws IOException
util - a util to write XMLappendable - where to writeIOException - If an I/O error occurspublic void appendXMLToMasterStyle(XMLUtil util, Appendable appendable) throws IOException
util - a util to write XMLappendable - where to writeIOException - If an I/O error occursCopyright © 2016–2021. All rights reserved.