jxl
Class HeaderFooter.Contents

java.lang.Object
  extended byjxl.biff.HeaderFooter.Contents
      extended byjxl.HeaderFooter.Contents
Enclosing class:
HeaderFooter

public static class HeaderFooter.Contents
extends HeaderFooter.Contents

The contents - a simple wrapper around a string buffer


Method Summary
 void append(java.lang.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(java.lang.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 jxl.biff.HeaderFooter.Contents
getContents
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

append

public void append(java.lang.String txt)
Appends the text to the string buffer

Overrides:
append in class HeaderFooter.Contents
Parameters:
txt -

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.

Overrides:
toggleBold in class HeaderFooter.Contents

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.

Overrides:
toggleUnderline in class HeaderFooter.Contents

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.

Overrides:
toggleItalics in class HeaderFooter.Contents

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.

Overrides:
toggleStrikethrough in class HeaderFooter.Contents

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.

Overrides:
toggleDoubleUnderline in class HeaderFooter.Contents

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.

Overrides:
toggleSuperScript in class HeaderFooter.Contents

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.

Overrides:
toggleSubScript in class HeaderFooter.Contents

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.

Overrides:
toggleOutline in class HeaderFooter.Contents

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.

Overrides:
toggleShadow in class HeaderFooter.Contents

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.

Overrides:
setFontName in class HeaderFooter.Contents
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.

Overrides:
setFontSize in class HeaderFooter.Contents
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

Overrides:
appendPageNumber in class HeaderFooter.Contents

appendTotalPages

public void appendTotalPages()
Appends the total number of pages

Overrides:
appendTotalPages in class HeaderFooter.Contents

appendDate

public void appendDate()
Appends the current date

Overrides:
appendDate in class HeaderFooter.Contents

appendTime

public void appendTime()
Appends the current time

Overrides:
appendTime in class HeaderFooter.Contents

appendWorkbookName

public void appendWorkbookName()
Appends the workbook name

Overrides:
appendWorkbookName in class HeaderFooter.Contents

appendWorkSheetName

public void appendWorkSheetName()
Appends the worksheet name

Overrides:
appendWorkSheetName in class HeaderFooter.Contents

clear

public void clear()
Clears the contents of this portion

Overrides:
clear in class HeaderFooter.Contents

empty

public boolean empty()
Queries if the contents are empty

Overrides:
empty in class HeaderFooter.Contents
Returns:
TRUE if the contents are empty, FALSE otherwise