]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.api.cms/src/org/argeo/api/cms/ux/CmsTheme.java
Improve ACR
[lgpl/argeo-commons.git] / org.argeo.api.cms / src / org / argeo / api / cms / ux / CmsTheme.java
1 package org.argeo.api.cms.ux;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.util.Set;
6
7 /** A CMS theme which can be applied to web apps as well as desktop apps. */
8 public interface CmsTheme {
9 /** Unique ID of this theme. */
10 String getThemeId();
11
12 /**
13 * Load a resource as an input stream, base don its relative path, or
14 * <code>null</code> if not found
15 */
16 InputStream getResourceAsStream(String resourceName) throws IOException;
17
18 /** Relative paths to standard web CSS. */
19 Set<String> getWebCssPaths();
20
21 /** Relative paths to RAP specific CSS. */
22 Set<String> getRapCssPaths();
23
24 /** Relative paths to SWT specific CSS. */
25 Set<String> getSwtCssPaths();
26
27 /** Relative paths to images such as icons. */
28 Set<String> getImagesPaths();
29
30 /** Relative paths to fonts. */
31 Set<String> getFontsPaths();
32
33 /** Tags to be added to the header section of the HTML page. */
34 String getHtmlHeaders();
35
36 /** The HTML body to use. */
37 String getBodyHtml();
38
39 /** The default icon size (typically the smallest). */
40 default int getDefaultIconSize() {
41 return getSmallIconSize();
42 }
43
44 int getSmallIconSize();
45
46 int getBigIconSize();
47
48 /** Loads one of the relative path provided by the other methods. */
49 InputStream loadPath(String path) throws IOException;
50
51 }