
Additional Components 155
Theme and Module Resources
• If a renderer is associated with the fully qualified class name of this object (via a
<class> element within the <associations> element), for example,
java.lang.Double, use that renderer.
• If a renderer is associated with the fully qualified name property of the unit of this
object (via a <unit> element within the <associations> element), use that
renderer. The unit name is fully qualified by preceding it with the DataSource
name and a colon, for example foglight-4.2:percent.
• If none of the preceding rules apply, use the Default Renderer.
Several methods have been added to the RuntimeValue class related to renderers. The
first pair return DataPoints instead of Objects. A DataPoint is composed of the
evaluated value of the RuntimeValue, plus its renderer.
Theme and Module Resources
The ability to refer to files through the theme or in the module is most useful in
specifying images for state renderers or creating icons.
Themes can contain files (most usually images) which require separate versions for
different themes, locales or UI sizes – an example would be an image that has a 16x16
version for SMALL sub-themes, a 32x32 version for NORMAL, a 64x64 version for
LARGE, and a dark-background version for the normal UI but a black-on-white version
for the printable theme.
Modules can also contain files (in a public repository) which are available to the
application's users. It is also possible to create a theme directory structure within a given
module and store theme-specific files for selective access.
There are three types of resource path:
• WCFTHEME:
• WCFMODULE:
• WCFMODULETHEME:
Note In the following, always use the default images directory as the root for any image files that
you add. Custom paths are not supported.
Komentarze do niniejszej Instrukcji