Modifier and Type | Class | Description |
---|---|---|
static class |
WritableFont.FontName |
Static inner class used for classifying the font names
|
Modifier and Type | Field | Description |
---|---|---|
static WritableFont.FontName |
ARIAL |
Objects created with this font name will be rendered within Excel as ARIAL
fonts
|
static jxl.write.WritableFont.BoldStyle |
BOLD |
Indicates that this font should be presented in a BOLD style
|
static WritableFont.FontName |
COURIER |
Objects created with this font name will be rendered within Excel as
COURIER fonts
|
static int |
DEFAULT_POINT_SIZE |
The default point size for all Fonts
|
static jxl.write.WritableFont.BoldStyle |
NO_BOLD |
Indicates that this font should not be presented as bold
|
static WritableFont.FontName |
TAHOMA |
Objects created with this font name will be rendered within Excel as
TAHOMA fonts
|
static WritableFont.FontName |
TIMES |
Objects created with this font name will be rendered within Excel as TIMES
fonts
|
Constructor | Description |
---|---|
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,
jxl.write.WritableFont.BoldStyle bs) |
Creates a font of the specified face, point size and bold style
|
WritableFont(WritableFont.FontName fn,
int ps,
jxl.write.WritableFont.BoldStyle bs,
boolean italic) |
Creates a font of the specified face, point size, bold weight and
italicised option.
|
WritableFont(WritableFont.FontName fn,
int ps,
jxl.write.WritableFont.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,
jxl.write.WritableFont.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,
jxl.write.WritableFont.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)
|
Modifier and Type | Method | Description |
---|---|---|
static WritableFont.FontName |
createFont(java.lang.String fontName) |
Factory method which creates the specified font name.
|
boolean |
isStruckout() |
Accessor for the strike-out flag
|
void |
setBoldStyle(jxl.write.WritableFont.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
|
equals, getBoldWeight, getColour, getData, getFontIndex, getName, getPointSize, getScriptStyle, getUnderlineStyle, hashCode, initialize, isInitialized, isItalic, uninitialize
public static final WritableFont.FontName ARIAL
public static final WritableFont.FontName TIMES
public static final WritableFont.FontName COURIER
public static final WritableFont.FontName TAHOMA
public static final jxl.write.WritableFont.BoldStyle NO_BOLD
public static final jxl.write.WritableFont.BoldStyle BOLD
public static final int DEFAULT_POINT_SIZE
public WritableFont(WritableFont.FontName fn)
fn
- the font namepublic WritableFont(Font f)
f
- the font to copypublic WritableFont(WritableFont.FontName fn, int ps)
ps
- the point sizefn
- the font namepublic WritableFont(WritableFont.FontName fn, int ps, jxl.write.WritableFont.BoldStyle bs)
ps
- the point sizebs
- the bold stylefn
- the font namepublic WritableFont(WritableFont.FontName fn, int ps, jxl.write.WritableFont.BoldStyle bs, boolean italic)
ps
- the point sizebs
- the bold styleitalic
- italic flagfn
- the font namepublic WritableFont(WritableFont.FontName fn, int ps, jxl.write.WritableFont.BoldStyle bs, boolean it, UnderlineStyle us)
ps
- the point sizebs
- the bold styleus
- the underline stylefn
- the font nameit
- italic flagpublic WritableFont(WritableFont.FontName fn, int ps, jxl.write.WritableFont.BoldStyle bs, boolean it, UnderlineStyle us, Colour c)
ps
- the point sizebs
- the bold styleus
- the underline stylefn
- the font nameit
- italic flagc
- the colourpublic WritableFont(WritableFont.FontName fn, int ps, jxl.write.WritableFont.BoldStyle bs, boolean it, UnderlineStyle us, Colour c, ScriptStyle ss)
ps
- the point sizebs
- the bold styleus
- the underline stylefn
- the font nameit
- the italic flagc
- the colourss
- the script stylepublic void setPointSize(int pointSize) throws WriteException
setPointSize
in class jxl.write.biff.WritableFontRecord
pointSize
- the point sizeWriteException
public void setBoldStyle(jxl.write.WritableFont.BoldStyle boldStyle) throws WriteException
boldStyle
- the bold styleWriteException
public void setItalic(boolean italic) throws WriteException
setItalic
in class jxl.write.biff.WritableFontRecord
italic
- the italic flagWriteException
public void setUnderlineStyle(UnderlineStyle us) throws WriteException
us
- the underline styleWriteException
public void setColour(Colour colour) throws WriteException
colour
- the colourWriteException
public void setScriptStyle(ScriptStyle scriptStyle) throws WriteException
scriptStyle
- the colourWriteException
public boolean isStruckout()
isStruckout
in interface Font
isStruckout
in class jxl.biff.FontRecord
public void setStruckout(boolean struckout) throws WriteException
setStruckout
in class jxl.write.biff.WritableFontRecord
struckout
- TRUE if this is a struckout fontWriteException
public static WritableFont.FontName createFont(java.lang.String fontName)
fontName
- the name of the Excel font