jxl.write.biff
Class WritableFontRecord

java.lang.Object
  extended byjxl.biff.RecordData
      extended byjxl.biff.WritableRecordData
          extended byjxl.biff.FontRecord
              extended byjxl.write.biff.WritableFontRecord
All Implemented Interfaces:
ByteData, Font
Direct Known Subclasses:
WritableFont

public class WritableFontRecord
extends FontRecord

A writable Font record. This class intercepts any set accessor calls and throws and exception if the Font is already initialized


Field Summary
 
Fields inherited from class jxl.biff.FontRecord
biff7
 
Fields inherited from class jxl.biff.WritableRecordData
maxRecordLength
 
Constructor Summary
protected WritableFontRecord(Font f)
          Publicly available copy constructor
protected WritableFontRecord(java.lang.String fn, int ps, int bold, boolean it, int us, int ci, int ss)
          Constructor, used when creating a new font for writing out.
 
Method Summary
protected  void setBoldStyle(int boldStyle)
          Sets the bold style for this font, if the font hasn't been initialized
protected  void setColour(int colour)
          Sets the colour for this font, if the font hasn't been initialized
protected  void setItalic(boolean italic)
          Sets the italic indicator for this font, if the font hasn't been initialized
protected  void setPointSize(int pointSize)
          Sets the point size for this font, if the font hasn't been initialized
protected  void setScriptStyle(int scriptStyle)
          Sets the script style (eg. superscript, subscript) for this font, if the font hasn't been initialized
protected  void setStruckout(boolean os)
          Sets the struck out flag
protected  void setUnderlineStyle(int us)
          Sets the underline style for this font, if the font hasn't been initialized
 
Methods inherited from class jxl.biff.FontRecord
equals, getBoldWeight, getColour, getData, getFontIndex, getName, getPointSize, getScriptStyle, getUnderlineStyle, hashCode, initialize, isInitialized, isItalic, isStruckout, setFontBoldStyle, setFontColour, setFontItalic, setFontPointSize, setFontScriptStyle, setFontStruckout, setFontUnderlineStyle, uninitialize
 
Methods inherited from class jxl.biff.WritableRecordData
getBytes
 
Methods inherited from class jxl.biff.RecordData
getCode, getRecord
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WritableFontRecord

protected WritableFontRecord(java.lang.String fn,
                             int ps,
                             int bold,
                             boolean it,
                             int us,
                             int ci,
                             int ss)
Constructor, used when creating a new font for writing out.

Parameters:
bold - the bold indicator
ps - the point size
us - the underline style
fn - the name
it - italicised indicator
ss - the script style

WritableFontRecord

protected WritableFontRecord(Font f)
Publicly available copy constructor

Method Detail

setPointSize

protected void setPointSize(int pointSize)
                     throws WriteException
Sets the point size for this font, if the font hasn't been initialized

Parameters:
pointSize - the point size
Throws:
WriteException, - if this font is already in use elsewhere
WriteException

setBoldStyle

protected void setBoldStyle(int boldStyle)
                     throws WriteException
Sets the bold style for this font, if the font hasn't been initialized

Parameters:
boldStyle - the bold style
Throws:
WriteException, - if this font is already in use elsewhere
WriteException

setItalic

protected void setItalic(boolean italic)
                  throws WriteException
Sets the italic indicator for this font, if the font hasn't been initialized

Parameters:
italic - the italic flag
Throws:
WriteException, - if this font is already in use elsewhere
WriteException

setUnderlineStyle

protected void setUnderlineStyle(int us)
                          throws WriteException
Sets the underline style for this font, if the font hasn't been initialized

Parameters:
us - the underline style
Throws:
WriteException, - if this font is already in use elsewhere
WriteException

setColour

protected void setColour(int colour)
                  throws WriteException
Sets the colour for this font, if the font hasn't been initialized

Parameters:
colour - the colour
Throws:
WriteException, - if this font is already in use elsewhere
WriteException

setScriptStyle

protected void setScriptStyle(int scriptStyle)
                       throws WriteException
Sets the script style (eg. superscript, subscript) for this font, if the font hasn't been initialized

Parameters:
scriptStyle - the colour
Throws:
WriteException, - if this font is already in use elsewhere
WriteException

setStruckout

protected void setStruckout(boolean os)
                     throws WriteException
Sets the struck out flag

Throws:
WriteException, - if this font is already in use elsewhere
WriteException