A theme is a coordinated set of cascading stylesheet files, JavaScript files, and icon images that are applied to a page and to the components in the page. Themes work with the components from the Basic, Layout, and Composite categories of the Palette to give them a common look and feel. For Java EE 5 projects, which use JavaServer Faces version 1.2, there is at least one standard theme available, Web UI Default Theme. For J2EE 1.4 projects, which use JavaServer Faces 1.1 components, there are three themes available, Green Theme, Default Theme, and Gray Theme. These themes provide a different look from the Web UI Default Theme.
If you look in the Projects window under the project-name > Themes node, you can
see the available themes listed. The theme that currently applies to your project has an
icon that includes an arrow .
To change the theme for your project, right-click the new theme's node and choose Set As Current Theme.
The theme files are located in
install-dir
/rave2.0/modules/ext
and have the following file
names:
webui-jsf-suntheme.ja
r
(JavaServer Faces 1.2 theme) defaulttheme.jar
(JavaServer Faces 1.1 theme)defaulttheme-gray.jar
(JavaServer Faces 1.1 theme)defaulttheme-green.jar
(JavaServer Faces 1.1 theme)
In addition to properties files, image files, and so on, the theme files contain CSS files
with classes that control the look of the components in the Basic, Layout, and Composite
categories of the Palette. For each component with CSS classes in the Default Theme file, the
Properties Window topic has a list of those CSS classes under the styleClass
property. For example, if you drop a Table component on a page and click in its Properties
window, you can click F1 to see the help topic, where you can scroll down to the
styleClass
property description and link to the list of CSS styles for the Table
component.
There is also a description of the structure of the JavaServer Faces 1.1 Default Theme in Structure of a JavaServer Faces 1.1 Theme File: defaulttheme.jar.