setApplicationSkin

setApplicationSkin(skin: JadeSkinApplication);

The setApplicationSkin method of the Application class defines the JadeSkinApplication object used for the current application at run time. The skin consists of a collection of form and control skins. (One of the collections can be empty.)

When you call this method to set a skin, any existing skin for the application is replaced. When the Window class ignoreSkin property is set to false, each form that is active or subsequently loaded applies the form skin that matches the value of the skinCategoryName for the form. If no matching form skin is found, a skin is not applied to that form.

When the setApplicationSkin method is first called, the collected skin data is stored as a blob on the JadeSkinApplication instance. Subsequent calls use this stored information and do not need to retrieve the skin information.

In addition, a presentation client caches the skin information. As a result, subsequent calls of the setApplicationSkin method only need to request the creation of the skin from the presentation client cache file without having to transmit the skin data.

When you change a skin definition using the JadeSkinMaintence form or by loading a form and data definition (.ddb or .ddx) file, the timestamp of all JadeSkinApplication instances is updated, which requires a rebuild of the skin information the first time each skin is set for an application or form. If you change JADE skin information by any other means, you must call the updateSkinTimeStamp method on the JadeSkinApplication instance, to reset the instance timestamp and cause the skin build data to be rebuilt.

Each control that is active or subsequently loaded applies the corresponding control skin matching the value of the skinCategoryName property. If there is no matching control skin or if the value of the ignoreSkin property is true, the control is not drawn with a skin.

Changing a skin object after this method is called has no impact on the displayed skin. To apply any skin changes dynamically, you must call the app.setApplicationSkin method again.

To clear the application skin (cancel the skin display), call this method again with a null value, as follows.

app.setApplicationSkin(null);

See also the Application class getApplicationSkin method, the Form class setApplicationSkin method, and Chapter 9, "Using Skins to Enhance JADE Applications", of the JADE Developer’s Reference.