X-Git-Url: https://git.argeo.org/?a=blobdiff_plain;f=org.argeo.cms.ui%2Fsrc%2Forg%2Fargeo%2Fcms%2Fui%2FCmsApp.java;h=bd7b00334e223f0de673089598c1e98a63d3a737;hb=c5d120d226b31b3d930fc3006c56ac9e4d29ed2a;hp=b8d382562352b84e3b53c58e8fe5753df1d241cd;hpb=28eae1d74809cb8752ab72219063e822e264c77d;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.cms.ui/src/org/argeo/cms/ui/CmsApp.java b/org.argeo.cms.ui/src/org/argeo/cms/ui/CmsApp.java index b8d382562..bd7b00334 100644 --- a/org.argeo.cms.ui/src/org/argeo/cms/ui/CmsApp.java +++ b/org.argeo.cms.ui/src/org/argeo/cms/ui/CmsApp.java @@ -6,7 +6,28 @@ import org.eclipse.swt.widgets.Composite; /** An extensible user interface base on the CMS backend. */ public interface CmsApp { + /** + * If {@link Composite#setData(String, Object)} is set with this property, it + * indicates a different UI (typically with another theming. The {@link CmsApp} + * can use this information, but it doesn't have to be set, in which case a + * default UI must be provided. The provided value must belong to the values + * returned by {@link CmsApp#getUiNames()}. + */ + final static String UI_NAME_PROPERTY = CmsApp.class.getName() + ".ui.name"; + Set getUiNames(); - void initUi(String uiName, Composite parent); + Composite initUi(Composite parent); + + void refreshUi(Composite parent, String state); + + void setState(Composite parent, String state); + + CmsTheme getTheme(String uiName); + + boolean allThemesAvailable(); + + void addCmsAppListener(CmsAppListener listener); + + void removeCmsAppListener(CmsAppListener listener); }