[]
ThemeAn ITheme describes a workbook theme, including its name, whether it is built in, and the associated IThemeColorScheme and IThemeFontScheme.
ITheme theme = new Theme("Custom Theme", Themes.GetBerlin());
String name = theme.getName();
boolean builtIn = theme.isBuiltIn();
IThemeColorScheme colorScheme = theme.getThemeColorScheme();
IThemeFontScheme fontScheme = theme.getThemeFontScheme();
getName()booleanThe returned name identifies the current theme and can be used to look up a theme from the Themes collection.
ITheme theme = Themes.GetBerlin();
String name = theme.getName();
Built-in themes are the predefined themes returned by the Themes utility methods. Custom themes created programmatically return false.
ITheme theme = Themes.GetBerlin();
boolean builtIn = theme.isBuiltIn();
true if the theme is a built-in theme; otherwise, false.Represents a color scheme within the theme and provides access to the theme colors by IThemeColor.
ITheme theme = workbook.getTheme();
IThemeColorScheme colorScheme = theme.getThemeColorScheme();
IThemeColor accent1 = colorScheme.get(ThemeColor.Accent1);
Represents the theme font scheme and provides access to the major and minor theme font collections through IThemeFontScheme.getMajor() and IThemeFontScheme.getMinor().
ITheme theme = Themes.GetBerlin();
IThemeFontScheme fontScheme = theme.getThemeFontScheme();
IThemeFonts majorFonts = fontScheme.getMajor();