-/* ************************************************************************\r
-\r
- Copyright: 2008 Argeo\r
-\r
- License: \r
-\r
- Authors: Charles du Jeu\r
-\r
-************************************************************************ */\r
+/**\r
+ * Generic modal popup window.\r
+ * It is layed out with a dock layout. When adding components to it, they are added as "center".\r
+ * @author Charles du Jeu\r
+ */\r
qx.Class.define("org.argeo.ria.components.Modal",\r
{\r
extend : qx.ui.window.Window,\r
\r
+ /**\r
+ * \r
+ * @param caption {String} Title of the window\r
+ * @param icon {String} Icon of the window\r
+ * @param text {String} Default content of the window.\r
+ */\r
construct : function(caption, icon, text){\r
this.base(arguments);\r
this.set({\r
},\r
\r
members : {\r
+ /**\r
+ * Display text inside the popup\r
+ * @param text {String} A string content for the popup\r
+ */\r
addLabel:function(text){\r
this.add(new qx.ui.basic.Label(text), {edge:'center', width:'100%'}); \r
},\r
+ /**\r
+ * Display a component (panel) in the center of the popup\r
+ * @param panel {qx.ui.core.Widget} A gui component (will be set at width 100%).\r
+ */\r
addContent: function(panel){\r
this.add(panel, {edge:'center', width:'100%'});\r
},\r
+ /**\r
+ * Automatically attach to the application root, then show.\r
+ */\r
attachAndShow:function(){\r
org.argeo.ria.components.ViewsManager.getInstance().getApplicationRoot().add(this); \r
this.show();\r