jxl.biff
Class HeaderFooter.Contents

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

protected static class HeaderFooter.Contents
extends java.lang.Object

The contents - a simple wrapper around a string buffer


Constructor Summary
protected HeaderFooter.Contents()
          The constructor
protected HeaderFooter.Contents(HeaderFooter.Contents copy)
          Copy constructor
protected HeaderFooter.Contents(java.lang.String s)
          Constructor used when reading worksheets.
 
Method Summary
protected  void append(java.lang.String txt)
          Appends the text to the string buffer
protected  void appendDate()
          Appends the current date
protected  void appendPageNumber()
          Appends the page number
protected  void appendTime()
          Appends the current time
protected  void appendTotalPages()
          Appends the total number of pages
protected  void appendWorkbookName()
          Appends the workbook name
protected  void appendWorkSheetName()
          Appends the worksheet name
protected  void clear()
          Clears the contents of this portion
protected  boolean empty()
          Queries if the contents are empty
protected  java.lang.String getContents()
          Retrieves a Stringified version of this object
protected  void setFontName(java.lang.String fontName)
          Sets the font of text subsequently appended to this object..
protected  boolean setFontSize(int size)
          Sets the font size of text subsequently appended to this object.
protected  void toggleBold()
          Turns bold printing on or off.
protected  void toggleDoubleUnderline()
          Turns double-underline printing on or off.
protected  void toggleItalics()
          Turns italics printing on or off.
protected  void toggleOutline()
          Turns outline printing on or off (Macintosh only).
protected  void toggleShadow()
          Turns shadow printing on or off (Macintosh only).
protected  void toggleStrikethrough()
          Turns strikethrough printing on or off.
protected  void toggleSubScript()
          Turns subscript printing on or off.
protected  void toggleSuperScript()
          Turns superscript printing on or off.
protected  void toggleUnderline()
          Turns underline printing on or off.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderFooter.Contents

protected HeaderFooter.Contents()
The constructor


HeaderFooter.Contents

protected HeaderFooter.Contents(java.lang.String s)
Constructor used when reading worksheets. The string contains all the formatting (but not alignment characters

Parameters:
s - the format string

HeaderFooter.Contents

protected HeaderFooter.Contents(HeaderFooter.Contents copy)
Copy constructor

Parameters:
copy - the contents to copy
Method Detail

getContents

protected java.lang.String getContents()
Retrieves a Stringified version of this object

Returns:
the header string

append

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

Parameters:
txt -

toggleBold

protected 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

protected 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

protected 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

protected 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

protected 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

protected 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

protected 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

protected 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

protected 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

protected 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

protected 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

protected void appendPageNumber()
Appends the page number


appendTotalPages

protected void appendTotalPages()
Appends the total number of pages


appendDate

protected void appendDate()
Appends the current date


appendTime

protected void appendTime()
Appends the current time


appendWorkbookName

protected void appendWorkbookName()
Appends the workbook name


appendWorkSheetName

protected void appendWorkSheetName()
Appends the worksheet name


clear

protected void clear()
Clears the contents of this portion


empty

protected boolean empty()
Queries if the contents are empty

Returns:
TRUE if the contents are empty, FALSE otherwise