org.csstudio.opibuilder.util
Class OPIFont

The dedicated font type which supports predefined font name in OPI builder font file. If the font name doesn't exist in the color file, the system font will be adopted.


           
Method Summary
 java.lang.String getFontMacroName()
          Returns the Macro Name of the OPIFont.
 java.lang.String getFontName()
          Returns the name of the Font.
 int getHeight()
          Returns the height of the font in points.
 int getStyle()
          Returns the style of the receiver which is a bitwise OR of one or more of the SWT constants NORMAL(0), BOLD(2) and ITALIC(1).
 boolean isPreDefined()
          Returns true if this is a predefined font in font macro file.

Method Detail

getFontMacroName

public java.lang.String getFontMacroName()
Returns the Macro Name of the OPIFont.

Returns:
the predefined font macro name or flattened font data string if it is not predefined.

getFontName

public java.lang.String getFontName()
Returns the name of the Font. On platforms that support font foundries, the return value will be the foundry followed by a dash ("-") followed by the face name.

Returns:
the name of the font

getHeight

public int getHeight()
Returns the height of the font in points.

Returns:
the height of the font.

getStyle

public int getStyle()
Returns the style of the receiver which is a bitwise OR of one or more of the SWT constants NORMAL(0), BOLD(2) and ITALIC(1).

Returns:
the style of the font.

isPreDefined

public boolean isPreDefined()
Returns:
true if this font is predefined in font file, false otherwise.