Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.style.laf.browser
Class BlafStyleUtils

java.lang.Object
  |
  +--oracle.cabo.style.laf.browser.BlafStyleUtils

public class BlafStyleUtils
extends java.lang.Object

Utility methods for style personalization of the BLAF UI.

The methods provided by this utility class return UserStyleSheet instances which can be used at render time to modify the appearance of a rendered UINode tree. Marlin obtains the UserStyleSheet to use for a render via the Configuration.USER_STYLE_SHEET property. However, since UserStyleSheets are meant to contain user-specific (or request-specific) data, and Configuration instances generally store global configuration data, clients are encouraged to use a Customization object for specifying the UserStyleSheet.

See Also:
Configuration, Customization, UserStyleSheet

Field Summary
static java.lang.String DEFAULT_FONT_FAMILY
          Constant used by getFontStyles() to indicate that the default font family should be used.
static int DEFAULT_FONT_SIZE
          Constant used by getFontStyles() to indicate that the default font size should be used.
static java.lang.String NO_FONT_FAMILY
          Constant used by getFontStyles() to indicate that no font family should be used.
static int NO_FONT_SIZE
          Constant used by getFontStyles() to indicate that no font size should be used.
 
Method Summary
static UserStyleSheet getColorStyles(java.awt.Color darkColor, java.awt.Color darkAccentColor, java.awt.Color textBackground, java.awt.Color textForeground)
          Returns a UserStyleSheet with color styles.
static UserStyleSheet getFontStyles(int baseFontSize, java.lang.String fontFamily)
          Returns a UserStyleSheet with font size and font family styles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FONT_SIZE

public static final int DEFAULT_FONT_SIZE
Constant used by getFontStyles() to indicate that the default font size should be used.
See Also:
getFontStyles(int, java.lang.String)

NO_FONT_SIZE

public static final int NO_FONT_SIZE
Constant used by getFontStyles() to indicate that no font size should be used.
See Also:
getFontStyles(int, java.lang.String)

DEFAULT_FONT_FAMILY

public static final java.lang.String DEFAULT_FONT_FAMILY
Constant used by getFontStyles() to indicate that the default font family should be used.
See Also:
getFontStyles(int, java.lang.String)

NO_FONT_FAMILY

public static final java.lang.String NO_FONT_FAMILY
Constant used by getFontStyles() to indicate that no font family should be used.
See Also:
getFontStyles(int, java.lang.String)
Method Detail

getColorStyles

public static UserStyleSheet getColorStyles(java.awt.Color darkColor,
                                            java.awt.Color darkAccentColor,
                                            java.awt.Color textBackground,
                                            java.awt.Color textForeground)
Returns a UserStyleSheet with color styles.
Parameters:
darkColor - The color to use in place of the standard dark color from the "core" color ramp (that is, the dark blue color). If null, the default blue colors are used.
darkAccentColor - The color to use in place of the standard dark color from the "accent" color ramp (that is, the dark tan color). If null, the default tan colors are used.
textBackground - The color to use in place of the standard text background color. If null, the default text background color (white) is used.
textForeground - The color to use in place of the standard text foreground color. If null, the default text foreground color (black) is used.
Returns:
A UserStyleSheet containing color styles to use when rendering. If all colors are null, getColorStyles() returns null.

getFontStyles

public static UserStyleSheet getFontStyles(int baseFontSize,
                                           java.lang.String fontFamily)
Returns a UserStyleSheet with font size and font family styles.
Parameters:
baseFontSize - The base font size, in points. Appropriate sizes for all styles (such as different sizes for headers, etc...) will be derived from this base font size. DEFAULT_FONT_SIZE specifies that the default base font size should be used. NO_FONT_SIZE can be used to indicate that no font sizes should be specified.
fontFamily - The font family name. DEFAULT_FONT_FAMILY can be used to indicate that the default font family should be used. NO_FONT_FAMILY can be used to indicate that no font families should be specified.
Returns:
A UserStyleSheet containing font styles to use when rendering. If baseFontSize is DEFAULT_FONT_SIZE and fontFamily is DEFAULT_FONT_FAMILY, getFontStyles() returns null.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.