Customizing the look and feel of your application
Royale provides three features for adjusting the look and feel of your application: styles, skins, and themes.
You can plug different style classes into your Royale app that can manage different levels of styling features. Usually a Royale application will include a Style class at the Application bead level like this:
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js="library://ns.apache.org/royale/basic"> ... <j:valuesImpl> <js:SimpleCSSValuesImpl /> </j:valuesImpl> ...
-royale-swf
media query but not other media queries. You can replace it in your app with other implementations that handle more complex selector lookups.<js:VContainer id="vb" width="100%" height="100%"> <js:style> <js:SimpleCSSStyles paddingLeft="6" paddingTop="4" paddingRight="8" paddingBottom="4"/> </js:style> </js:VContainer>
<js:PanelView> <js:titleBar> <js:TitleBar height="20"> <js:style> <js:SimpleCSSStylesWithFlex backgroundColor="0xA65904" /> </js:style> </js:TitleBar> </js:titleBar> </js:PanelView>
Skinning is a technique to change the appearance of a component by modifying or extending its visual elements. Skins can have graphical elements like images, or can use ActionScript classes that use the drawing API.
More information on skinning, with examples, is coming soon.
In Apache Royale, a theme is a predefined CSS file (and optionally other assets like images) that holds the definitions of each component. When you add a theme to your application or replace the existing one, all the visuals (colors, fonts, lines, and drawings) in your your entire application change to the new theme at once.
In the Jewel UI Set, themeing is one of the key concepts. You can learn more about it here: Jewel Themes.