ThemeApi

View as Markdown

The theme currently applied, and the system and user themes in state.

TypeScript
export interface

Methods

MethodReturnsDescription
applyCurrentTheme()voidApplies the Current Theme.
editTheme(theme)voidReplaces a theme already in state.
getCurrentTheme()stringRetrieves name of Current Theme
getCurrentThemeObject()AdaptableThemeRetrieves the current theme object
getSystemThemes()AdaptableTheme[]Retrieves System Themes in State
getThemeByName(themeName)AdaptableThemeA theme looked up by name, system or user.
getThemes()AdaptableTheme[]Retrieves all Themes (both System & User) in State
getThemeState()ThemeStateRetrieves Theme section from Adaptable State
loadDarkTheme()voidSets AdapTable Dark Theme - updates the AG Grid theme to match
loadLightTheme()voidSets AdapTable Light Theme - updates the AG Grid theme to match
loadTheme(theme)voidSets Adaptable to use a given theme
openThemeSettingsPanel()voidOpens Settings Panel with Theme section selected and visible
setSystemThemes(systemThemes)voidSets available System Themes; if empty array is passed none will be

Method Details

applyCurrentTheme

Applies the Current Theme.

TypeScript
applyCurrentTheme(): void;
Returns

void

editTheme

Replaces a theme already in state.

TypeScript
editTheme(theme: AdaptableTheme): void;
Parameters
ParameterTypeDescription
themeAdaptableThemeTheme to save
Returns

void

getCurrentTheme

Retrieves name of Current Theme

TypeScript
getCurrentTheme(): string;
Returns

Name of Current Theme

string

getCurrentThemeObject

Retrieves the current theme object

TypeScript
getCurrentThemeObject(): AdaptableTheme;
Returns

The current theme object

AdaptableTheme

getSystemThemes

Retrieves System Themes in State

TypeScript
getSystemThemes(): AdaptableTheme[];
Returns

System Themes in State

AdaptableTheme[]

getThemeByName

A theme looked up by name, system or user.

TypeScript
getThemeByName(themeName: string): AdaptableTheme;
Parameters
ParameterTypeDescription
themeNamestringName of the theme
Returns

A theme looked up by name, system or user

AdaptableTheme

getThemes

Retrieves all Themes (both System & User) in State

TypeScript
getThemes(): AdaptableTheme[];
Returns

All Themes (both System & User) in State

AdaptableTheme[]

getThemeState

Retrieves Theme section from Adaptable State

TypeScript
getThemeState(): ThemeState;
Returns

Theme section from Adaptable State

ThemeState

loadDarkTheme

Sets AdapTable Dark Theme - updates the AG Grid theme to match

TypeScript
loadDarkTheme(): void;
Returns

void

loadLightTheme

Sets AdapTable Light Theme - updates the AG Grid theme to match

TypeScript
loadLightTheme(): void;
Returns

void

loadTheme

Sets Adaptable to use a given theme

TypeScript
loadTheme(theme: string): void;
Parameters
ParameterTypeDescription
themestringname of theme to apply
Returns

void

openThemeSettingsPanel

Opens Settings Panel with Theme section selected and visible

TypeScript
openThemeSettingsPanel(): void;
Returns

void

setSystemThemes

Sets available System Themes; if empty array is passed none will be

TypeScript
setSystemThemes(systemThemes: SystemThemeEntry[]): void;
Parameters
ParameterTypeDescription
systemThemesSystemThemeEntry[]system themes to use ('light', 'dark', both, or none)
Returns

void