|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.dvb.ui.FontFactory
public class FontFactory
Provides a mechanism for applications to instantiate fonts that are not built into the system. The two constructors of this class allow fonts to be downloaded either through the font index file of the application or directly from a font file in the format(s) specified in the main body of the present document.
Constructor Summary | |
---|---|
FontFactory()
Constructs a FontFactory for the font index file bound to this application in the application signalling. |
|
FontFactory(java.net.URL u)
Constructs a FontFactory for the font file found at the given location. |
Method Summary | |
---|---|
java.awt.Font |
createFont(java.lang.String name,
int style,
int size)
Creates a font object from the font source associated with this FontFactory. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FontFactory() throws FontFormatException, java.io.IOException
FontFormatException
- if there is an error in the font index
file bound with the application.
java.io.IOException
- if there is no font index file bound
with the application, or if there is an
error attempting to access the data in that
file.public FontFactory(java.net.URL u) throws java.io.IOException, FontFormatException
u
- The location of the font file
java.io.IOException
- if there is an
error attempting to access the data referenced
by the URL
java.lang.IllegalArgumentException
- if the URL is not both valid and supported
java.lang.SecurityException
- if access to the specified URL is denied by
security policy
FontFormatException
- if the file at that URL is not a valid
font file as specified in the main body of the present documentMethod Detail |
---|
public java.awt.Font createFont(java.lang.String name, int style, int size) throws FontNotAvailableException, FontFormatException, java.io.IOException
The value of the style argument must be as defined in java.awt.Font. Valid values are the following:
java.awt.Font.PLAIN
java.awt.Font.BOLD
java.awt.Font.ITALIC
java.awt.Font.BOLD + java.awt.Font.ITALIC
name
- the font namestyle
- the constant style used, such as java.awt.Font.PLAIN.size
- the point size of the font
FontNotAvailableException
- if a font with given parameters cannot
be located or created.
java.io.IOException
- if there is an error retrieving a font from the
network. Thrown only for font factory instances bound to the font index file of
an application.
java.lang.IllegalArgumentException
- if the style parameter is not in the
set of valid values, or if the size parameter
is zero or negative.
FontFormatException
- if the font file is not a valid
font file as specified in the main body of the present document.
Thrown only for font factory instances bound to the font index file
of an application.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |