01: /*
02: * This file is part of PFIXCORE.
03: *
04: * PFIXCORE is free software; you can redistribute it and/or modify
05: * it under the terms of the GNU Lesser General Public License as published by
06: * the Free Software Foundation; either version 2 of the License, or
07: * (at your option) any later version.
08: *
09: * PFIXCORE is distributed in the hope that it will be useful,
10: * but WITHOUT ANY WARRANTY; without even the implied warranty of
11: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12: * GNU Lesser General Public License for more details.
13: *
14: * You should have received a copy of the GNU Lesser General Public License
15: * along with PFIXCORE; if not, write to the Free Software
16: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17: */
18:
19: package de.schlund.pfixcore.editor2.core.dom;
20:
21: import java.util.List;
22:
23: /**
24: * List of Theme objects. This list always keeps it order, thus allowing a "priorization" of themes.
25: *
26: * @author Sebastian Marsching <sebastian.marsching@1und1.de>
27: * @see de.schlund.pfixcore.editor2.core.dom.Theme
28: */
29: public interface ThemeList {
30: /**
31: * Returns ordered list of themes contained by this ThemeList
32: *
33: * @return All themes in this list
34: */
35: List<Theme> getThemes();
36:
37: /**
38: * Checks wheter the specified theme is included in this list
39: *
40: * @param theme Theme object to check
41: * @return true if specified theme is included in list, false otherwise
42: */
43: boolean includesTheme(Theme theme);
44:
45: /**
46: * Compares the preference of two themes within this list.
47: * This method is used to see, whether t1 would be preferred
48: * over t2.
49: *
50: * @param t1 the potentially preferred theme
51: * @param t2 the potentially overridden theme
52: * @return <code>true</code> if t1 is found in this list before
53: * t2. This includes the case when t1 is included in the list
54: * but t2 is not. <code>false</code> is returned if t1 is not
55: * in the list or t2 is found before t1.
56: */
57: boolean themeOverridesTheme(Theme t1, Theme t2);
58: }
|