You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xap-commits@incubator.apache.org by mt...@apache.org on 2006/08/17 20:40:05 UTC
svn commit: r432384 -
/incubator/xap/trunk/src/xap/bridges/dojo/DojoColorPaletteBridge.js
Author: mturyn
Date: Thu Aug 17 13:40:04 2006
New Revision: 432384
URL: http://svn.apache.org/viewvc?rev=432384&view=rev
Log:
Improved the jsdoc.
Modified:
incubator/xap/trunk/src/xap/bridges/dojo/DojoColorPaletteBridge.js
Modified: incubator/xap/trunk/src/xap/bridges/dojo/DojoColorPaletteBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/DojoColorPaletteBridge.js?rev=432384&r1=432383&r2=432384&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/DojoColorPaletteBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/DojoColorPaletteBridge.js Thu Aug 17 13:40:04 2006
@@ -20,10 +20,10 @@
Xap.require("dojo.widget.ColorPalette");
/**
- * @fileoverview
- *
- * A wrapper for a Dojo ColorPalette, treated as a black box.
- */
+ * @fileoverview A wrapper for a Dojo ColorPalette, mostly helpers for superclass.
+**/
+
+
/**
* Creates a xap.bridges.dojo.DojoColorPaletteBridge.
*
@@ -49,23 +49,30 @@
xap.bridges.dojo.DojoColorPaletteBridge.prototype._peer = null ;
-
+/**
+ * The string <code>dojo.widget.createWidget</code> will use to create our peer color-palette.
+ * @see xap.bridges.dojo.DojoWidgetBridge#createPeer
+**/
xap.bridges.dojo.DojoColorPaletteBridge.prototype.getPeerString = function(){
return "ColorPalette" ;
}
-xap.bridges.dojo.DojoColorPaletteBridge.prototype.attributeSet = function(){
- //TO_DO anything useful here? format-string?
-};
-
-
+/**
+ * The operation we'd like to attach to our <code>onCommand</code> event
+ * ---the color selection act is the heart of this widget's functionality.
+**/
xap.bridges.dojo.DojoColorPaletteBridge.prototype.getPeerOnCommandEvent = function(){
return "onColorSelect" ;
}
-// The peer is a bit deficient:
+/**
+ * Performs the basic operations (sets the widget as this bridge's peer, register this
+ * bridge as the peer's handler) in the superclass, then add methods that will make the
+ * widget more tractable for us:
+ * @param aWidget{DojoWidget} a dojo color palette widget.
+**/
xap.bridges.dojo.DojoColorPaletteBridge.prototype.setPeer = function(aWidget){
this.superclass.setPeer.call(this,aWidget) ;
aWidget.onColorSelect = function(aColor){