1 16 17 package org.springframework.ui.context.support; 18 19 import org.springframework.ui.context.HierarchicalThemeSource; 20 import org.springframework.ui.context.Theme; 21 import org.springframework.ui.context.ThemeSource; 22 23 34 public class DelegatingThemeSource implements HierarchicalThemeSource { 35 36 private ThemeSource parentThemeSource; 37 38 39 public void setParentThemeSource(ThemeSource parentThemeSource) { 40 this.parentThemeSource = parentThemeSource; 41 } 42 43 public ThemeSource getParentThemeSource() { 44 return parentThemeSource; 45 } 46 47 48 public Theme getTheme(String themeName) { 49 if (this.parentThemeSource != null) { 50 return this.parentThemeSource.getTheme(themeName); 51 } 52 else { 53 return null; 54 } 55 } 56 57 } 58 | Popular Tags |