Get CmsView directly from Control.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / CmsView.java
index 9f5e4f7973f9e35f29b37dca5199ca9b88814e2d..311d10fbe9d22f2c1db2db8e9f55d14a9db7a850 100644 (file)
@@ -5,7 +5,7 @@ import java.util.Map;
 
 import javax.security.auth.login.LoginContext;
 
-import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
 import org.eclipse.swt.widgets.Shell;
 
 /** Provides interaction with the CMS system. */
@@ -51,8 +51,12 @@ public interface CmsView {
                properties.put(param, value);
                sendEvent(topic, properties);
        }
+       
+       default void applyStyles(Object widget) {
+               
+       }
 
-       static CmsView getCmsView(Composite parent) {
+       static CmsView getCmsView(Control parent) {
                // find parent shell
                Shell topShell = parent.getShell();
                while (topShell.getParent() != null)