incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r439001 - in /incubator/xap/trunk/WebContent/examples/widgets: AttributeTester.js borderPanel.html borderPanel.xal horizontalPanel.xal index.html verticalPanel.xal verticalPanelExample.html verticalPanelExample.xal
Date Thu, 31 Aug 2006 18:23:59 GMT
Author: jmargaris
Date: Thu Aug 31 11:23:58 2006
New Revision: 439001

URL: http://svn.apache.org/viewvc?rev=439001&view=rev
Log:
updated examples

Added:
    incubator/xap/trunk/WebContent/examples/widgets/borderPanel.html   (with props)
    incubator/xap/trunk/WebContent/examples/widgets/borderPanel.xal   (with props)
    incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.html   (with props)
    incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.xal   (with props)
Modified:
    incubator/xap/trunk/WebContent/examples/widgets/AttributeTester.js
    incubator/xap/trunk/WebContent/examples/widgets/horizontalPanel.xal
    incubator/xap/trunk/WebContent/examples/widgets/index.html
    incubator/xap/trunk/WebContent/examples/widgets/verticalPanel.xal

Modified: incubator/xap/trunk/WebContent/examples/widgets/AttributeTester.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/AttributeTester.js?rev=439001&r1=439000&r2=439001&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/AttributeTester.js (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/AttributeTester.js Thu Aug 31 11:23:58
2006
@@ -9,3 +9,21 @@
 AttributeTester.prototype.reportEvent = function(event){
 	alert(event);
 }
+
+//IMPORTANT this works if you remove the same thing twice,
+//no error. BEcause we still found element in hashtable?
+AttributeTester.prototype.insertBefore = function( element ){
+alert("insert before");
+	var newElement = element.getOwnerDocument().createElement("freePanel",null,"http://www.dojotoolkit.org/");
+	newElement.setAttribute("backgroundColor","yellow");
+	newElement.setAttribute("width","30px");
+	newElement.setAttribute("height","30px");
+	element.parentNode.insertBefore(newElement,element);
+	alert("New dom node = " + element.parentNode.toXml());
+}
+
+AttributeTester.prototype.remove = function( element ){
+	alert("remove " + element);
+	element.parentNode.removeChild(element);
+	alert("New dom node = " + element.parentNode.toXml());
+}

Added: incubator/xap/trunk/WebContent/examples/widgets/borderPanel.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/borderPanel.html?rev=439001&view=auto
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/borderPanel.html (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/borderPanel.html Thu Aug 31 11:23:58 2006
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Button</title>
+
+	<style type="text/css">
+      <!--
+          @import url(../../css/xapDefault.css);
+      -->
+    </style>
+    
+	<!-- Keep dojo from trying to scan this whole page for dojoType'd tags: -->
+	<script type="text/javascript">
+		djConfig = {
+			parseWidgets: false
+		};
+	</script>    
+	
+	<script language="JavaScript" type="text/javascript" src="../../xapcore.js"></script>
+   <script language="JavaScript" type="text/javascript" src="AttributeTester.js"></script>
+    
+ </head>
+  
+ <body  onload="Xap.createAllPredefinedSessions();">
+	<div xapId="ButtonExample" xapSrc="borderPanel.xal" xapToolkit="dojo" xapContext="../../"></div>
+</body>
+</html>

Propchange: incubator/xap/trunk/WebContent/examples/widgets/borderPanel.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/xap/trunk/WebContent/examples/widgets/borderPanel.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/borderPanel.xal?rev=439001&view=auto
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/borderPanel.xal (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/borderPanel.xal Thu Aug 31 11:23:58 2006
@@ -0,0 +1,76 @@
+<xal xmlns="http://www.openxal.org/xal" xmlns:dojo="http://www.dojotoolkit.org/"> 
+
+
+	<mco:mco 
+		xmlns:mco="http://www.openxal.org/mco" 
+		id="attributeSetter" 
+		src="AttributeTester"
+	/>
+
+
+
+	<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+	<xm:append select="/xal">
+	
+		<dojo:borderPanel width="200px" height="200px" backgroundColor="black"
+		id="testComponent" orientation="horizontal">
+			<dojo:button text="north" borderPosition="north"/>
+			<dojo:button text="south" borderPosition="south"/>
+			<dojo:button text="east" borderPosition="east"/>
+			<dojo:button text="west" borderPosition="west"/>
+			<dojo:button text="center" borderPosition="center"/>
+		</dojo:borderPanel>
+		
+
+		<!--standard test things -->
+		
+		
+
+		<dojo:button width="200px" height="25px" 
+			text="borderWidth -> '25'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'borderWidth' ,'25')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="borderStyle -> 'solid'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'borderStyle' ,'solid')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="borderColor -> 'red'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'borderColor' ,'red')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="width -> '300px'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'width' ,'300px')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="height -> '300px'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'height' ,'300px')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="fontWeight -> 'bold'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'fontWeight' ,'bold')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="backgroundColor -> 'green'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'backgroundColor' ,'green')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="color -> 'red'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'color' ,'red')"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="fontSize-> '24'"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'fontSize' ,'24')"/>
+
+	</xm:append> 	  		
+  	</xm:modifications>
+</xal>

Propchange: incubator/xap/trunk/WebContent/examples/widgets/borderPanel.xal
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/xap/trunk/WebContent/examples/widgets/horizontalPanel.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/horizontalPanel.xal?rev=439001&r1=439000&r2=439001&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/horizontalPanel.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/horizontalPanel.xal Thu Aug 31 11:23:58
2006
@@ -14,12 +14,62 @@
 	
 		<dojo:horizontalPanel width="200px" height="200px" backgroundColor="black"
 		id="testComponent">
-			<dojo:button text="Button 1"/>
-			<dojo:button text="Button 2"/>
-			<dojo:button text="Button 3"/>
+			<dojo:freePanel width="20px" height="100px" backgroundColor="red"/>
+			<dojo:freePanel width="20px" height="100px" backgroundColor="green" id="referenceComponent"/>
+			<dojo:freePanel width="20px" height="100px" backgroundColor="blue"/>
 		</dojo:horizontalPanel>
 		
 
+		<!-- container tests -->
+		<dojo:button width="200px" height="25px" 
+			text="pack -> end"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'pack' ,'end')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="pack -> start"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'pack' ,'start')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="pack -> center"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'pack' ,'center')"/>
+
+
+		<dojo:button width="200px" height="25px" 
+			text="align -> center"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'center')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="align -> start"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'start')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="align -> end"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'end')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="align -> stretch"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'stretch')"/>
+
+		<!-- container tests -->
+		<dojo:button width="200px" height="25px" 
+			text="insert before"
+			onCommand="mco:attributeSetter.insertBefore(referenceComponent)"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="remove"
+			onCommand="mco:attributeSetter.remove(referenceComponent)"/>
+
+
+
+
+		
 		<!--standard test things -->
 		
 		

Modified: incubator/xap/trunk/WebContent/examples/widgets/index.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/index.html?rev=439001&r1=439000&r2=439001&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/index.html (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/index.html Thu Aug 31 11:23:58 2006
@@ -8,12 +8,14 @@
 <li><a href="freePanel.html">&lt;freePanel&gt;</a></li>
 <li><a href="verticalPanel.html">&lt;verticalPanel&gt;</a></li>
 <li><a href="horizontalPanel.html">&lt;horizontalPanel&gt;</a></li>
+<li><a href="borderPanel.html">&lt;borderPanel&gt;</a></li>
 </ul>
 
 <br>
 <h2>Examples</h2>
 <ul>
 <li><a href="splitPaneExample.html">&lt;splitPane&gt;</a></li>
+<li><a href="verticalPanelExample.html">&lt;verticalPanel&gt;</a></li>
 </ul>
 
 </body>

Modified: incubator/xap/trunk/WebContent/examples/widgets/verticalPanel.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/verticalPanel.xal?rev=439001&r1=439000&r2=439001&view=diff
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/verticalPanel.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/verticalPanel.xal Thu Aug 31 11:23:58
2006
@@ -13,13 +13,63 @@
 	<xm:append select="/xal">
 	
 		<dojo:verticalPanel width="200px" height="200px" backgroundColor="black"
-		id="testComponent" orientation="horizontal">
-			<dojo:button text="Button 1"/>
-			<dojo:button text="Button 2"/>
-			<dojo:button text="Button 3"/>
+		id="testComponent">
+			<dojo:freePanel width="100px" height="20px" backgroundColor="red"/>
+			<dojo:freePanel width="100px" height="20px" backgroundColor="green" id="referenceComponent"/>
+			<dojo:freePanel width="100px" height="20px" backgroundColor="blue"/>
 		</dojo:verticalPanel>
 		
 
+		<!-- container tests -->
+		<dojo:button width="200px" height="25px" 
+			text="pack -> end"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'pack' ,'end')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="pack -> start"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'pack' ,'start')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="pack -> center"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'pack' ,'center')"/>
+
+
+		<dojo:button width="200px" height="25px" 
+			text="align -> center"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'center')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="align -> start"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'start')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="align -> end"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'end')"/>
+				
+		<dojo:button width="200px" height="25px" 
+			text="align -> stretch"
+			onCommand="mco:attributeSetter.setAttribute(testComponent,
+				'align' ,'stretch')"/>
+
+		<!-- container tests -->
+		<dojo:button width="200px" height="25px" 
+			text="insert before"
+			onCommand="mco:attributeSetter.insertBefore(referenceComponent)"/>
+
+		<dojo:button width="200px" height="25px" 
+			text="remove"
+			onCommand="mco:attributeSetter.remove(referenceComponent)"/>
+
+
+
+
+		
 		<!--standard test things -->
 		
 		

Added: incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.html
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.html?rev=439001&view=auto
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.html (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.html Thu Aug 31 11:23:58
2006
@@ -0,0 +1,27 @@
+<html>
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+    <title>Button</title>
+
+	<style type="text/css">
+      <!--
+          @import url(../../css/xapDefault.css);
+      -->
+    </style>
+    
+	<!-- Keep dojo from trying to scan this whole page for dojoType'd tags: -->
+	<script type="text/javascript">
+		djConfig = {
+			parseWidgets: false
+		};
+	</script>    
+	
+	<script language="JavaScript" type="text/javascript" src="../../xapcore.js"></script>
+   <script language="JavaScript" type="text/javascript" src="AttributeTester.js"></script>
+    
+ </head>
+  
+ <body  onload="Xap.createAllPredefinedSessions();">
+	<div xapId="ButtonExample" xapSrc="verticalPanelExample.xal" xapToolkit="dojo" xapContext="../../"></div>
+</body>
+</html>

Propchange: incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.html
------------------------------------------------------------------------------
    svn:eol-style = native

Added: incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.xal?rev=439001&view=auto
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.xal (added)
+++ incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.xal Thu Aug 31 11:23:58
2006
@@ -0,0 +1,60 @@
+<xal xmlns="http://www.openxal.org/xal" xmlns:dojo="http://www.dojotoolkit.org/"> 
+
+
+	<mco:mco 
+		xmlns:mco="http://www.openxal.org/mco" 
+		id="attributeSetter" 
+		src="AttributeTester"
+	/>
+
+
+
+	<xm:modifications xmlns:xm="http://www.openxal.org/xmodify">
+	<xm:append select="/xal">
+
+	<dojo:freePanel width="800px" height="800px">
+	
+		<dojo:verticalPanel width="200px" height="200px" borderWidth="1" borderStyle="solid"
borderColor="black">
+		
+		<dojo:freePanel width="100" height="20" backgroundColor="red"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="green"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="blue"/>
+		
+		</dojo:verticalPanel >
+
+		
+		<dojo:verticalPanel x="250px" width="200px" height="200px" borderWidth="1" borderStyle="solid"
borderColor="black" pack="end">
+		
+		<dojo:freePanel width="100" height="20" backgroundColor="red"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="green"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="blue"/>
+
+		</dojo:verticalPanel >
+
+			
+
+		<dojo:verticalPanel y="250px" width="200px" height="200px" borderWidth="1" borderStyle="solid"
borderColor="black" align="stretch">
+
+		<dojo:freePanel width="100" height="20" backgroundColor="red"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="green"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="blue"/>
+
+		</dojo:verticalPanel >
+
+
+
+		<dojo:verticalPanel x="250px" y="250px" width="200px" height="200px" borderWidth="1"
borderStyle="solid" borderColor="black" align="end">
+
+		<dojo:freePanel width="100" height="20" backgroundColor="red"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="green"/>
+		<dojo:freePanel width="100" height="20" backgroundColor="blue"/>
+
+		</dojo:verticalPanel >
+
+		
+	</dojo:freePanel>
+		
+
+	</xm:append> 	  		
+  	</xm:modifications>
+</xal>
\ No newline at end of file

Propchange: incubator/xap/trunk/WebContent/examples/widgets/verticalPanelExample.xal
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message