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/23 18:01:57 UTC

svn commit: r434109 - /incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js

Author: mturyn
Date: Wed Aug 23 11:01:57 2006
New Revision: 434109

URL: http://svn.apache.org/viewvc?rev=434109&view=rev
Log:
Created javadoc for the attribute-setting methods.

Modified:
    incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js

Modified: incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js?rev=434109&r1=434108&r2=434109&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/DojoWidgetBridge.js Wed Aug 23 11:01:57 2006
@@ -298,67 +298,78 @@
 }	
 
 
-/**
- * This method is called whenever an attribute
- * on the XAPElement that maps to this bridge class
- * is changed. xap.bridges.dojo.DojoWidgetBridge handles the following attributes:
- * <ul>
- * <li>x - the x location</li>
- * <li>y - the y location</li>
- * <li>width - the width</li>
- * <li>height - the height</li>
- * <li>cursor - a CSS cursor name</li>
- * <li>enabled - true/false</li>
- * <li>tooltipText - html text for toolip</li>
- * <li>backgroundColor - equivalent of CSS background-color</li>
- * <li>borderWidth - equivalent of CSS border-width</li>
- * <li>borderStyle- equivalent of CSS border-style</li>
- * <li>borderColor - equivalent of CSS border-color</li>
- * <li>color - equivalent of CSS color</li>
- * <li>fontFamily - equivalent of CSS font-family</li>
- * <li>fontSize - equivalent of CSS font-size</li>
- * <li>fontStyle - equivalent of CSS font-style</li>
- * <li>fontWeight- equivalent of CSS font-weight</li>
- * <li>fontVariant- equivalent of CSS font-variant</li>
- * <li>textDecoration- equivalent of CSS text-decoration</li>
- * <li>margin - equivalent of CSS margin</li>
- * <li>padding - equivalent of CSS padding</li>
- * <li>textAlign - equivalent of CSS text-align</li>
- * </ul>
- * ...mostly with changes to the dojo widget peer's <code>style</code> member.
- *<br/>
- * Attributes not handled here are passed to the 
- * superclass attributeSet method.
- * 
- */
-xap.bridges.dojo.DojoWidgetBridge.prototype.getSetterFunctionForAttribute  = function( name ) {
-	return this._getNameToSetterMap()[name] ;	
-}
-
+// Attribute setter  methods:
 
+/**
+ * Attribute setter method for 'x' designed to be triggered by
+ * <code>xap.bridges.basic.AbstractBlackBoxWidgetBridge.setAttribute</code>
+ * after it's been found via that class' implementation of
+ * <code>getSetterFunctionForAttribute</code>.
+ * @param{string} value The new x-value for the new left edge of the component.
+**/
 xap.bridges.dojo.DojoWidgetBridge.prototype.setXAttribute = function(value){
 	// Mediocre behaviour, can improve in subclasses as needed
 	this.getPeer().domNode.style.left = value ;
 }
+
+/**
+ * Attribute setter method for 'y' designed to be triggered by
+ * <code>xap.bridges.basic.AbstractBlackBoxWidgetBridge.setAttribute</code>
+ * after it's been found via that class' implementation of
+ * <code>getSetterFunctionForAttribute</code>.
+ * @param{string} value The new y-value for the new top edge of the component.
+**/
 xap.bridges.dojo.DojoWidgetBridge.prototype.setYAttribute = function(value){
 	// Mediocre behaviour, can improve in subclasses as needed
 	this.getPeer().domNode.style.top = value ;
 }
 
+
+/**
+ * Attribute setter method for component width, designed to be triggered by
+ * <code>xap.bridges.basic.AbstractBlackBoxWidgetBridge.setAttribute</code>
+ * after it's been found via that class' implementation of
+ * <code>getSetterFunctionForAttribute</code>.
+ * @param{string} value The new width value for the component.
+**/
 xap.bridges.dojo.DojoWidgetBridge.prototype.setWidthAttribute = function(value){
 	// Mediocre behaviour, can improve in subclasses as needed
 	this.getPeer().domNode.style.width = value ;
 }
+
+
+/**
+ * Attribute setter method for component height, designed to be triggered by
+ * <code>xap.bridges.basic.AbstractBlackBoxWidgetBridge.setAttribute</code>
+ * after it's been found via that class' implementation of
+ * <code>getSetterFunctionForAttribute</code>.
+ * @param{string} value The new height value for the component.
+**/
 xap.bridges.dojo.DojoWidgetBridge.prototype.setHeightAttribute = function(value){
 	// Mediocre behaviour, can improve in subclasses as needed
 	this.getPeer().domNode.style.height = value ;
 }
 
+/**
+ * Attribute setter method for the component foreground color, designed to be triggered by
+ * <code>xap.bridges.basic.AbstractBlackBoxWidgetBridge.setAttribute</code>
+ * after it's been found via that class' implementation of
+ * <code>getSetterFunctionForAttribute</code>.
+ * @param{string} value The new value for the component's foreground color.
+**/
 xap.bridges.dojo.DojoWidgetBridge.prototype.setColorAttribute = function(value){
 	// Mediocre behaviour, can improve in subclasses as needed
 	this.getPeer().domNode.style.color = value ;
 }
 
+
+/**
+ * Attribute setter method for the component's background's color, designed to be triggered by
+ * <code>xap.bridges.basic.AbstractBlackBoxWidgetBridge.setAttribute</code>
+ * after it's been found via that class' implementation of
+ * <code>getSetterFunctionForAttribute</code>.
+ * @param{string} value The new value for the component background-color.
+**/
 xap.bridges.dojo.DojoWidgetBridge.prototype.setBackgroundColorAttribute = function(value){
 	// Mediocre behaviour, can improve in subclasses as needed
 	this.getPeer().domNode.style.backgroundColor = value ;