theme
pentaho. theme
The theme
namespace contains types and utilities that constitute the Theming API.
The Theming API coordinates the interaction between applications, visualizations and systems integrators on the definition and application of CSS styles for the DOM elements these provide.
Content Creators
When an application displays a menu entry representing a visualization, it owns the corresponding DOM elements, and defines and documents what elements and styles may be configured by other parties. Likewise, when a view renders a visualization, it owns the DOM elements it creates, and defines and documents what elements and styles can be configured by other parties. In this description, the application and the view are content creators. The elements and styles that can be configured constitute the themeable content.
Generally, it is the content creator which is responsible for loading any registered themes for their themeable content. This can be done by using the LoadThemeAnnotation
module annotation or by directly calling the theming service's loadModuleThemeAsync
method.
Theme Providers
A theme provides arbitrary styles for the elements of the themeable content. Whoever provides a theme does so by providing, for example, CSS files and images, i.e. theme resources. The power of themes is realized if theme providers can be different from content creators.
The ThemeAnnotation
module annotation allows a theme provider to associate theme resources with a themeable module.
Theme Service
The theme service exposes the Theming API's core functionality. The theme service is defined by the interface pentaho.theme.IService
. A singleton instance which exposes this interface is the module pentaho.theme.service
.
Source: doc-js/pentaho/theme/_namespace.jsdoc, line 17
Child Namespaces
Name | Summary |
---|---|
spec | The |
Classes
Name | Summary |
---|---|
LoadThemeAnnotation | The |
ThemeAnnotation | The theme annotation associates theming resources with a module. |
Interfaces
Name | Summary |
---|---|
IService | The |
Members
Name | Description |
---|---|
main : IAmdLoaderPlugin | The |
service : pentaho.theme.IService | The |
Members Details
main: IAmdLoaderPlugin |
---|
The AMD Plugin Usage:
To register a theme module, configure the module composed of the plugin and its argument. For example, to configure the theme of the To load the theme of the current module you request the Source: javascript/web/pentaho/theme/main.js, line 31 See also: pentaho.theme.spec.IConfiguration |
service: pentaho.theme.IService |
---|
The |