+/**\r
+ * A more elaborate views container than ViewPane, as it can handle multiple contents\r
+ * at once via a TabView.\r
+ * See {@link org.argeo.ria.components.ViewPane}.\r
+ */\r
qx.Class.define("org.argeo.ria.components.TabbedViewPane",\r
{\r
extend : qx.ui.container.Composite,\r
/**\r
* @param viewId {String} Unique id of this viewPane\r
* @param viewTitle {String} Readable Title of this viewPane\r
- * @param splitPaneData {Map} Additionnal data to be used by splitpanes implementations.\r
*/\r
construct : function(viewId, viewTitle){\r
this.base(arguments);\r
},\r
\r
members : {\r
+ /**\r
+ * Checks if the pane already contains a given view, identified by its instance id\r
+ * @param contentId {Mixed} The instance id to check\r
+ * @return {Boolean}\r
+ */\r
contentExists : function(contentId){\r
if(this.pageIds[contentId]){\r
this.tabView.setSelected(this.pageIds[contentId]);\r
return this.pageIds[contentId].getUserData("argeoria.iview");\r
} \r
},\r
+ /**\r
+ * Sets a new instance in the tabbed pane.\r
+ * @param content {org.argeo.ria.components.IView} The applet to add.\r
+ */\r
setContent : function(content){\r
if(!this.tabView.getChildren().length){\r
this.tabView.setBackgroundColor("transparent");\r
}, this);\r
this.tabView.setSelected(page);\r
},\r
+ /**\r
+ * Get the currently selected tab content, if any.\r
+ * @return {org.argeo.ria.components.IView} The currently selected view.\r
+ */\r
getContent : function(){\r
if(this._getCrtPage()){\r
return this._getCrtPage().getUserData("argeoria.iview");\r
}\r
return null;\r
},\r
+ /**\r
+ * Get the currently selected tab ViewSelection object.\r
+ * @return {org.argeo.ria.components.ViewSelection} The view selection object of the currently selected view.\r
+ */\r
getViewSelection : function(){\r
if(!this.getContent()) return null;\r
return this.getContent().getViewSelection();\r
},\r
+ /**\r
+ * Return the currently selected tab Page.\r
+ * @return {qx.ui.tabview.Page} The page\r
+ */\r
_getCrtPage : function(){\r
return this.tabView.getSelected();\r
},\r
+ /**\r
+ * Closes the currently selected view and remove all tabs components (button, page).\r
+ */\r
closeCurrent : function(){\r
var crtPage = this._getCrtPage();\r
if(!crtPage) return;\r
this.tabView.setMarginTop(27);\r
} \r
},\r
+ /**\r
+ * Call closeCurrent() recursively until there is no more page.\r
+ */\r
empty : function(){\r
var crtPage = this._getCrtPage();\r
while(crtPage){\r
crtPage = this._getCrtPage();\r
}\r
},\r
+ /**\r
+ * Sets the tabView on "load" state. Nothing is done at the moment.\r
+ * @param load {Boolean} Load status\r
+ */\r
setOnLoad : function(load){\r
\r
},\r
+ /**\r
+ * Sets a graphical indicator that this pane has the focus. A blue border.\r
+ */\r
focus : function(){\r
if(this.hasFocus) return;\r
this.fireEvent("changeSelection");\r
this.setDecorator(this.focusedDecorator);\r
this.hasFocus = true;\r
}, \r
+ /**\r
+ * Remove a graphical focus indicator on this pane.\r
+ */\r
blur : function(){\r
this.hasFocus = false;\r
this.setDecorator(this.blurredDecorator);\r