Package jxl
Class HeaderFooter.Contents
- java.lang.Object
-
- jxl.HeaderFooter.Contents
-
- Enclosing class:
- HeaderFooter
public static class HeaderFooter.Contents extends java.lang.ObjectThe contents - a simple wrapper around a string buffer
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidappend(java.lang.String txt)Appends the text to the string buffervoidappendDate()Appends the current datevoidappendPageNumber()Appends the page numbervoidappendTime()Appends the current timevoidappendTotalPages()Appends the total number of pagesvoidappendWorkbookName()Appends the workbook namevoidappendWorkSheetName()Appends the worksheet namevoidclear()Clears the contents of this portionbooleanempty()Queries if the contents are emptyvoidsetFontName(java.lang.String fontName)Sets the font of text subsequently appended to this object..booleansetFontSize(int size)Sets the font size of text subsequently appended to this object.voidtoggleBold()Turns bold printing on or off.voidtoggleDoubleUnderline()Turns double-underline printing on or off.voidtoggleItalics()Turns italics printing on or off.voidtoggleOutline()Turns outline printing on or off (Macintosh only).voidtoggleShadow()Turns shadow printing on or off (Macintosh only).voidtoggleStrikethrough()Turns strikethrough printing on or off.voidtoggleSubScript()Turns subscript printing on or off.voidtoggleSuperScript()Turns superscript printing on or off.voidtoggleUnderline()Turns underline printing on or off.
-
-
-
Method Detail
-
append
public void append(java.lang.String txt)
Appends the text to the string buffer- Parameters:
txt- the text to append
-
toggleBold
public void toggleBold()
Turns bold printing on or off. Bold printing is initially off. Text subsequently appended to this object will be bolded until this method is called again.
-
toggleUnderline
public void toggleUnderline()
Turns underline printing on or off. Underline printing is initially off. Text subsequently appended to this object will be underlined until this method is called again.
-
toggleItalics
public void toggleItalics()
Turns italics printing on or off. Italics printing is initially off. Text subsequently appended to this object will be italicized until this method is called again.
-
toggleStrikethrough
public void toggleStrikethrough()
Turns strikethrough printing on or off. Strikethrough printing is initially off. Text subsequently appended to this object will be striked out until this method is called again.
-
toggleDoubleUnderline
public void toggleDoubleUnderline()
Turns double-underline printing on or off. Double-underline printing is initially off. Text subsequently appended to this object will be double-underlined until this method is called again.
-
toggleSuperScript
public void toggleSuperScript()
Turns superscript printing on or off. Superscript printing is initially off. Text subsequently appended to this object will be superscripted until this method is called again.
-
toggleSubScript
public void toggleSubScript()
Turns subscript printing on or off. Subscript printing is initially off. Text subsequently appended to this object will be subscripted until this method is called again.
-
toggleOutline
public void toggleOutline()
Turns outline printing on or off (Macintosh only). Outline printing is initially off. Text subsequently appended to this object will be outlined until this method is called again.
-
toggleShadow
public void toggleShadow()
Turns shadow printing on or off (Macintosh only). Shadow printing is initially off. Text subsequently appended to this object will be shadowed until this method is called again.
-
setFontName
public void setFontName(java.lang.String fontName)
Sets the font of text subsequently appended to this object.. Previously appended text is not affected. Note: no checking is performed to determine if fontName is a valid font.- Parameters:
fontName- name of the font to use
-
setFontSize
public boolean setFontSize(int size)
Sets the font size of text subsequently appended to this object. Previously appended text is not affected. Valid point sizes are between 1 and 99 (inclusive). If size is outside this range, this method returns false and does not change font size. If size is within this range, the font size is changed and true is returned.- Parameters:
size- The size in points. Valid point sizes are between 1 and 99 (inclusive).- Returns:
- true if the font size was changed, false if font size was not changed because 1 > size > 99.
-
appendPageNumber
public void appendPageNumber()
Appends the page number
-
appendTotalPages
public void appendTotalPages()
Appends the total number of pages
-
appendDate
public void appendDate()
Appends the current date
-
appendTime
public void appendTime()
Appends the current time
-
appendWorkbookName
public void appendWorkbookName()
Appends the workbook name
-
appendWorkSheetName
public void appendWorkSheetName()
Appends the worksheet name
-
clear
public void clear()
Clears the contents of this portion
-
empty
public boolean empty()
Queries if the contents are empty- Returns:
- TRUE if the contents are empty, FALSE otherwise
-
-