ThemeApi
The theme currently applied, and the system and user themes in state.
export interfaceMethods
| Method | Returns | Description |
|---|---|---|
| applyCurrentTheme() | void | Applies the Current Theme. |
| editTheme(theme) | void | Replaces a theme already in state. |
| getCurrentTheme() | string | Retrieves name of Current Theme |
| getCurrentThemeObject() | AdaptableTheme | Retrieves the current theme object |
| getSystemThemes() | AdaptableTheme[] | Retrieves System Themes in State |
| getThemeByName(themeName) | AdaptableTheme | A theme looked up by name, system or user. |
| getThemes() | AdaptableTheme[] | Retrieves all Themes (both System & User) in State |
| getThemeState() | ThemeState | Retrieves Theme section from Adaptable State |
| loadDarkTheme() | void | Sets AdapTable Dark Theme - updates the AG Grid theme to match |
| loadLightTheme() | void | Sets AdapTable Light Theme - updates the AG Grid theme to match |
| loadTheme(theme) | void | Sets Adaptable to use a given theme |
| openThemeSettingsPanel() | void | Opens Settings Panel with Theme section selected and visible |
| setSystemThemes(systemThemes) | void | Sets available System Themes; if empty array is passed none will be |
Method Details
applyCurrentTheme
Applies the Current Theme.
applyCurrentTheme(): void;Returns
void
editTheme
Replaces a theme already in state.
editTheme(theme: AdaptableTheme): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| theme | AdaptableTheme | Theme to save |
Returns
void
getCurrentTheme
Retrieves name of Current Theme
getCurrentTheme(): string;Returns
Name of Current Theme
string
getCurrentThemeObject
Retrieves the current theme object
getCurrentThemeObject(): AdaptableTheme;Returns
The current theme object
getSystemThemes
Retrieves System Themes in State
getSystemThemes(): AdaptableTheme[];Returns
System Themes in State
getThemeByName
A theme looked up by name, system or user.
getThemeByName(themeName: string): AdaptableTheme;Parameters
| Parameter | Type | Description |
|---|---|---|
| themeName | string | Name of the theme |
Returns
A theme looked up by name, system or user
getThemes
Retrieves all Themes (both System & User) in State
getThemes(): AdaptableTheme[];Returns
All Themes (both System & User) in State
getThemeState
Retrieves Theme section from Adaptable State
getThemeState(): ThemeState;Returns
Theme section from Adaptable State
loadDarkTheme
Sets AdapTable Dark Theme - updates the AG Grid theme to match
loadDarkTheme(): void;Returns
void
loadLightTheme
Sets AdapTable Light Theme - updates the AG Grid theme to match
loadLightTheme(): void;Returns
void
loadTheme
Sets Adaptable to use a given theme
loadTheme(theme: string): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| theme | string | name of theme to apply |
Returns
void
openThemeSettingsPanel
Opens Settings Panel with Theme section selected and visible
openThemeSettingsPanel(): void;Returns
void
setSystemThemes
Sets available System Themes; if empty array is passed none will be
setSystemThemes(systemThemes: SystemThemeEntry[]): void;Parameters
| Parameter | Type | Description |
|---|---|---|
| systemThemes | SystemThemeEntry[] | system themes to use ('light', 'dark', both, or none) |
Returns
void