jxl.write.biff
Class WritableFontRecord

java.lang.Object
  |
  +--jxl.biff.RecordData
        |
        +--jxl.biff.WritableRecordData
              |
              +--jxl.biff.FontRecord
                    |
                    +--jxl.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


Inner classes inherited from class jxl.biff.FontRecord
FontRecord.Biff7
 
Fields inherited from class jxl.biff.FontRecord
biff7, boldWeight, characterSet, colourIndex, fontFamily, fontIndex, initialized, italic, name, pointHeight, scriptStyle, struckout, underlineStyle
 
Fields inherited from class jxl.biff.RecordData
code, record
 
Constructor Summary
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.
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, initialize, isInitialized, isItalic, setFontBoldStyle, setFontColour, setFontItalic, setFontPointSize, setFontScriptStyle, 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, hashCode, notify, notifyAll, registerNatives, 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
c - the colour
ss - the script style
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

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

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

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

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

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