public abstract class XSSFHeaderFooter extends java.lang.Object implements HeaderFooter
There are a number of formatting codes that can be written inline with the actual header / footer text, which affect the formatting in the header or footer.
This example shows the text "Center Bold Header" on the first line (center section), and the date on the second line (center section). &CCenter &"-,Bold"Bold &"-,Regular"Header_x000A_&D General Rules: There is no required order in which these codes must appear. The first occurrence of the following codes turns the formatting ON, the second occurrence turns it OFF again:Constructor and Description |
---|
XSSFHeaderFooter(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter headerFooter)
Create an instance of XSSFAbstractHeaderFooter from the supplied XML bean
|
Modifier and Type | Method and Description |
---|---|
boolean |
areFieldsStripped()
Are fields currently being stripped from the text that this
XSSFHeaderFooter returns? Default is false, but can be changed
|
java.lang.String |
getCenter()
get the text representing the center part of this element
|
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter |
getHeaderFooter()
Returns the underlying CTHeaderFooter xml bean
|
java.lang.String |
getLeft()
get the text representing the left part of this element
|
java.lang.String |
getRight()
get the text representing the right part of this element
|
abstract java.lang.String |
getText() |
java.lang.String |
getValue()
Returns the value of the header or footer.
|
void |
setAreFieldsStripped(boolean stripFields)
Should fields (eg macros) be stripped from the text that this class
returns? Default is not to strip.
|
void |
setCenter(java.lang.String newCenter)
set a centered string value for this element
|
void |
setLeft(java.lang.String newLeft)
set a left string value for this element
|
void |
setRight(java.lang.String newRight)
set a right string value for this element
|
protected abstract void |
setText(java.lang.String text) |
static java.lang.String |
stripFields(java.lang.String text)
Removes any fields (eg macros, page markers etc) from the string.
|
public XSSFHeaderFooter(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter headerFooter)
@Internal public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter getHeaderFooter()
public java.lang.String getValue()
public boolean areFieldsStripped()
public void setAreFieldsStripped(boolean stripFields)
public static java.lang.String stripFields(java.lang.String text)
public abstract java.lang.String getText()
protected abstract void setText(java.lang.String text)
public java.lang.String getCenter()
getCenter
in interface HeaderFooter
public java.lang.String getLeft()
getLeft
in interface HeaderFooter
public java.lang.String getRight()
getRight
in interface HeaderFooter
public void setCenter(java.lang.String newCenter)
setCenter
in interface HeaderFooter
newCenter
- The string to set as the center.public void setLeft(java.lang.String newLeft)
setLeft
in interface HeaderFooter
newLeft
- The string to set as the left side.public void setRight(java.lang.String newRight)
setRight
in interface HeaderFooter
newRight
- The string to set as the right side.Copyright 2022 The Apache Software Foundation or its licensors, as applicable.