类 DelegatingThemeSource
- java.lang.Object
- org.springframework.ui.context.support.DelegatingThemeSource
- 所有已实现的接口:
HierarchicalThemeSource
,ThemeSource
public class DelegatingThemeSource extends Object implements HierarchicalThemeSource
Empty ThemeSource that delegates all calls to the parent ThemeSource. If no parent is available, it simply won't resolve any theme.Used as placeholder by UiApplicationContextUtils, if a context doesn't define its own ThemeSource. Not intended for direct use in applications.
- 从以下版本开始:
- 1.2.4
- 作者:
- Juergen Hoeller
- 另请参阅:
UiApplicationContextUtils
构造器概要
构造器 构造器 说明 DelegatingThemeSource()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 ThemeSource
getParentThemeSource()
Return the parent of this ThemeSource, ornull
if none.Theme
getTheme(String themeName)
Return the Theme instance for the given theme name.void
setParentThemeSource(ThemeSource parentThemeSource)
Set the parent that will be used to try to resolve theme messages that this object can't resolve.
构造器详细资料
DelegatingThemeSource
public DelegatingThemeSource()
方法详细资料
setParentThemeSource
public void setParentThemeSource(ThemeSource parentThemeSource)
从接口复制的说明:HierarchicalThemeSource
Set the parent that will be used to try to resolve theme messages that this object can't resolve.- 指定者:
setParentThemeSource
在接口中HierarchicalThemeSource
- 参数:
parentThemeSource
- the parent ThemeSource that will be used to resolve messages that this object can't resolve. May benull
, in which case no further resolution is possible.
getParentThemeSource
public ThemeSource getParentThemeSource()
从接口复制的说明:HierarchicalThemeSource
Return the parent of this ThemeSource, ornull
if none.
getTheme
public Theme getTheme(String themeName)
从接口复制的说明:ThemeSource
Return the Theme instance for the given theme name.The returned Theme will resolve theme-specific messages, codes, file paths, etc (e.g. CSS and image files in a web environment).
- 指定者:
getTheme
在接口中ThemeSource
- 参数:
themeName
- the name of the theme- 返回:
- the corresponding Theme, or
null
if none defined. Note that, by convention, a ThemeSource should at least be able to return a default Theme for the default theme name "theme" but may also return default Themes for other theme names. - 另请参阅:
AbstractThemeResolver.ORIGINAL_DEFAULT_THEME_NAME