Package org.apache.poi.hssf.usermodel
Class HeaderFooter
- java.lang.Object
-
- org.apache.poi.hssf.usermodel.HeaderFooter
-
- All Implemented Interfaces:
HeaderFooter
- Direct Known Subclasses:
HSSFFooter
,HSSFHeader
public abstract class HeaderFooter extends java.lang.Object implements HeaderFooter
Common class forHSSFHeader
andHSSFFooter
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
date()
static java.lang.String
endBold()
static java.lang.String
endDoubleUnderline()
static java.lang.String
endUnderline()
static java.lang.String
file()
static java.lang.String
font(java.lang.String font, java.lang.String style)
static java.lang.String
fontSize(short size)
java.lang.String
getCenter()
Get the center of the header or footer.java.lang.String
getLeft()
Get the left side of the header or footer.java.lang.String
getRight()
Get the right side of the header or footer.static java.lang.String
numPages()
static java.lang.String
page()
void
setCenter(java.lang.String newCenter)
Sets the center string.void
setLeft(java.lang.String newLeft)
Sets the left string.void
setRight(java.lang.String newRight)
Sets the right string or footer.static java.lang.String
startBold()
static java.lang.String
startDoubleUnderline()
static java.lang.String
startUnderline()
static java.lang.String
stripFields(java.lang.String pText)
Removes any fields (eg macros, page markers etc) from the string.static java.lang.String
tab()
static java.lang.String
time()
-
-
-
Method Detail
-
getLeft
public final java.lang.String getLeft()
Description copied from interface:HeaderFooter
Get the left side of the header or footer.- Specified by:
getLeft
in interfaceHeaderFooter
- Returns:
- the left side of the header or footer.
-
setLeft
public final void setLeft(java.lang.String newLeft)
Description copied from interface:HeaderFooter
Sets the left string.- Specified by:
setLeft
in interfaceHeaderFooter
- Parameters:
newLeft
- The string to set as the left side.
-
getCenter
public final java.lang.String getCenter()
Description copied from interface:HeaderFooter
Get the center of the header or footer.- Specified by:
getCenter
in interfaceHeaderFooter
- Returns:
- the center of the header or footer.
-
setCenter
public final void setCenter(java.lang.String newCenter)
Description copied from interface:HeaderFooter
Sets the center string.- Specified by:
setCenter
in interfaceHeaderFooter
- Parameters:
newCenter
- The string to set as the center.
-
getRight
public final java.lang.String getRight()
Description copied from interface:HeaderFooter
Get the right side of the header or footer.- Specified by:
getRight
in interfaceHeaderFooter
- Returns:
- The right side of the header or footer.
-
setRight
public final void setRight(java.lang.String newRight)
Description copied from interface:HeaderFooter
Sets the right string or footer.- Specified by:
setRight
in interfaceHeaderFooter
- Parameters:
newRight
- The string to set as the right side.
-
fontSize
public static java.lang.String fontSize(short size)
- Parameters:
size
- the new font size- Returns:
- The mark-up tag representing a new font size
-
font
public static java.lang.String font(java.lang.String font, java.lang.String style)
- Parameters:
font
- the new fontstyle
- the fonts style, one of regular, italic, bold, italic bold or bold italic- Returns:
- The mark-up tag representing a new font size
-
page
public static java.lang.String page()
- Returns:
- The mark-up tag representing the current page number
-
numPages
public static java.lang.String numPages()
- Returns:
- The mark-up tag representing the number of pages
-
date
public static java.lang.String date()
- Returns:
- The mark-up tag representing the current date date
-
time
public static java.lang.String time()
- Returns:
- The mark-up tag representing current time
-
file
public static java.lang.String file()
- Returns:
- The mark-up tag representing the current file name
-
tab
public static java.lang.String tab()
- Returns:
- The mark-up tag representing the current tab (sheet) name
-
startBold
public static java.lang.String startBold()
- Returns:
- The mark-up tag for start bold
-
endBold
public static java.lang.String endBold()
- Returns:
- The mark-up tag for end bold
-
startUnderline
public static java.lang.String startUnderline()
- Returns:
- The mark-up tag for start underline
-
endUnderline
public static java.lang.String endUnderline()
- Returns:
- The mark-up tag for end underline
-
startDoubleUnderline
public static java.lang.String startDoubleUnderline()
- Returns:
- The mark-up tag for start double underline
-
endDoubleUnderline
public static java.lang.String endDoubleUnderline()
- Returns:
- The mark-up tag for end double underline
-
stripFields
public static java.lang.String stripFields(java.lang.String pText)
Removes any fields (eg macros, page markers etc) from the string. Normally used to make some text suitable for showing to humans, and the resultant text should not normally be saved back into the document!
-
-