net.lucidviews.util.gui
Class Fonts

java.lang.Object
  extended by net.lucidviews.util.gui.Fonts

public class Fonts
extends Object

Utility class for operations with Fonts.

Since:
1.0
Version:
$Revision: 1.4 $
Author:
Stephen Battey
See Also:
Font

Constructor Summary
protected Fonts()
          Default constructor.
 
Method Summary
static Font getFont(String names, int style, int size)
          Get a font with one of the names (in order of preference) and the specified style & size.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Fonts

protected Fonts()
Default constructor. Hidden (made protected) since this is a static class.

Since:
1.0
Method Detail

getFont

public static final Font getFont(String names,
                                 int style,
                                 int size)
Get a font with one of the names (in order of preference) and the specified style & size.

Parameters:
names - A list of font names separated by commas. These can be a logical font name or a font face name. A logical name must be either: Dialog, DialogInput, Monospaced, Serif, or SansSerif. First a font with the first name in the list will be created. If this font cannot be found then the second name will be used and so on until the list is exhausted. If there is no valid font specified in the list or if the name is null, then the name of the new Font is set to the name "Default".
style - The style constant for the Font. The style argument is an integer bitmask that may be PLAIN, or a bitwise union of BOLD and/or ITALIC (for example, ITALIC or BOLD|ITALIC). If the style argument does not conform to one of the expected integer bitmasks then the style is set to PLAIN.
size - the point size of the Font
Returns:
Font
Since:
1.0