9
Working with Style Classes 9-1
9
Working with Style Classes
This chapter describes how to work with style classes. This chapter includes the following sections:
■
Section 9.1, About Style Classes
■
Section 9.2, Creating a Style Class
■
Section 9.3, Modifying a Style Class
■
Section 9.4, Configuring a Style Class for a Specific Instance of a Component
9.1 About Style Classes
A style class allows you to specify a number of style properties in one location in an ADF skin that you want to apply to specific instances of ADF Faces or ADF Data
Visualization components. The style properties that you define for a style class take precedence over the style properties that you define for the component’s selectors.
Application developers can specify a style class as a value for the styleClass and inlineStyle attributes that many ADF Faces components expose. At runtime, the
style properties that you defined in the style class get applied to the ADF Faces component rather than other style properties defined in the ADF skin. Style classes
differ from the global selector aliases, described in
Chapter 8, Working With Global Selector Aliases,
which enable you to define style properties that you want to apply to multiple ADF Faces components.
Figure 9–1 shows an ADF skin with the nodes expanded for the different categories of
style classes.
Figure 9–1 Categories of Style Class
9-2 Skin Editor Users Guide for Oracle Application Development Framework
Each category of style class serves a purpose:
■
Component Group: Menu : Style classes inherited from the extended ADF skins
that affect menu items.
■
Component Group: PanelBox and Region : Style classes inherited from the
extended ADF skins that affect panelBox and region components.
■
Component Group: PanelHeader : Style classes inherited from the extended ADF
skins that affect panelHeader components.
■
Descendant Selectors : Style classes inherited from the extended ADF skins for
descendant selectors.
■
Miscellaneous : Miscellaneous style classes inherited from the extended ADF
skins. For example, this category includes the .AFBrandingBar style class that can be used for a branding bar containers.
■
Note Window : Style classes inherited from the extended ADF skins that affect the
noteWindow component.
■
Popup : Style classes inherited from the extended ADF skins that affect the popup
component.
■
Text : Style classes inherited from the extended ADF skins that determine the
appearance of various types of text for example, address fields and instruction text.
Style classes that you or other users define appear under the Style Classes node as shown by the entry for the .UserDefined style class in
Figure 9–1 . For detailed
descriptions of the style classes in the ADF skins that Oracle ADF provides, see the Oracle Fusion Middleware Tag Reference for Oracle ADF Faces Skin Selectors.
9.2 Creating a Style Class