public abstract class XSSFHeaderFooter extends 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 XSSFHeaderFooter 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 |
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
|
String |
getLeft()
get the text representing the left part of this element
|
String |
getRight()
get the text representing the right part of this element
|
abstract String |
getText() |
String |
getValue() |
void |
setAreFieldsStripped(boolean stripFields)
Should fields (eg macros) be stripped from the text that this class
returns? Default is not to strip.
|
void |
setCenter(String newCenter)
set a centered string value for this element
|
void |
setLeft(String newLeft)
set a left string value for this element
|
void |
setRight(String newRight)
set a right string value for this element
|
protected abstract void |
setText(String text) |
static String |
stripFields(String text)
Removes any fields (eg macros, page markers etc) from the string.
|
public XSSFHeaderFooter(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter headerFooter)
headerFooter
- @Internal public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter getHeaderFooter()
public String getValue()
public boolean areFieldsStripped()
XSSFHeaderFooter
returns? Default is false, but can be changedpublic void setAreFieldsStripped(boolean stripFields)
stripFields
- public static String stripFields(String text)
public abstract String getText()
protected abstract void setText(String text)
public String getCenter()
getCenter
in interface HeaderFooter
public String getLeft()
getLeft
in interface HeaderFooter
public String getRight()
getRight
in interface HeaderFooter
public void setCenter(String newCenter)
setCenter
in interface HeaderFooter
newCenter
- The string to set as the center.public void setLeft(String newLeft)
setLeft
in interface HeaderFooter
newLeft
- The string to set as the left side.public void setRight(String newRight)
setRight
in interface HeaderFooter
newRight
- The string to set as the right side.Copyright © 2020. All rights reserved.