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 forHSSFHeaderandHSSFFooter.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringdate()static java.lang.StringendBold()static java.lang.StringendDoubleUnderline()static java.lang.StringendUnderline()static java.lang.Stringfile()static java.lang.Stringfont(java.lang.String font, java.lang.String style)static java.lang.StringfontSize(short size)java.lang.StringgetCenter()Get the center of the header or footer.java.lang.StringgetLeft()Get the left side of the header or footer.java.lang.StringgetRight()Get the right side of the header or footer.static java.lang.StringnumPages()static java.lang.Stringpage()voidsetCenter(java.lang.String newCenter)Sets the center string.voidsetLeft(java.lang.String newLeft)Sets the left string.voidsetRight(java.lang.String newRight)Sets the right string or footer.static java.lang.StringstartBold()static java.lang.StringstartDoubleUnderline()static java.lang.StringstartUnderline()static java.lang.StringstripFields(java.lang.String pText)Removes any fields (eg macros, page markers etc) from the string.static java.lang.Stringtab()static java.lang.Stringtime()
-
-
-
Method Detail
-
getLeft
public final java.lang.String getLeft()
Description copied from interface:HeaderFooterGet the left side of the header or footer.- Specified by:
getLeftin interfaceHeaderFooter- Returns:
- the left side of the header or footer.
-
setLeft
public final void setLeft(java.lang.String newLeft)
Description copied from interface:HeaderFooterSets the left string.- Specified by:
setLeftin interfaceHeaderFooter- Parameters:
newLeft- The string to set as the left side.
-
getCenter
public final java.lang.String getCenter()
Description copied from interface:HeaderFooterGet the center of the header or footer.- Specified by:
getCenterin interfaceHeaderFooter- Returns:
- the center of the header or footer.
-
setCenter
public final void setCenter(java.lang.String newCenter)
Description copied from interface:HeaderFooterSets the center string.- Specified by:
setCenterin interfaceHeaderFooter- Parameters:
newCenter- The string to set as the center.
-
getRight
public final java.lang.String getRight()
Description copied from interface:HeaderFooterGet the right side of the header or footer.- Specified by:
getRightin interfaceHeaderFooter- Returns:
- The right side of the header or footer.
-
setRight
public final void setRight(java.lang.String newRight)
Description copied from interface:HeaderFooterSets the right string or footer.- Specified by:
setRightin 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!
-
-