Introduce tabbed area.
[lgpl/argeo-commons.git] / org.argeo.cms.ui / src / org / argeo / cms / ui / CmsView.java
index 0e7e7268042a64650a9979acb5e03dba53dd5553..9f5e4f7973f9e35f29b37dca5199ca9b88814e2d 100644 (file)
@@ -1,5 +1,6 @@
 package org.argeo.cms.ui;
 
+import java.util.HashMap;
 import java.util.Map;
 
 import javax.security.auth.login.LoginContext;
@@ -41,6 +42,16 @@ public interface CmsView {
 
        }
 
+       /**
+        * Convenience methods for when {@link #sendEvent(String, Map)} only requires
+        * one single parameter.
+        */
+       default void sendEvent(String topic, String param, Object value) {
+               Map<String, Object> properties = new HashMap<>();
+               properties.put(param, value);
+               sendEvent(topic, properties);
+       }
+
        static CmsView getCmsView(Composite parent) {
                // find parent shell
                Shell topShell = parent.getShell();