[]
使用此类可按名称访问主题,并创建可应用于工作簿的自定义主题。Themes 实例可用于获取内置主题和已添加的自定义主题。
Themes themes = new Themes();
ITheme theme = themes.get(Themes.GetBerlin().getName());
workbook.setTheme(theme);
final IThemestatic IThemeGetApex()static IThemestatic IThemeGetBadge()static IThemestatic IThemeGetBasis()static IThemestatic IThemestatic IThemestatic IThemeGetCivic()static IThemefinal intgetCount()static IThemeGetCrop()static IThemestatic IThemeGetDepth()static IThemestatic IThemestatic IThemestatic IThemeGetFacet()static IThemestatic IThemeGetFlow()static IThemestatic IThemeGetFrame()static IThemestatic IThemestatic IThemestatic IThemeGetIon()static IThemestatic IThemestatic IThemestatic IThemeGetMesh()static IThemeGetMetro()static IThemestatic IThemestatic IThemestatic IThemestatic IThemestatic IThemestatic IThemeGetOriel()static IThemestatic IThemeGetPaper()static IThemestatic IThemestatic IThemestatic IThemestatic IThemeGetSavon()static IThemeGetSlate()static IThemeGetSlice()static IThemestatic IThemestatic IThemeGetTrek()static IThemeGetUrban()static IThemestatic IThemeGetVerve()static IThemeGetView()static IThemeGetWisp()static ITheme此方法先搜索内置主题,然后搜索添加到此 Themes 集合中的自定义主题。主题名称匹配不区分大小写,并忽略 name 中的前导和尾随空白。
Themes themes = new Themes();
ITheme theme = themes.get(Themes.GetOfficeTheme().getName());
workbook.setTheme(theme);
name - 要搜索的主题名称。不得为 null;将忽略前导和尾随空白。ITheme;如果没有内置主题或自定义主题与指定名称匹配,则为 null。NullPointerException - 如果 name 为 null。如果 baseTheme 为 null,则从 Office 主题创建新主题。如果 themeName 为 null 或空,则自动生成唯一的自定义主题名称。
Themes themes = new Themes();
ITheme baseTheme = Themes.GetBadge();
ITheme customTheme = themes.add("Custom Badge", baseTheme);
workbook.setTheme(customTheme);
themeName - 新主题的名称。如果为 null 或空,则生成唯一名称。如果非空,则忽略大小写时不得与内置主题或现有自定义主题名称匹配。baseTheme - 要复制作为新主题基础的主题。如果为 null,则使用 Office 主题。ITheme。IllegalArgumentException - 如果 themeName 非空且不是有效的主题名称。此方法会转发到 add(String,ITheme),并以 null 作为基主题,因此新主题将从 Office 主题创建并添加到此 Themes 集合。
Themes themes = new Themes();
ITheme theme = themes.add("Custom Theme");
workbook.setTheme(theme);
themeName - 新主题的名称。如果为 null 或空,则自动生成自定义主题名称。如果非空,则名称必须有效。ITheme。IllegalArgumentException - 如果 themeName 非空且不是有效的主题名称。返回的值包括内置主题以及添加到集合中的任何自定义主题。
Themes themes = new Themes();
themes.add("Custom Theme");
int count = themes.getCount();
ITheme theme = Themes.GetOfficeTheme();
workbook.setTheme(theme);
ITheme theme = Themes.GetBadge();
workbook.setTheme(theme);
ITheme theme = Themes.GetBanded();
workbook.setTheme(theme);
ITheme theme = Themes.GetBasis();
workbook.setTheme(theme);
ITheme theme = Themes.GetBerlin();
workbook.setTheme(theme);
ITheme theme = Themes.GetCelestial();
workbook.setTheme(theme);
ITheme theme = Themes.GetCircuit();
workbook.setTheme(theme);
ITheme theme = Themes.GetCrop();
workbook.setTheme(theme);
ITheme theme = Themes.GetDamask();
workbook.setTheme(theme);
ITheme theme = Themes.GetDepth();
workbook.setTheme(theme);
ITheme theme = Themes.GetDividend();
workbook.setTheme(theme);
ITheme theme = Themes.GetDroplet();
workbook.setTheme(theme);
ITheme theme = Themes.GetFacet();
workbook.setTheme(theme);
ITheme theme = Themes.GetFeathered();
workbook.setTheme(theme);
ITheme theme = Themes.GetFrame();
workbook.setTheme(theme);
ITheme theme = Themes.GetGallery();
workbook.setTheme(theme);
ITheme theme = Themes.GetHeadlines();
workbook.setTheme(theme);
ITheme theme = Themes.GetIntegral();
workbook.setTheme(theme);
ITheme theme = Themes.GetIonBoardroom();
workbook.setTheme(theme);
ITheme theme = Themes.GetIon();
workbook.setTheme(theme);
ITheme theme = Themes.GetMainEvent();
workbook.setTheme(theme);
ITheme theme = Themes.GetMesh();
workbook.setTheme(theme);
ITheme theme = Themes.GetMetropolitan();
workbook.setTheme(theme);
ITheme theme = Themes.GetOrganic();
workbook.setTheme(theme);
ITheme theme = Themes.GetParcel();
workbook.setTheme(theme);
ITheme theme = Themes.GetParallax();
workbook.setTheme(theme);
ITheme theme = Themes.GetQuotable();
workbook.setTheme(theme);
ITheme theme = Themes.GetRetrospect();
workbook.setTheme(theme);
ITheme theme = Themes.GetSavon();
workbook.setTheme(theme);
ITheme theme = Themes.GetSlate();
workbook.setTheme(theme);
ITheme theme = Themes.GetSlice();
workbook.setTheme(theme);
ITheme theme = Themes.GetVaporTrail();
workbook.setTheme(theme);
ITheme theme = Themes.GetView();
workbook.setTheme(theme);
ITheme theme = Themes.GetWisp();
workbook.setTheme(theme);
ITheme theme = Themes.GetWoodType();
workbook.setTheme(theme);
ITheme theme = Themes.GetOffice2007();
workbook.setTheme(theme);
ITheme theme = Themes.GetApex();
workbook.setTheme(theme);
ITheme theme = Themes.GetAspect();
workbook.setTheme(theme);
ITheme theme = Themes.GetCivic();
workbook.setTheme(theme);
ITheme theme = Themes.GetConcourse();
workbook.setTheme(theme);
ITheme theme = Themes.GetEquity();
workbook.setTheme(theme);
ITheme theme = Themes.GetFlow();
workbook.setTheme(theme);
ITheme theme = Themes.GetFoundry();
workbook.setTheme(theme);
ITheme theme = Themes.GetMedian();
workbook.setTheme(theme);
ITheme theme = Themes.GetMetro();
workbook.setTheme(theme);
ITheme theme = Themes.GetModule();
workbook.setTheme(theme);
ITheme theme = Themes.GetOpulent();
workbook.setTheme(theme);
ITheme theme = Themes.GetOriel();
workbook.setTheme(theme);
ITheme theme = Themes.GetOrigin();
workbook.setTheme(theme);
ITheme theme = Themes.GetPaper();
workbook.setTheme(theme);
ITheme theme = Themes.GetSolstice();
workbook.setTheme(theme);
ITheme theme = Themes.GetTechnic();
workbook.setTheme(theme);
ITheme theme = Themes.GetTrek();
workbook.setTheme(theme);
ITheme theme = Themes.GetUrban();
workbook.setTheme(theme);
ITheme theme = Themes.GetVerve();
workbook.setTheme(theme);