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/16 07:34:11 UTC
svn commit: r431854 -
/incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
Author: mturyn
Date: Wed Aug 16 00:34:09 2006
New Revision: 431854
URL: http://svn.apache.org/viewvc?rev=431854&view=rev
Log:
Still not all the way there with regard to positioning and sizing, but might be getting there.
Modified:
incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
Modified: incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js?rev=431854&r1=431853&r2=431854&view=diff
==============================================================================
--- incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js (original)
+++ incubator/xap/trunk/src/xap/bridges/dojo/DojoFloatingPaneBridge.js Wed Aug 16 00:34:09 2006
@@ -26,10 +26,7 @@
// Superclass:
Xap.require("xap.bridges.dojo.DojoWidgetBridge");
// Peer:
-Xap.provide("dojo.widget.FloatingPane");
-
-
-
+Xap.require("dojo.widget.FloatingPane");
// Auto-added---o.k.?
Xap.require("xap.util.LogFactory");
@@ -46,20 +43,20 @@
*/
-xap.bridges.dojo.DojoFloatingPaneBridge= function() {
+xap.bridges.dojo.DojoFloatingPaneBridge= function() {
xap.bridges.dojo.DojoWidgetBridge.call(this);
}
Xap.setupClassAsSubclassOf( "xap.bridges.dojo.DojoFloatingPaneBridge", "xap.bridges.dojo.DojoWidgetBridge") ;
-xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getPeerString = function(){
+xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getPeerString = function(){
return "FloatingPane" ;
}
/**
* Is this allowed as an initial property?
**/
-xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getAllowedInitialProperties = function(){
+xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getAllowedInitialProperties = function(){
var arry = this.superclass.getAllowedInitialProperties(this) ;
arry.push("title");
arry.push("resizable");
@@ -68,16 +65,6 @@
return arry ;
}
- /**
- *
- * @return an object mapping allowed XAL properties to their Dojo equivalents
- */
- xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getXalToToolkitMapper = function(){
- return this.superclass.getXalToToolkitMapper.call(this) ;
- }
-
-
-
@@ -85,7 +72,7 @@
* The callback for the selection listener on DojoFloatingPane.
* When this is called we fire an "onCommand" event.
*/
-xap.bridges.dojo.DojoFloatingPaneBridge.prototype._onSelectEvent = function( event ) {
+xap.bridges.dojo.DojoFloatingPaneBridge.prototype._onSelectEvent = function( event ) {
this.fireEvent("onCommand");
}
@@ -101,14 +88,13 @@
* Attributes not handled here are are passed to the
* superclass attributeSet method.
*/
-xap.bridges.dojo.DojoFloatingPaneBridge.prototype.attributeSet = function( event ) {
+xap.bridges.dojo.DojoFloatingPaneBridge.prototype.attributeSet = function( event ) {
var name = event.getName();
var value = event.getNewValue();
var peer = this.getPeer();
var shouldResize = false ;
if ( name=="x" ) {
- // peer.setLocation( value, null );
peer.domNode.style.left = value ;
peer.containerNode.style.left = value ;
shouldResize = true ;
@@ -117,13 +103,13 @@
peer.containerNode.style.top = value ;
shouldResize = true ;
} else if (name=="width") {
- peer.containerNode.style.width=value ;
- peer.domNode.style.width=value ;
- shouldResize = true ; ;
+ //peer.domNode.style.width=value ;
+ peer.containerNode.style.width=value ;
+ shouldResize = true ;
} else if ( name=="height"){
- peer.containerNode.style.height=value ;
- peer.domNode.style.height=value ;
- shouldResize = true ; ;
+ //peer.domNode.style.height=value ;
+ peer.containerNode.style.height=value ;
+ shouldResize = true ;
} else if (name=="layoutAlign"){
peer.layoutAlign = value ;
} else if (name=="title"){
@@ -136,19 +122,26 @@
// IE
}
- } else {
-// xap.bridges.dojo.DojoWidgetBridge.prototype.attributeSet.call( this, event );
+ } else if ( name=="backgroundColor" ){
+ peer.containerNode.style.backgroundColor=value;
+ //peer.domNode.style.backgroundColor=value;
+ }else {
+ xap.bridges.dojo.DojoWidgetBridge.prototype.attributeSet.call( this, event );
}
if( shouldResize){
- //peer.onResized() ;
+ peer.onResized() ;
}
}
-xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getRootDomNode = function(){
+xap.bridges.dojo.DojoFloatingPaneBridge.prototype.getRootDomNode = function(){
// This seems to work better---using the .domNode member produces an
// offset between the mouse point and the pane when dragging it:
- return this._peer.containerNode;
+ return this._peer.containerNode ;
}
+
+
+
+