[]
IThemeA Theme 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();
final StringgetName()final IThemeColorSchemefinal IThemeFontSchemefinal booleanTheme class with the specified theme name.This constructor calls Theme(String,ITheme) with null for the base theme. If no base theme is specified, the Office theme is used as the starting point.
Theme theme = new Theme("Custom Theme");
theme.getThemeColorScheme().get(ThemeColor.Accent1).setRGB(Color.GetBlue());
workbook.setTheme(theme);
themeName - The name of the theme. Must not be null, empty, or equal to a built-in theme name ignoring case.IllegalArgumentException - if themeName is null, empty, or matches a built-in theme name.Theme class with the specified theme name and base theme.Creates a custom theme by copying settings from the specified base ITheme. If baseTheme is null, the new theme is initialized from the Office theme.
The theme name must be unique and must not be empty or match a built-in theme name.
Theme theme = new Theme("CustomTheme", Themes.GetBerlin());
theme.getThemeColorScheme().get(ThemeColor.Accent1).setRGB(Color.GetBlue());
workbook.setTheme(theme);
themeName - The name of the theme. Must not be null, empty, or the name of a built-in theme.baseTheme - The base theme to initialize from. If null, the Office theme is used.IllegalArgumentException - if themeName is null, empty, or matches a built-in theme name.The returned name identifies the current theme and can be used to look up a theme from Themes.get(String).
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();
Represents a color scheme within the theme and provides access to the theme colors by ThemeColor.
ITheme theme = workbook.getTheme();
IThemeColorScheme colorScheme = theme.getThemeColorScheme();
IThemeColor accent1 = colorScheme.get(ThemeColor.Accent1);
getThemeColorScheme in interface IThemeRepresents 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();
getThemeFontScheme in interface ITheme