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 jm...@apache.org on 2007/04/13 20:18:00 UTC
svn commit: r528643 - in /incubator/xap/trunk/codebase:
css/gripper_splitter_horizontal2.gif css/gripper_splitter_vertical2.gif
css/xapDefault.css src/xap/bridges/dojo/VerticalSplitPaneBridge.js
Author: jmargaris
Date: Fri Apr 13 13:17:59 2007
New Revision: 528643
URL: http://svn.apache.org/viewvc?view=rev&rev=528643
Log:
some visual changes for splitter
Added:
incubator/xap/trunk/codebase/css/gripper_splitter_horizontal2.gif (with props)
incubator/xap/trunk/codebase/css/gripper_splitter_vertical2.gif (with props)
Modified:
incubator/xap/trunk/codebase/css/xapDefault.css
incubator/xap/trunk/codebase/src/xap/bridges/dojo/VerticalSplitPaneBridge.js
Added: incubator/xap/trunk/codebase/css/gripper_splitter_horizontal2.gif
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/css/gripper_splitter_horizontal2.gif?view=auto&rev=528643
==============================================================================
Binary file - no diff available.
Propchange: incubator/xap/trunk/codebase/css/gripper_splitter_horizontal2.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: incubator/xap/trunk/codebase/css/gripper_splitter_vertical2.gif
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/css/gripper_splitter_vertical2.gif?view=auto&rev=528643
==============================================================================
Binary file - no diff available.
Propchange: incubator/xap/trunk/codebase/css/gripper_splitter_vertical2.gif
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Modified: incubator/xap/trunk/codebase/css/xapDefault.css
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/css/xapDefault.css?view=diff&rev=528643&r1=528642&r2=528643
==============================================================================
--- incubator/xap/trunk/codebase/css/xapDefault.css (original)
+++ incubator/xap/trunk/codebase/css/xapDefault.css Fri Apr 13 13:17:59 2007
@@ -341,3 +341,19 @@
background-color: gray;
cursor: default;
}
+
+
+/* Split-pane styling: */
+.xapVerticalSplitPaneSizer{
+ background-image: url(gripper_splitter_vertical2.gif) ;
+ background-repeat: no-repeat ;
+ background-position: center center ;
+}
+
+.xapHorizontalSplitPaneSizer{
+ background-image: url(gripper_splitter_horizontal2.gif) ;
+ background-repeat: no-repeat ;
+ background-position: center center ;
+}
+
+
Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/VerticalSplitPaneBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/VerticalSplitPaneBridge.js?view=diff&rev=528643&r1=528642&r2=528643
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/VerticalSplitPaneBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/VerticalSplitPaneBridge.js Fri Apr 13 13:17:59 2007
@@ -58,10 +58,36 @@
xap.bridges.dojo.VerticalSplitPaneBridge.prototype.mapAllowedInitialPropertiesFromXalToDojo = function(propertyMap,attrHolder){
//fill in some good defaults
propertyMap.orientation = "vertical";
- propertyMap.sizerWidth = 8;
+ propertyMap.sizerWidth = 7;
xap.bridges.dojo.DojoWidgetBridge.prototype.mapAllowedInitialPropertiesFromXalToDojo.call(this, propertyMap, attrHolder);
}
+
+/**
+ * The map that [add|remove]Class will use to
+ * find html dom nodes to style:
+**/
+xap.bridges.dojo.VerticalSplitPaneBridge.prototype.getStylingNodesMap = function(){
+ if( ! this._stylingNodeMap ){
+ var peer = this.getPeer() ;
+ var sizerNode = peer.sizers && (peer.sizers.length>0) &&peer.sizers[0] ;
+ if(sizerNode){
+ // We'd rather memoise the map of all the nodes we're going
+ // to want to style, but if they're not all there yet, do what we can.
+ // Note esp. that the splitter won't show up until after
+ // the peer has finished adding both its children.
+ this._stylingNodeMap = {"": this.getRootDomNode(),
+ "Sizer": sizerNode
+ } ;
+ } else {
+ return {"":this.getRootDomNode() } ;
+ }
+ }
+ return this._stylingNodeMap ;
+}
+
+
+
/**
*
*
@@ -115,6 +141,10 @@
xap.bridges.dojo.VerticalSplitPaneBridge.superclass.init.call(this,e) ;
this._initted = true ;
this.getPeer().persist = false ;
+ // Do this here because the splitter might not have
+ // been around earlier when the superclass method
+ // usually doing this was called:
+ this.setClassAttribute( this.getCssStyleName() ) ;
this.adjustSplitter() ;
}