X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.webapp%2Fsrc%2Fmain%2Fwebapp%2Fargeo-ria-src%2Fclass%2Forg%2Fargeo%2Fria%2Fcomponents%2FViewPane.js;h=0ca43f32d1d4b983820651ee46e20aff2a2a4b80;hb=90d214e9301acfd75d29c9408aefc04d0fb8c12c;hp=0a952c6fb1a47c21cd3c5246dc69c75d5288b42a;hpb=e9c1e452b4d853441c813f999ccbbad320939b6b;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/ViewPane.js b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/ViewPane.js index 0a952c6fb..0ca43f32d 100644 --- a/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/ViewPane.js +++ b/org.argeo.slc.webapp/src/main/webapp/argeo-ria-src/class/org/argeo/ria/components/ViewPane.js @@ -30,7 +30,13 @@ qx.Class.define("org.argeo.ria.components.ViewPane", }, events : { + /** + * Trigger when the focus is changing + */ "changeFocus" : "qx.event.type.Data", + /** + * Triggered when selection of content has changed. + */ "changeSelection" : "qx.event.type.Event" }, @@ -130,13 +136,21 @@ qx.Class.define("org.argeo.ria.components.ViewPane", */ }, + /** + * Get the content ViewSelection object. + * @return {org.argeo.ria.components.ViewSelection} The view selection + */ getViewSelection : function(){ if(this.getContent()){ return this.getContent().getViewSelection(); } return null; }, - + /** + * Checks if the pane already contains a given view, identified by its instance id + * @param iViewId {Mixed} The instance id to check + * @return {Boolean} + */ contentExists : function(iViewId){ if(this.getContent()){ this.empty(); @@ -189,6 +203,9 @@ qx.Class.define("org.argeo.ria.components.ViewPane", } }, + /** + * Call empty() method, since this pane can only handle one view. + */ closeCurrent : function(){ this.empty(); }, @@ -212,13 +229,18 @@ qx.Class.define("org.argeo.ria.components.ViewPane", this.setViewTitle(this._defaultViewTitle); this.setContent(null); }, - + /** + * Sets a graphical indicator that this pane has the focus. A blue border. + */ focus : function(){ if(this.hasFocus) return; this.setDecorator(new qx.ui.decoration.Single(1,"solid","#065fb2")); this.fireEvent("changeSelection"); this.hasFocus = true; }, + /** + * Remove a graphical focus indicator on this pane. + */ blur : function(){ this.hasFocus = false; this.setDecorator(new qx.ui.decoration.Single(1,"solid","#000"));