jxl.write
Class WritableFont
jxl.write.biff.WritableFontRecord
public class WritableFont
extends jxl.write.biff.WritableFontRecord
A class which is instantiated when the user application wishes to specify
the font for a particular cell
WritableFont(Font f) - Publicly available copy constructor
|
WritableFont(WritableFont.FontName fn) - Creates a default font, vanilla font of the specified face and with
default point size.
|
WritableFont(WritableFont.FontName fn, int ps) - Constructs of font of the specified face and of size given by the
specified point size
|
WritableFont(WritableFont.FontName fn, int ps, BoldStyle bs) - Creates a font of the specified face, point size and bold style
|
WritableFont(WritableFont.FontName fn, int ps, BoldStyle bs, boolean italic) - Creates a font of the specified face, point size, bold weight and
italicised option.
|
WritableFont(WritableFont.FontName fn, int ps, BoldStyle bs, boolean it, UnderlineStyle us) - Creates a font of the specified face, point size, bold weight,
italicisation and underline style
|
WritableFont(WritableFont.FontName fn, int ps, BoldStyle bs, boolean it, UnderlineStyle us, Colour c) - Creates a font of the specified face, point size, bold style,
italicisation, underline style and colour
|
WritableFont(WritableFont.FontName fn, int ps, BoldStyle bs, boolean it, UnderlineStyle us, Colour c, ScriptStyle ss) - Creates a font of the specified face, point size, bold style,
italicisation, underline style, colour, and script
style (superscript/subscript)
|
static WritableFont.FontName | createFont(String fontName) - Factory method which creates the specified font name.
|
boolean | isStruckout() - Accessor for the strike-out flag
|
void | setBoldStyle(BoldStyle boldStyle) - Sets the bold style for this font, if the font hasn't been initialized
|
void | setColour(Colour colour) - Sets the colour for this font, if the font hasn't been
initialized
|
void | setItalic(boolean italic) - Sets the italic indicator for this font, if the font hasn't been
initialized
|
void | setPointSize(int pointSize) - Sets the point size for this font, if the font hasn't been initialized
|
void | setScriptStyle(ScriptStyle scriptStyle) - Sets the script style (eg.
|
void | setStruckout(boolean struckout) - Sets Accessor for the strike-out flag
|
void | setUnderlineStyle(UnderlineStyle us) - Sets the underline style for this font, if the font hasn't been
initialized
|
ARIAL
public static final WritableFont.FontName ARIAL
Objects created with this font name will be rendered within Excel as ARIAL
fonts
BOLD
public static final BoldStyle BOLD
Indicates that this font should be presented in a BOLD style
COURIER
public static final WritableFont.FontName COURIER
Objects created with this font name will be rendered within Excel as
COURIER fonts
DEFAULT_POINT_SIZE
public static final int DEFAULT_POINT_SIZE
The default point size for all Fonts
NO_BOLD
public static final BoldStyle NO_BOLD
Indicates that this font should not be presented as bold
TAHOMA
public static final WritableFont.FontName TAHOMA
Objects created with this font name will be rendered within Excel as
TAHOMA fonts
TIMES
public static final WritableFont.FontName TIMES
Objects created with this font name will be rendered within Excel as TIMES
fonts
WritableFont
public WritableFont(Font f)
Publicly available copy constructor
WritableFont
public WritableFont(WritableFont.FontName fn)
Creates a default font, vanilla font of the specified face and with
default point size.
WritableFont
public WritableFont(WritableFont.FontName fn,
int ps)
Constructs of font of the specified face and of size given by the
specified point size
fn
- the font nameps
- the point size
WritableFont
public WritableFont(WritableFont.FontName fn,
int ps,
BoldStyle bs)
Creates a font of the specified face, point size and bold style
fn
- the font nameps
- the point sizebs
- the bold style
WritableFont
public WritableFont(WritableFont.FontName fn,
int ps,
BoldStyle bs,
boolean italic)
Creates a font of the specified face, point size, bold weight and
italicised option.
fn
- the font nameps
- the point sizebs
- the bold styleitalic
- italic flag
WritableFont
public WritableFont(WritableFont.FontName fn,
int ps,
BoldStyle bs,
boolean it,
UnderlineStyle us)
Creates a font of the specified face, point size, bold weight,
italicisation and underline style
fn
- the font nameps
- the point sizebs
- the bold styleit
- italic flagus
- the underline style
WritableFont
public WritableFont(WritableFont.FontName fn,
int ps,
BoldStyle bs,
boolean it,
UnderlineStyle us,
Colour c)
Creates a font of the specified face, point size, bold style,
italicisation, underline style and colour
fn
- the font nameps
- the point sizebs
- the bold styleit
- italic flagus
- the underline stylec
- the colour
WritableFont
public WritableFont(WritableFont.FontName fn,
int ps,
BoldStyle bs,
boolean it,
UnderlineStyle us,
Colour c,
ScriptStyle ss)
Creates a font of the specified face, point size, bold style,
italicisation, underline style, colour, and script
style (superscript/subscript)
fn
- the font nameps
- the point sizebs
- the bold styleit
- the italic flagus
- the underline stylec
- the colourss
- the script style
createFont
public static WritableFont.FontName createFont(String fontName)
Factory method which creates the specified font name. This method
should be used with care, since the string used to create the font
name must be recognized by Excel's internal processing
fontName
- the name of the Excel font
isStruckout
public boolean isStruckout()
Accessor for the strike-out flag
setBoldStyle
public void setBoldStyle(BoldStyle boldStyle)
throws WriteException
Sets the bold style for this font, if the font hasn't been initialized
boldStyle
- the bold style
setColour
public void setColour(Colour colour)
throws WriteException
Sets the colour for this font, if the font hasn't been
initialized
setItalic
public void setItalic(boolean italic)
throws WriteException
Sets the italic indicator for this font, if the font hasn't been
initialized
setPointSize
public void setPointSize(int pointSize)
throws WriteException
Sets the point size for this font, if the font hasn't been initialized
pointSize
- the point size
setScriptStyle
public void setScriptStyle(ScriptStyle scriptStyle)
throws WriteException
Sets the script style (eg. superscript, subscript) for this font,
if the font hasn't been initialized
setStruckout
public void setStruckout(boolean struckout)
throws WriteException
Sets Accessor for the strike-out flag
struckout
- TRUE if this is a struckout font
setUnderlineStyle
public void setUnderlineStyle(UnderlineStyle us)
throws WriteException
Sets the underline style for this font, if the font hasn't been
initialized