incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mtu...@apache.org
Subject svn commit: r470922 - /incubator/xap/trunk/WebContent/examples/widgets/menu.xal
Date Fri, 03 Nov 2006 17:39:39 GMT
Author: mturyn
Date: Fri Nov  3 09:39:39 2006
New Revision: 470922

URL: http://svn.apache.org/viewvc?view=rev&rev=470922
Log:
(For Y.Wang)
Menu bar, menu bar item, menuItem changes 
https://issues.apache.org/jira/secure/ManageAttachments.jspa?id=12354704

Modified:
    incubator/xap/trunk/WebContent/examples/widgets/menu.xal

Modified: incubator/xap/trunk/WebContent/examples/widgets/menu.xal
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/WebContent/examples/widgets/menu.xal?view=diff&rev=470922&r1=470921&r2=470922
==============================================================================
--- incubator/xap/trunk/WebContent/examples/widgets/menu.xal (original)
+++ incubator/xap/trunk/WebContent/examples/widgets/menu.xal Fri Nov  3 09:39:39 2006
@@ -13,11 +13,11 @@
 	<xm:append select="/xal">
 	<!--- layout issues prevent putting the menu into a horizpanel-->
 	<xal:verticalPanel>
-		<xal:menuBar id="testComponent" height="50px"  onActiveGained="mco:attributeSetter.reportEvent(event)"
onActiveLost="mco:attributeSetter.reportEvent(event)" onBeforeActiveLost="mco:attributeSetter.reportEvent(event)"
onContextMenu="mco:attributeSetter.reportEvent(event)" onDoubleClick="mco:attributeSetter.reportEvent(event)"
onDragDrop="mco:attributeSetter.reportEvent(event)" onDragEnd="mco:attributeSetter.reportEvent(event)"
onDragStart="mco:attributeSetter.reportEvent(event)" onMouseDown="mco:attributeSetter.reportEvent(event)"
onMouseDrag="mco:attributeSetter.reportEvent(event)" onMouseMove="mco:attributeSetter.reportEvent(event)"
onMouseOut="mco:attributeSetter.reportEvent(event)" onMouseOver="mco:attributeSetter.reportEvent(event)"
onMouseUp="mco:attributeSetter.reportEvent(event)">
-			<xal:menuBarItem text="Edit">
+		<xal:menuBar id="testComponent" height="50px" onActiveGained="mco:attributeSetter.reportEvent(event)"
onActiveLost="mco:attributeSetter.reportEvent(event)" onBeforeActiveLost="mco:attributeSetter.reportEvent(event)"
onContextMenu="mco:attributeSetter.reportEvent(event)" onDoubleClick="mco:attributeSetter.reportEvent(event)"
onDragDrop="mco:attributeSetter.reportEvent(event)" onDragEnd="mco:attributeSetter.reportEvent(event)"
onDragStart="mco:attributeSetter.reportEvent(event)" onMouseDown="mco:attributeSetter.reportEvent(event)"
onMouseDrag="mco:attributeSetter.reportEvent(event)" onMouseMove="mco:attributeSetter.reportEvent(event)"
onMouseOut="mco:attributeSetter.reportEvent(event)" onMouseOver="mco:attributeSetter.reportEvent(event)"
onMouseUp="mco:attributeSetter.reportEvent(event)">
+			<xal:menuBarItem text="Edit" id="testMenuBarItem">
 				<xal:menu  onActiveGained="mco:attributeSetter.reportEvent(event)" onActiveLost="mco:attributeSetter.reportEvent(event)"
onBeforeActiveLost="mco:attributeSetter.reportEvent(event)" onCommand="mco:attributeSetter.reportEvent(event)"
onContextMenu="mco:attributeSetter.reportEvent(event)" onDoubleClick="mco:attributeSetter.reportEvent(event)"
onDragDrop="mco:attributeSetter.reportEvent(event)" onDragEnd="mco:attributeSetter.reportEvent(event)"
onDragStart="mco:attributeSetter.reportEvent(event)" onKeyChar="mco:attributeSetter.reportEvent(event)"
onKeyDown="mco:attributeSetter.reportEvent(event)" onKeyUp="mco:attributeSetter.reportEvent(event)"
onMouseDown="mco:attributeSetter.reportEvent(event)" onMouseDrag="mco:attributeSetter.reportEvent(event)"
onMouseMove="mco:attributeSetter.reportEvent(event)" onMouseOut="mco:attributeSetter.reportEvent(event)"
onMouseOver="mco:attributeSetter.reportEvent(event)" onMouseUp="mco:attributeSetter.reportEvent(event)">
 					<xal:menuItem text="Cut" onActiveGained="mco:attributeSetter.reportEvent(event)"
onActiveLost="mco:attributeSetter.reportEvent(event)" onBeforeActiveLost="mco:attributeSetter.reportEvent(event)"
onCommand="mco:attributeSetter.reportEvent(event)" onContextMenu="mco:attributeSetter.reportEvent(event)"
onDoubleClick="mco:attributeSetter.reportEvent(event)" onDragDrop="mco:attributeSetter.reportEvent(event)"
onDragEnd="mco:attributeSetter.reportEvent(event)" onDragStart="mco:attributeSetter.reportEvent(event)"
onKeyChar="mco:attributeSetter.reportEvent(event)" onKeyDown="mco:attributeSetter.reportEvent(event)"
onKeyUp="mco:attributeSetter.reportEvent(event)" onMouseDown="mco:attributeSetter.reportEvent(event)"
onMouseDrag="mco:attributeSetter.reportEvent(event)" onMouseMove="mco:attributeSetter.reportEvent(event)"
onMouseOut="mco:attributeSetter.reportEvent(event)" onMouseOver="mco:attributeSetter.reportEvent(event)"
onMouseUp="mco:attributeSetter.reportEvent(event)"/>
-					<xal:menuItem text="Copy"/>
+					<xal:menuItem text="Copy" />
 					<xal:horizontalSeparator />
 					<xal:menuItem text="Paste"/>
 				</xal:menu>
@@ -25,8 +25,8 @@
 			
 			<xal:menuBarItem text="File">
 				<xal:menu>
-					<xal:menuItem text="Open"/>
-					<xal:menuItem text="Close"/>
+					<xal:menuItem text="Open"  enabled="false" onCommand="mco:attributeSetter.reportEvent(event)"/>
+					<xal:menuItem text="Close" onCommand="mco:attributeSetter.reportEvent(event)"/>
 					<xal:menuItem text="Preferences.">
 						<xal:menu>
 							<xal:menuItem text="A preference"/>
@@ -36,7 +36,7 @@
 				</xal:menu>
 			</xal:menuBarItem>
 			
-			<xal:menuBarItem text="Format">
+			<xal:menuBarItem text="Format" enabled="false">
 				<xal:menu>
 					<xal:menuItem text="Cut"/>
 					<xal:menuItem text="Copy"/>
@@ -46,13 +46,202 @@
 			
 			<xal:menuBarItem text="Run">
 				<xal:menu>
-					<xal:menuItem text="Open"/>
+					<xal:menuItem text="Open" id="testMenuItem"/>
 					<xal:menuItem text="Close"/>
 					<xal:menuItem text="Preferences..."/>
 				</xal:menu>
 			</xal:menuBarItem>
 			
-		</xal:menuBar>
+		</xal:menuBar>	
+	
+		<horizontalFlowPane width="825px" xmlns="http://www.openxal.org/xal">
+			<label width="825px" height="25px" 
+					text="Menu Bar test"
+					fontWeight="bold"
+			/>	
+			<button width="200px" height="25px" 
+				text="print element"
+				onCommand="mco:attributeSetter.printElement(testComponent)"/>			
+			<button width="200px" height="25px" 
+				text="color -> 'red'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'color' ,'red')"/>
+			<button width="200px" height="25px" 
+				text="background color -> 'blue'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'backgroundColor' ,'blue')"/>
+			<button width="200px" height="25px" 
+				text="border color -> 'yellow'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'borderColor' ,'yellow')"/>		
+			<button width="200px" height="25px" 
+				text="border style -> 'dotted'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'borderStyle' ,'dotted')"/>	
+			<button width="200px" height="25px" 
+				text="border width -> '5px'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'borderWidth' ,'5px')"/>	
+			<button width="200px" height="25px" 
+				text="border width -> '1px'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'borderWidth' ,'1px')"/>	
+			<button width="200px" height="25px" 
+				text="font weight -> 'bold'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'fontWeight' ,'bold')"/>
+			<button width="200px" height="25px" 
+				text="font size -> '24px'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'fontSize' ,'24px')"/>	
+			<button width="200px" height="25px" 
+				text="font family -> 'serif'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'fontFamily' ,'serif')"/>	
+			<button width="200px" height="25px" 
+				text="font style -> 'italic'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'fontStyle' ,'italic')"/>		
+			<button width="200px" height="25px" 
+				text="enabled -> 'true'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'enabled' ,'true')"/>		
+			<button width="200px" height="25px" 
+				text="enabled -> 'false'"
+				onCommand="mco:attributeSetter.setAttribute(testComponent,
+					'enabled' ,'false')"/>	 																																														
+		</horizontalFlowPane>		
+		<horizontalFlowPane width="825px" xmlns="http://www.openxal.org/xal">
+			<label width="825px" height="25px" 
+					text="MenuBarItem Edit"
+					fontWeight="bold"
+			/>	
+			<button width="200px" height="25px" 
+				text="print element"
+				onCommand="mco:attributeSetter.printElement(testMenuBarItem)"/>		
+			<button width="200px" height="25px" 
+				text="color -> 'red'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'color' ,'red')"/>
+			<button width="200px" height="25px" 
+				text="background color -> 'blue'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'backgroundColor' ,'blue')"/>
+			<button width="200px" height="25px" 
+				text="border color -> 'yellow'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'borderColor' ,'yellow')"/>		
+			<button width="200px" height="25px" 
+				text="border style -> 'dotted'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'borderStyle' ,'dotted')"/>	
+			<button width="200px" height="25px" 
+				text="border width -> '5px'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'borderWidth' ,'5px')"/>	
+			<button width="200px" height="25px" 
+				text="border width -> '1px'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'borderWidth' ,'1px')"/>	
+			<button width="200px" height="25px" 
+				text="font weight -> 'bold'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'fontWeight' ,'bold')"/>
+			<button width="200px" height="25px" 
+				text="font size -> '24px'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'fontSize' ,'24px')"/>	
+			<button width="200px" height="25px" 
+				text="font family -> 'serif'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'fontFamily' ,'serif')"/>	
+			<button width="200px" height="25px" 
+				text="font style -> 'italic'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'fontStyle' ,'italic')"/>
+			<button width="200px" height="25px" 
+				text="visible -> 'false'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'visible' ,'false')"/>	
+			<button width="200px" height="25px" 
+				text="visible -> 'true'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'visible' ,'true')"/>	
+			<button width="200px" height="25px" 
+				text="enabled -> 'false'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'enabled' ,'false')"/>	
+			<button width="200px" height="25px" 
+				text="enabled -> 'true'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuBarItem,
+					'enabled' ,'true')"/>																																																								
+		</horizontalFlowPane>	 
+	 
+		<horizontalFlowPane width="825px" xmlns="http://www.openxal.org/xal">
+			<label width="825px" height="25px" 
+					text="MenuItem Run > Open"
+					fontWeight="bold"
+			/>	
+			<button width="200px" height="25px" 
+				text="print element"
+				onCommand="mco:attributeSetter.printElement(testMenuItem)"/>			
+			<button width="200px" height="25px" 
+				text="color -> 'red'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'color' ,'red')"/>
+			<button width="200px" height="25px" 
+				text="background color -> 'blue'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'backgroundColor' ,'blue')"/>
+			<button width="200px" height="25px" 
+				text="border color -> 'yellow'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'borderColor' ,'yellow')"/>		
+			<button width="200px" height="25px" 
+				text="border style -> 'dotted'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'borderStyle' ,'dotted')"/>	
+			<button width="200px" height="25px" 
+				text="border width -> '5px'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'borderWidth' ,'5px')"/>	
+			<button width="200px" height="25px" 
+				text="border width -> '1px'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'borderWidth' ,'1px')"/>	
+			<button width="200px" height="25px" 
+				text="font weight -> 'bold'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'fontWeight' ,'bold')"/>
+			<button width="200px" height="25px" 
+				text="font size -> '24px'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'fontSize' ,'24px')"/>	
+			<button width="200px" height="25px" 
+				text="font family -> 'serif'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'fontFamily' ,'serif')"/>	
+			<button width="200px" height="25px" 
+				text="font style -> 'italic'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'fontStyle' ,'italic')"/>					
+			<button width="200px" height="25px" 
+				text="visible -> 'false'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'visible' ,'false')"/>	
+			<button width="200px" height="25px" 
+				text="visible -> 'true'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'visible' ,'true')"/>	
+			<button width="200px" height="25px" 
+				text="enabled -> 'false'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'enabled' ,'false')"/>	
+			<button width="200px" height="25px" 
+				text="enabled -> 'true'"
+				onCommand="mco:attributeSetter.setAttribute(testMenuItem,
+					'enabled' ,'true')"/>																																			
+		</horizontalFlowPane>						
 		<!--standard test things -->
 		<include href="standardButtons.xal" xmlns="http://www.openxal.org/xinclude"/>
 	</xal:verticalPanel>



Mime
View raw message