Skip Headers
Oracle® Fusion Applications Developer's Guide
11g Release 1 (11.1.1.5)

Part Number E15524-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

17 Implementing Skinning

This chapter describes how to change the look and feel of your application by changing the skin. This chapter deals specifically with skinning as applied to Oracle Fusion applications and the UI Shell.

This chapter includes the following sections:

For general information about skinning, see "Customizing the Appearance Using Styles and Skins" in the Oracle Fusion Middleware Web User Interface Developer's Guide for Oracle Application Development Framework.

For information about the UI Shell, see Chapter 14, "Implementing the UI Shell."

17.1 Implementing Skinning

Skinning lets you change the look and feel of your application without changing the content.

The goals of skinning include:

17.1.1 Before You Begin

Before you can implement skinning, you need to accomplish these actions:

17.2 Creating and Implementing a Custom Skin

Follow these basic steps to create a custom skin and implement it in your application.

17.2.1 How to Create the Skin Project

The first step to create a custom skin is to create the skin project. Follow these steps.

  1. Launch the ADF Skin Editor.

  2. Create a new application. Select File > New > ADF Skin Application. The Create ADF Skin Application wizard launches and displays the ADF Skin Application dialog, as shown in Figure 17-1.

    Figure 17-1 Naming the Skin Application

    Naming the Skin Application
    • Application Name

      Enter a name for the application. By default, an application name in the form Applicationn is shown, where n is a number that increases sequentially from 1. This is the filename that will be used for the application control file within the file system. The extension .jws is assumed, but not displayed.

    • Directory

      Enter a directory for the application or click Browse to locate one. The default directory location is its own subdirectory beneath skineditor/, such as skineditor/Application_Name.

    Click Next to display the ADF Skin Project dialog, shown in Figure 17-2.

    Figure 17-2 Naming the Skin Project

    Naming the Skin Project
    • Project Name

      Enter a name for the project. By default, a project name in the form Projectn is shown, where n is a number that increases sequentially from 1. This is the filename that will be used for the project within the file system. The extension .jpr is assumed, but not displayed.

    • Directory

      Enter a directory for the application or click Browse to locate one. The default directory location is skineditor/Application_Name/Project_Name.

    • Target Application Release

      Choose 11.1.1.4.0. This determines which skin families are available for your release and the values that will be available for the Extends option when you create a new ADF Skin file, as shown in Figure 17-3.

      You can select an earlier release, but the number and contents of the available skin families may be different.

    Click Finish.

  3. Select File > New > ADF Skin File to launch the Create ADF Skin File wizard, shown in Figure 17-3.

    Figure 17-3 Creating a Skin File

    Creating Skin File

    An ADF skin is a type of CSS file that you can use to define the look and feel of your application. Oracle Application Development Framework (ADF) provides a number of ADF skins that you can extend when you create a new ADF skin. The recommended ADF skin to extend depends on the release of Oracle ADF that you use.

    • File Name

      Enter a file name for the new ADF skin. The example uses GPS.

    • Directory

      Enter the directory path to the CSS source file for the ADF skin. You can accept the default path shown in the Directory field specify a different path.

    • Family

      This value automatically is populated with the root of the File Name you entered.

      If necessary, enter a different value for the family name of your ADF skin. Later, you will set this value in your application's configuration file (for example, the trinidad-config.xml file) to apply the ADF skin to the application.

      • Use as the default skin family for this project

        Clear this checkbox if you do not want to make the ADF skin the default for your project. Later, you can set a value in your project's configuration file to make the ADF skin the default.

    • Extends

      This field lets you select from the list of available skin families. The selection depends on the value selected for the Target Application Release, as shown in Figure 17-2.

      From the drop-down list, select fusionFx-simple-v1.desktop.

      Compared to the complex Oracle-specific skin, this skin is optimized to make it easy to create a new style.

      • Simplified color selection

      • Better aliases

      • Images that can be colored automatically

      The difference between extending and adding is that, by adding, you are still referencing the base skin family (such as Fusion-Fx in the Trinidad-config file) but the styles in the addition also are picked up. Extending is when you extend and then override.

    • Skin ID

      This read-only value automatically is populated with the root of the File Name you entered and the extension of the value selected in the Extends field.

      The trinidad-skins.xml file uses the value of Skin Id to identify ADF skins.

    Click OK to create the .css file (GPS.css in this example).

17.2.2 How to Customize the Skin

When you click to display the Design view, the styles display in the Style Classes list and a sample view is displayed, as shown inFigure 17-4.

Figure 17-4 Showing Style Classes in a Skin CSS File

Showing Style Classes in a Skin CSS File

Click another Theme tab, such as Medium Theme, to show how the text display changes, as shown in Figure 17-5.

Figure 17-5 Displaying a Different Theme

Displaying a Different Theme

To customize the colors of the CSS style, click the Images tab. The display will change to resemble Figure 17-6.

Figure 17-6 Displaying a Scheme's Colors

Displaying a Scheme's Colors

To change a style's color, click the icon to the right of the style name to display the color picker, shown in Figure 17-7.

Figure 17-7 Displaying the Color Picker

Displaying the Color Picker

You also can change all style colors by clicking the Adjust Hue/Saturation/Brightness link at the bottom of the styles list. All the styles and their current colors will be listed. You can change all by clicking and dragging the sliders, as shown in Figure 17-8.

Figure 17-8 Adjusting the Hue, Saturation and Brightness

Adjusting the Hue, Saturation and Brightness

17.2.3 How to Deploy the Skin Profile

You need to deploy the skin project to a JAR file that can be included in an application. There are three steps to deploying the skin project:

  • Create the skin deployment profile.

  • Deploy the skin profile.

  • Deploy the skin profile to a JAR file.

To deploy the skin project:

  • Right-click the skin project and select Deploy > New Deployment Profile to display the Create Deployment Profile dialog, shown in Figure 17-9.

    Figure 17-9 Creating the Skin Deployment Profile

    Creating the Skin Deployment Profile
    • Profile Type

      Select ADF Library JAR File.

    • Deployment Profile Name

      The name must begin with Xx_. The example uses Xx_ plus the name of the project.

  • Click OK.

  • Right-click the skin project and select Deploy > profile_name to display the Deploy profile_name dialog.

  • Click Finish.

  • Right-click the skin project and select Deploy > profile_name to JAR file.

The skin profile JAR now is ready to be added to an application's Libraries and Classpath.

17.3 Changing the Skin of an Application

You can change the skin of an existing deployed application or you can add a skin within JDeveloper to a development project.

To change the skin of a deployed application:

To use a skin within JDeveloper:

Set your profile option (PO) to the new skin. (You can create a PO for the skin associated to a single user when developing a skin so others are not affected.) After changing the PO, reload a page using the PO and you should see your changes immediately.

To change the PO:

If you log out of the fndSetup application and then back in, you'll see that the simple Xx_GPS skin has changed how the application looks, as shown in Figure 17-13.

Figure 17-13 Showing the Effect of the New Skin

Showing the Effect of the New Skin