javax.rad.ui
Interface IFont

All Superinterfaces:
IResource
All Known Implementing Classes:
AwtFont, UIFont

public interface IFont
extends IResource

Platform and technology independent Font definition.

See Also:
Font

Field Summary
static int BOLD
          The bold style constant.
static String DIALOG
          A String constant for the canonical family name of the logical font "Dialog".
static String DIALOG_INPUT
          A String constant for the canonical family name of the logical font "DialogInput".
static int ITALIC
          The italicized style constant.
static String MONOSPACED
          A String constant for the canonical family name of the logical font "Monospaced".
static int PLAIN
          The plain style constant.
static String SANS_SERIF
          A String constant for the canonical family name of the logical font "SansSerif".
static String SERIF
          A String constant for the canonical family name of the logical font "Serif".
 
Method Summary
 String getFamily()
          Returns the family name of this IFont.
 String getFontName()
          Returns the font face name of this IFont.
 String getName()
          Returns the logical name of this IFont.
 int getSize()
          Returns the point size of this IFont, rounded to an integer.
 int getStyle()
          Returns the style of this IFont.
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

DIALOG

static final String DIALOG
A String constant for the canonical family name of the logical font "Dialog". It is useful in Font construction to provide compile-time verification of the name.

See Also:
Constant Field Values

DIALOG_INPUT

static final String DIALOG_INPUT
A String constant for the canonical family name of the logical font "DialogInput". It is useful in Font construction to provide compile-time verification of the name.

See Also:
Constant Field Values

SANS_SERIF

static final String SANS_SERIF
A String constant for the canonical family name of the logical font "SansSerif". It is useful in Font construction to provide compile-time verification of the name.

See Also:
Constant Field Values

SERIF

static final String SERIF
A String constant for the canonical family name of the logical font "Serif". It is useful in Font construction to provide compile-time verification of the name.

See Also:
Constant Field Values

MONOSPACED

static final String MONOSPACED
A String constant for the canonical family name of the logical font "Monospaced". It is useful in Font construction to provide compile-time verification of the name.

See Also:
Constant Field Values

PLAIN

static final int PLAIN
The plain style constant.

See Also:
Constant Field Values

BOLD

static final int BOLD
The bold style constant. This can be combined with the other style constants (except PLAIN) for mixed styles.

See Also:
Constant Field Values

ITALIC

static final int ITALIC
The italicized style constant. This can be combined with the other style constants (except PLAIN) for mixed styles.

See Also:
Constant Field Values
Method Detail

getName

String getName()
Returns the logical name of this IFont. Use getFamily to get the family name of the font. Use getFontName to get the font face name of the font.

Returns:
a String representing the logical name of this IFont.
See Also:
getFamily(), getFontName()

getFamily

String getFamily()
Returns the family name of this IFont.

The family name of a font is font specific. Two fonts such as Helvetica Italic and Helvetica Bold have the same family name, Helvetica, whereas their font face names are Helvetica Bold and Helvetica Italic. The list of available family names may be obtained by using the GraphicsEnvironment.getAvailableFontFamilyNames() method.

Use getName to get the logical name of the font. Use getFontName to get the font face name of the font.

Returns:
a String that is the family name of this IFont.
See Also:
getName(), getFontName()

getFontName

String getFontName()
Returns the font face name of this IFont. For example, Helvetica Bold could be returned as a font face name. Use getFamily to get the family name of the font. Use getName to get the logical name of the font.

Returns:
a String representing the font face name of this IFont.
See Also:
getFamily(), getName()

getStyle

int getStyle()
Returns the style of this IFont. The style can be PLAIN, BOLD, ITALIC, or BOLD+ITALIC.

Returns:
the style of this IFont

getSize

int getSize()
Returns the point size of this IFont, rounded to an integer. Most users are familiar with the idea of using point size to specify the size of glyphs in a font. This point size defines a measurement between the baseline of one line to the baseline of the following line in a single spaced text document. The point size is based on typographic points, approximately 1/72 of an inch.

The Java(tm)2D API adopts the convention that one point is equivalent to one unit in user coordinates. When using a normalized transform for converting user space coordinates to device space coordinates 72 user space units equal 1 inch in device space. In this case one point is 1/72 of an inch.

Returns:
the point size of this IFont in 1/72 of an inch units.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.