Package jxl

# Class HeaderFooter.Contents

java.lang.Object
jxl.HeaderFooter.Contents

Enclosing class:
  `HeaderFooter`

public static class HeaderFooter.Contents extends Object
The contents - a simple wrapper around a string buffer

## Method Summary

Modifier and Type
Method
Description
`void`
`append(String txt)`
Appends the text to the string buffer
`void`
`appendDate()`
Appends the current date
`void`
`appendPageNumber()`
Appends the page number
`void`
`appendTime()`
Appends the current time
`void`
`appendTotalPages()`
Appends the total number of pages
`void`
`appendWorkbookName()`
Appends the workbook name
`void`
`appendWorkSheetName()`
Appends the worksheet name
`void`
`clear()`
Clears the contents of this portion
`boolean`
`empty()`
Queries if the contents are empty
`void`
`setFontName(String fontName)`
Sets the font of text subsequently appended to this object..
`boolean`
`setFontSize(int size)`
Sets the font size of text subsequently appended to this object.
`void`
`toggleBold()`
Turns bold printing on or off.
`void`
`toggleDoubleUnderline()`
Turns double-underline printing on or off.
`void`
`toggleItalics()`
Turns italics printing on or off.
`void`
`toggleOutline()`
Turns outline printing on or off (Macintosh only).
`void`
`toggleShadow()`
Turns shadow printing on or off (Macintosh only).
`void`
`toggleStrikethrough()`
Turns strikethrough printing on or off.
`void`
`toggleSubScript()`
Turns subscript printing on or off.
`void`
`toggleSuperScript()`
Turns superscript printing on or off.
`void`
`toggleUnderline()`
Turns underline printing on or off.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### append

public void append(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(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