|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.xssf.usermodel.extensions.XSSFHeaderFooter
public abstract class XSSFHeaderFooter
Parent class of all XSSF headers and footers. For a list of all the different fields that can be placed into a header or footer, such as page number, bold, underline etc, see the follow formatting syntax Header/Footer Formatting Syntax
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 Summary | |
---|---|
XSSFHeaderFooter(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter headerFooter)
Create an instance of XSSFHeaderFooter from the supplied XML bean |
Method Summary | |
---|---|
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()
|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XSSFHeaderFooter(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter headerFooter)
headerFooter
- Method Detail |
---|
@Internal public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTHeaderFooter getHeaderFooter()
public java.lang.String getValue()
public boolean areFieldsStripped()
XSSFHeaderFooter
returns? Default is false, but can be changed
public void setAreFieldsStripped(boolean stripFields)
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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |