commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject cvs commit: jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing wizard.jelly swingTags.jelly example.jelly run.jelly about.jelly gridBagDemo.jelly showVariables.jelly
Date Wed, 08 Sep 2004 05:34:01 GMT
dion        2004/09/07 22:34:01

  Modified:    jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos
                        homepageBuilder.jelly template2.jelly
                        template1.jelly
               jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing
                        wizard.jelly swingTags.jelly example.jelly
                        run.jelly about.jelly gridBagDemo.jelly
                        showVariables.jelly
  Log:
  detab
  
  Revision  Changes    Path
  1.5       +78 -78    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/homepageBuilder.jelly
  
  Index: homepageBuilder.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/homepageBuilder.jelly,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- homepageBuilder.jelly	6 Sep 2004 03:39:40 -0000	1.4
  +++ homepageBuilder.jelly	8 Sep 2004 05:34:01 -0000	1.5
  @@ -15,91 +15,91 @@
     limitations under the License.
   -->
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing" >
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing" >
   
  -	<!-- create the generate page action -->
  +    <!-- create the generate page action -->
   
  -	<action var="createPageAction" name="Build and preview your page!">
  -		<j:set var="name" value="${nameField.text}"/>
  -		<j:set var="background" value="${colorField.text}"/>
  -		<j:set var="url" value="${pictureField.text}"/>
  -		<j:set var="hobbies" value="${hobbyModel.toArray()}"/>
  -		<j:set var="template" value="${templateField.getSelectedItem().toString()}"/>
  -		
  -		name = ${name}
  -		background = ${background}
  -		url = ${url}
  -		hobbies = ${hobbies}
  -		template = ${template}
  -		
  -		<j:file name="demopage.html" outputMode="html">
  -			<j:include uri="${template}"/>
  -		</j:file>
  -
  -		<frame var="showPageFrame" size="500,600" location="200,200" title="Your Homepage">
  -			<scrollPane>
  -				<editorPane page="${context.getResource('/demopage.html').toString()}" editable="false"/>
  -			</scrollPane>
  -		</frame>
  -		${showPageFrame.show()}
  -	</action>
  +    <action var="createPageAction" name="Build and preview your page!">
  +        <j:set var="name" value="${nameField.text}"/>
  +        <j:set var="background" value="${colorField.text}"/>
  +        <j:set var="url" value="${pictureField.text}"/>
  +        <j:set var="hobbies" value="${hobbyModel.toArray()}"/>
  +        <j:set var="template" value="${templateField.getSelectedItem().toString()}"/>
  +        
  +        name = ${name}
  +        background = ${background}
  +        url = ${url}
  +        hobbies = ${hobbies}
  +        template = ${template}
  +        
  +        <j:file name="demopage.html" outputMode="html">
  +            <j:include uri="${template}"/>
  +        </j:file>
  +
  +        <frame var="showPageFrame" size="500,600" location="200,200" title="Your Homepage">
  +            <scrollPane>
  +                <editorPane page="${context.getResource('/demopage.html').toString()}" editable="false"/>
  +            </scrollPane>
  +        </frame>
  +        ${showPageFrame.show()}
  +    </action>
   
   
  -	<!-- create the Frame -->
  -	
  +    <!-- create the Frame -->
  +    
     <frame var="frame" title="Homepage Builder" location="100,100" size="800,400">
  -		<panel>
  +        <panel>
   
   <!-- uncomment this when we've implemented emptyBorder
  -	
  -			<emptyBorder top="20" left="20" bottom="20" right="20" />			
  --->		
  -			<borderLayout>				  	
  -				<borderAlign align="west">
  -			  	<vbox>
  -			  		<label text="Name:"/>
  -			  		<textField var="nameField" text="James Bond"/>
  -			
  -			  		<label text="Favourite Color:"/>
  -			  		<textField var="colorField" text="#007007"/>
  -			  		
  -			  		<label text="Picture URL::"/>
  -			  		<textField var="pictureField" text="http://www.ianfleming.org/007news/images3/c2002_pierce1.jpg"/>
  -			  		
  -			  		<label text="Choose template::"/>
  -			  		<comboBox var="templateField"/>
  -			  		${templateField.addItem('template1.jelly')}
  -			  		${templateField.addItem('template2.jelly')}
  -			  		
  -			  		<label text="Add a Hobby:"/>
  -			  		<textField var="hobbyField"/>
  -			  		
  -			  		<button>
  -			  			<action name="Add >>>">
  -			  				${hobbyModel.addElement(hobbyField.text)}
  -							</action>
  -			  		</button>
  -			  	</vbox>
  -				</borderAlign>
  -				
  -				<borderAlign align="east">  	
  -			  	<scrollPane>
  -			  		<j:useBean class="javax.swing.DefaultListModel" var="hobbyModel"/>
  -						<list model="${hobbyModel}"/>
  -						${hobbyModel.addElement('Killing bad guys')}
  -						${hobbyModel.addElement('Wrecking cars')}
  -						${hobbyModel.addElement('Eating jelly')}
  -			  	</scrollPane>
  -				</borderAlign>
  -				
  -				<borderAlign align="south">  	
  -			  	<button action="${createPageAction}"/>
  -				</borderAlign>
  -			</borderLayout>
  -		</panel>
  -	</frame>
  +    
  +            <emptyBorder top="20" left="20" bottom="20" right="20" />            
  +-->        
  +            <borderLayout>                      
  +                <borderAlign align="west">
  +                  <vbox>
  +                      <label text="Name:"/>
  +                      <textField var="nameField" text="James Bond"/>
  +            
  +                      <label text="Favourite Color:"/>
  +                      <textField var="colorField" text="#007007"/>
  +                      
  +                      <label text="Picture URL::"/>
  +                      <textField var="pictureField" text="http://www.ianfleming.org/007news/images3/c2002_pierce1.jpg"/>
  +                      
  +                      <label text="Choose template::"/>
  +                      <comboBox var="templateField"/>
  +                      ${templateField.addItem('template1.jelly')}
  +                      ${templateField.addItem('template2.jelly')}
  +                      
  +                      <label text="Add a Hobby:"/>
  +                      <textField var="hobbyField"/>
  +                      
  +                      <button>
  +                          <action name="Add >>>">
  +                              ${hobbyModel.addElement(hobbyField.text)}
  +                            </action>
  +                      </button>
  +                  </vbox>
  +                </borderAlign>
  +                
  +                <borderAlign align="east">      
  +                  <scrollPane>
  +                      <j:useBean class="javax.swing.DefaultListModel" var="hobbyModel"/>
  +                        <list model="${hobbyModel}"/>
  +                        ${hobbyModel.addElement('Killing bad guys')}
  +                        ${hobbyModel.addElement('Wrecking cars')}
  +                        ${hobbyModel.addElement('Eating jelly')}
  +                  </scrollPane>
  +                </borderAlign>
  +                
  +                <borderAlign align="south">      
  +                  <button action="${createPageAction}"/>
  +                </borderAlign>
  +            </borderLayout>
  +        </panel>
  +    </frame>
   
  -	${frame.show()}
  +    ${frame.show()}
   
   </j:jelly>
  
  
  
  1.4       +30 -30    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/template2.jelly
  
  Index: template2.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/template2.jelly,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- template2.jelly	6 Sep 2004 03:40:00 -0000	1.3
  +++ template2.jelly	8 Sep 2004 05:34:01 -0000	1.4
  @@ -18,37 +18,37 @@
   
     <html>
     
  -  	<head>
  -	<title>${name}'s Page</title>
  -	</head>
  -	
  -	<body bgcolor="${background}" text="#FFFF00">
  -	
  -	<table>
  -	<tr>
  -	<td>
  -	<img src="${url}"/>
  -	</td>
  +      <head>
  +    <title>${name}'s Page</title>
  +    </head>
  +    
  +    <body bgcolor="${background}" text="#FFFF00">
  +    
  +    <table>
  +    <tr>
  +    <td>
  +    <img src="${url}"/>
  +    </td>
   
  -	<td>
  -	<h1>Welcome to my Homepage!</h1>
  -		
  -	<p>
  -	Hi, I'm ${name}.  These are my hobbies:
  -	</p>
  -		
  -	<ol>
  -	
  -	<j:forEach items="${hobbies}" var="i">
  -		<li>${i}</li>
  -	</j:forEach>
  -	
  -	</ol>
  -	</td>
  -	</tr>
  -	</table>
  -	
  -	</body>
  +    <td>
  +    <h1>Welcome to my Homepage!</h1>
  +        
  +    <p>
  +    Hi, I'm ${name}.  These are my hobbies:
  +    </p>
  +        
  +    <ol>
  +    
  +    <j:forEach items="${hobbies}" var="i">
  +        <li>${i}</li>
  +    </j:forEach>
  +    
  +    </ol>
  +    </td>
  +    </tr>
  +    </table>
  +    
  +    </body>
   
     </html>
     
  
  
  
  1.4       +20 -20    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/template1.jelly
  
  Index: template1.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/demos/template1.jelly,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- template1.jelly	6 Sep 2004 03:40:00 -0000	1.3
  +++ template1.jelly	8 Sep 2004 05:34:01 -0000	1.4
  @@ -18,27 +18,27 @@
   
     <html>
     
  -  	<head>
  -	<title>${name}'s Page</title>
  -	</head>
  -	
  -	<body bgcolor="${background}" text="#FFFFFF">
  +      <head>
  +    <title>${name}'s Page</title>
  +    </head>
  +    
  +    <body bgcolor="${background}" text="#FFFFFF">
   
  -	<h1>${name}'s Homepage</h1>
  -	
  -	<img src="${url}"/>
  -	
  -	<h2>My Hobbies</h2>
  -	
  -	<ul>
  -	
  -	<j:forEach items="${hobbies}" var="i">
  -		<li>${i}</li>
  -	</j:forEach>
  -	
  -	</ul>
  -	
  -	</body>
  +    <h1>${name}'s Homepage</h1>
  +    
  +    <img src="${url}"/>
  +    
  +    <h2>My Hobbies</h2>
  +    
  +    <ul>
  +    
  +    <j:forEach items="${hobbies}" var="i">
  +        <li>${i}</li>
  +    </j:forEach>
  +    
  +    </ul>
  +    
  +    </body>
   
     </html>
     
  
  
  
  1.3       +33 -33    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/wizard.jelly
  
  Index: wizard.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/wizard.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- wizard.jelly	1 Mar 2004 12:35:18 -0000	1.2
  +++ wizard.jelly	8 Sep 2004 05:34:01 -0000	1.3
  @@ -15,48 +15,48 @@
     limitations under the License.
   -->
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing" 
  -	xmlns:log="jelly:log"
  -	xmlns:w="jelly:werkz">
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing" 
  +    xmlns:log="jelly:log"
  +    xmlns:w="jelly:werkz">
   
  -	<w:useGoals var="goalMap"/>
  +    <w:useGoals var="goalMap"/>
   
  -	<!-- action to choose a file -->
  -	<action var="attainGoalAction" name="...">			
  -	</action>
  +    <!-- action to choose a file -->
  +    <action var="attainGoalAction" name="...">            
  +    </action>
   
   
  -	<!-- create the frame -->
  -	<frame var="frame" size="400,150" location="200,200" title="Maven Wizard">
  +    <!-- create the frame -->
  +    <frame var="frame" size="400,150" location="200,200" title="Maven Wizard">
       <menuBar>
         <menu text="Run">
  -				<j:forEach var="groupEntry" items="${goalMap.entrySet()}">			
  -					
  -					<menu text="${groupEntry.key}">
  -						<j:forEach var="goalEntry" items="${groupEntry.value.entrySet()}">			
  -
  -							<!-- give each menu item its own scope then they have their own goal names -->
  -							<j:scope>
  -								<j:set var="goalName" value="${goalEntry.value.name}"/>
  -								
  -								<menuItem>
  -									<action name="${goalEntry.key}">
  -										<log:info>About to invoke the ${goalName} goal!</log:info>
  -										<w:attainGoal name="${goalName}"/>
  -									</action>
  -								</menuItem>
  -							</j:scope>
  -						</j:forEach>
  -					</menu>
  -				</j:forEach>
  -			</menu>
  +                <j:forEach var="groupEntry" items="${goalMap.entrySet()}">            
  +                    
  +                    <menu text="${groupEntry.key}">
  +                        <j:forEach var="goalEntry" items="${groupEntry.value.entrySet()}">            
  +
  +                            <!-- give each menu item its own scope then they have their own goal names -->
  +                            <j:scope>
  +                                <j:set var="goalName" value="${goalEntry.value.name}"/>
  +                                
  +                                <menuItem>
  +                                    <action name="${goalEntry.key}">
  +                                        <log:info>About to invoke the ${goalName} goal!</log:info>
  +                                        <w:attainGoal name="${goalName}"/>
  +                                    </action>
  +                                </menuItem>
  +                            </j:scope>
  +                        </j:forEach>
  +                    </menu>
  +                </j:forEach>
  +            </menu>
       </menuBar>
  -		<panel>
  +        <panel>
       </panel>
  -	</frame>
  +    </frame>
   
  -	${frame.setVisible(true)}
  +    ${frame.setVisible(true)}
   
   </j:jelly>
   
  
  
  
  1.2       +66 -66    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/swingTags.jelly
  
  Index: swingTags.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/swingTags.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- swingTags.jelly	6 Sep 2004 03:14:14 -0000	1.1
  +++ swingTags.jelly	8 Sep 2004 05:34:01 -0000	1.2
  @@ -1,70 +1,70 @@
   <?xml version="1.0"?>
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing">
  -	
  -	<!--for the basic component addembly-->
  -	<j:if test="${test.simple}">
  -		<frame name="frame" var="frame" size="100,100" location="200,200">
  -			<panel name="panel">
  -				<button name="button" background="#112233" foreground="#445566"/>
  -			</panel>
  -		</frame>
  -	</j:if>
  -	
  -	<!--for the GridBag test-->
  -	<j:if test="${test.gbc}">
  -		<frame name="frame" var="frame">
  -			<gridBagLayout>
  -				<gbc anchor="north" fill="vertical" gridheight="3" 
  -					gridwidth="2" gridx="4" gridy="5" insets="1,2,3,4"
  -					ipadx="7" ipady="8" weightx=".3" weighty=".6">
  -					
  -					<button name="button"/>
  -				</gbc>
  -				
  -				<gbc gridx="1" gridy="2" insets="3,4,5,6"
  -					ipadx="8" ipady="9">
  -				
  -					<gbc ipadx="2">
  -						<button name="button2" />
  -					</gbc>
  -				</gbc>
  -				
  -			</gridBagLayout>
  -		</frame>
  -	</j:if>
  -	
  -	<!--for the GridBag 1.4 test-->
  -	<j:if test="${test.gbc14}">
  -		<frame name="frame" var="frame">
  -			<gridBagLayout>
  -				<gbc anchor="line_start">
  -					<button name="button"/>
  -				</gbc>
  -			</gridBagLayout>
  -		</frame>
  -	</j:if>
  -	
  -	<!--for the GridBag invalid anchor test-->
  -	<j:if test="${test.gbcBad}">
  -		<frame name="frame" var="frame">
  -			<gridBagLayout>
  -				<gbc anchor="foo">
  -					<button name="button"/>
  -				</gbc>
  -			</gridBagLayout>
  -		</frame>
  -	</j:if>
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing">
  +    
  +    <!--for the basic component addembly-->
  +    <j:if test="${test.simple}">
  +        <frame name="frame" var="frame" size="100,100" location="200,200">
  +            <panel name="panel">
  +                <button name="button" background="#112233" foreground="#445566"/>
  +            </panel>
  +        </frame>
  +    </j:if>
  +    
  +    <!--for the GridBag test-->
  +    <j:if test="${test.gbc}">
  +        <frame name="frame" var="frame">
  +            <gridBagLayout>
  +                <gbc anchor="north" fill="vertical" gridheight="3" 
  +                    gridwidth="2" gridx="4" gridy="5" insets="1,2,3,4"
  +                    ipadx="7" ipady="8" weightx=".3" weighty=".6">
  +                    
  +                    <button name="button"/>
  +                </gbc>
  +                
  +                <gbc gridx="1" gridy="2" insets="3,4,5,6"
  +                    ipadx="8" ipady="9">
  +                
  +                    <gbc ipadx="2">
  +                        <button name="button2" />
  +                    </gbc>
  +                </gbc>
  +                
  +            </gridBagLayout>
  +        </frame>
  +    </j:if>
  +    
  +    <!--for the GridBag 1.4 test-->
  +    <j:if test="${test.gbc14}">
  +        <frame name="frame" var="frame">
  +            <gridBagLayout>
  +                <gbc anchor="line_start">
  +                    <button name="button"/>
  +                </gbc>
  +            </gridBagLayout>
  +        </frame>
  +    </j:if>
  +    
  +    <!--for the GridBag invalid anchor test-->
  +    <j:if test="${test.gbcBad}">
  +        <frame name="frame" var="frame">
  +            <gridBagLayout>
  +                <gbc anchor="foo">
  +                    <button name="button"/>
  +                </gbc>
  +            </gridBagLayout>
  +        </frame>
  +    </j:if>
   
  -	<!--for the ButtonGroup test-->
  -	<j:if test="${test.buttonGroup}">
  -		<frame name="frame" var="frame">
  -			<buttonGroup var="bg">
  -				<checkBox name="cb1"/>
  -				<checkBox name="cb2"/>
  -			</buttonGroup>
  -		</frame>
  -	</j:if>
  -	
  +    <!--for the ButtonGroup test-->
  +    <j:if test="${test.buttonGroup}">
  +        <frame name="frame" var="frame">
  +            <buttonGroup var="bg">
  +                <checkBox name="cb1"/>
  +                <checkBox name="cb2"/>
  +            </buttonGroup>
  +        </frame>
  +    </j:if>
  +    
   </j:jelly>
  
  
  
  1.10      +48 -48    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/example.jelly
  
  Index: example.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/example.jelly,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- example.jelly	1 Mar 2004 12:35:18 -0000	1.9
  +++ example.jelly	8 Sep 2004 05:34:01 -0000	1.10
  @@ -15,33 +15,33 @@
     limitations under the License.
   -->
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing" 
  -	xmlns:log="jelly:log"
  -	xmlns:define="jelly:define">
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing" 
  +    xmlns:log="jelly:log"
  +    xmlns:define="jelly:define">
   
     <action var="fooAction" name="Foo" tooltip="some text">
  -  	<log:info>Just evaluated the foo action!</log:info>
  +      <log:info>Just evaluated the foo action!</log:info>
     </action>
   
     <font var="bigfont" name="helvetica" family="helvetica" size="${20}"/>
   
  -	<define:script var="onClosing">
  +    <define:script var="onClosing">
       <log:info>The frame is closing via event: ${event}</log:info>
     </define:script>
     
     <frame title="This is a frame" var="frame" location="100,100" size="800,400">
  -  	<font family="helvetica" size="14"/>
  +      <font family="helvetica" size="14"/>
       <menuBar>
         <menu text="File">
           <menuItem>
             <action name="New">
  -          	<log:info>clicked on the New menu item!</log:info>
  +              <log:info>clicked on the New menu item!</log:info>
             </action>
           </menuItem>
           <menuItem>
             <action name="Open">
  -          	<log:info>Popup a file dialog!</log:info>
  +              <log:info>Popup a file dialog!</log:info>
             </action>
           </menuItem>
           <menuItem text="Save" enabled="false" />
  @@ -52,65 +52,65 @@
         <menu text="Demo">
           <menuItem>
             <action name="GridBagLayout demo">
  -          	<log:info>about to run the GridBagLayout demo...</log:info>
  -          	<j:include uri="gridBagDemo.jelly"/>
  +              <log:info>about to run the GridBagLayout demo...</log:info>
  +              <j:include uri="gridBagDemo.jelly"/>
             </action>
           </menuItem>
         </menu>
         <menu text="Run">
           <menuItem>
             <action name="Run a Jelly script">
  -          	<log:info>about to open the Jelly script runner...</log:info>
  -          	<j:include uri="run.jelly"/>
  +              <log:info>about to open the Jelly script runner...</log:info>
  +              <j:include uri="run.jelly"/>
             </action>
           </menuItem>
         </menu>
         <menu text="Help">
           <menuItem>
             <action name="About">
  -          	<log:info>about to display the about dialog...</log:info>
  -          	<j:include uri="about.jelly"/>
  +              <log:info>about to display the about dialog...</log:info>
  +              <j:include uri="about.jelly"/>
             </action>
           </menuItem>
         </menu>
       </menuBar>
       
  -		<splitPane>    
  +        <splitPane>    
         <panel>
  -      	<titledBorder title="Sample Border Title"/>
  -      	<tableLayout>
  -      		<tr>
  -      			<td>
  -			        <label text="Name"/>
  -						</td>			        
  -      			<td>
  -			        <textField text="James"/>
  -						</td>			        
  -      		</tr>
  -      		<tr>
  -      			<td>
  -			        <label text="Location"/>
  -						</td>			        
  -      			<td>
  -			        <textField text="London"/>
  -						</td>			        
  -      		</tr>
  -      		<tr>
  -      			<td colspan="2" align="center">
  -      				<panel>
  -				        <button>
  -				          <action name="OK">
  -				          	<log:info>Clicked on the OK button</log:info>
  -				          </action>
  -				        </button>
  -				        <button action="${fooAction}"/>
  -							</panel>				        
  -						</td>			        
  -    		</tr>
  -      	</tableLayout>
  +          <titledBorder title="Sample Border Title"/>
  +          <tableLayout>
  +              <tr>
  +                  <td>
  +                    <label text="Name"/>
  +                        </td>                    
  +                  <td>
  +                    <textField text="James"/>
  +                        </td>                    
  +              </tr>
  +              <tr>
  +                  <td>
  +                    <label text="Location"/>
  +                        </td>                    
  +                  <td>
  +                    <textField text="London"/>
  +                        </td>                    
  +              </tr>
  +              <tr>
  +                  <td colspan="2" align="center">
  +                      <panel>
  +                        <button>
  +                          <action name="OK">
  +                              <log:info>Clicked on the OK button</log:info>
  +                          </action>
  +                        </button>
  +                        <button action="${fooAction}"/>
  +                            </panel>                        
  +                        </td>                    
  +            </tr>
  +          </tableLayout>
         </panel>
         <scrollPane>
  -      	<!-- this tag can set properties on the bean model too -->
  +          <!-- this tag can set properties on the bean model too -->
           <j:useBean var="tableModel" class="org.apache.commons.jelly.swing.MyTableModel"/>
           <table model="${tableModel}"/>
         </scrollPane>
  
  
  
  1.6       +54 -54    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/run.jelly
  
  Index: run.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/run.jelly,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- run.jelly	1 Mar 2004 12:35:18 -0000	1.5
  +++ run.jelly	8 Sep 2004 05:34:01 -0000	1.6
  @@ -15,66 +15,66 @@
     limitations under the License.
   -->
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing" 
  -	xmlns:log="jelly:log">
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing" 
  +    xmlns:log="jelly:log">
   
  -	<!-- default working directory to swing examples -->		
  -	<j:if test="${empty working.dir}">
  -		<j:set var="working.dir" value="src/test/org/apache/commons/jelly/swing"/>
  -	</j:if>
  +    <!-- default working directory to swing examples -->        
  +    <j:if test="${empty working.dir}">
  +        <j:set var="working.dir" value="src/test/org/apache/commons/jelly/swing"/>
  +    </j:if>
   
  -	<!-- action to choose a file -->
  -	<action var="chooseFileAction" name="...">			
  -		<fileChooser var="chooser" description="Jelly files" currentDirectory="${working.dir}"/>
  -		
  -		${chooser.showDialog(frame, 'Choose Jelly file')}
  -	
  -		<j:set var="file" value="${chooser.selectedFile}"/>
  -		<j:if test="${file != null}">
  -			<j:set target="${scriptField}" property="text" value="${file.toURL().toString()}"/>
  -		</j:if>
  -	</action>
  +    <!-- action to choose a file -->
  +    <action var="chooseFileAction" name="...">            
  +        <fileChooser var="chooser" description="Jelly files" currentDirectory="${working.dir}"/>
  +        
  +        ${chooser.showDialog(frame, 'Choose Jelly file')}
  +    
  +        <j:set var="file" value="${chooser.selectedFile}"/>
  +        <j:if test="${file != null}">
  +            <j:set target="${scriptField}" property="text" value="${file.toURL().toString()}"/>
  +        </j:if>
  +    </action>
   
   
  -	<!-- create the frame -->
  -	<frame var="frame" size="400,150" location="200,200" title="Jelly Runner">
  -		<panel>
  -  		<tableLayout>
  -    		<tr>
  -    			<td colfill="true">
  -						<panel>
  -							<borderLayout hgap="2" vgap="2">
  -								<borderAlign align="west">
  -					  			<label text="Script to run:"/>
  -								</borderAlign>			        		
  -								<borderAlign align="center">
  -					    		<textField var="scriptField"/>
  -								</borderAlign>			        		
  -								<borderAlign align="east">
  -					    		<button action="${chooseFileAction}"/>
  -								</borderAlign>			        		
  -							</borderLayout>
  -				  	</panel>
  -					</td>			        
  -    		</tr>
  -    		<tr>
  -    			<td align="center">
  -    				<panel>
  -			        <button>
  -			          <action name="Run Script">
  -									<log:info>about to run ${file}</log:info>	
  -									<j:include uri="${scriptField.text}"/>
  -								</action>
  -			        </button>
  -						</panel>				        
  -					</td>			        
  -  			</tr>
  -    	</tableLayout>
  +    <!-- create the frame -->
  +    <frame var="frame" size="400,150" location="200,200" title="Jelly Runner">
  +        <panel>
  +          <tableLayout>
  +            <tr>
  +                <td colfill="true">
  +                        <panel>
  +                            <borderLayout hgap="2" vgap="2">
  +                                <borderAlign align="west">
  +                                  <label text="Script to run:"/>
  +                                </borderAlign>                            
  +                                <borderAlign align="center">
  +                                <textField var="scriptField"/>
  +                                </borderAlign>                            
  +                                <borderAlign align="east">
  +                                <button action="${chooseFileAction}"/>
  +                                </borderAlign>                            
  +                            </borderLayout>
  +                      </panel>
  +                    </td>                    
  +            </tr>
  +            <tr>
  +                <td align="center">
  +                    <panel>
  +                    <button>
  +                      <action name="Run Script">
  +                                    <log:info>about to run ${file}</log:info>    
  +                                    <j:include uri="${scriptField.text}"/>
  +                                </action>
  +                    </button>
  +                        </panel>                        
  +                    </td>                    
  +              </tr>
  +        </tableLayout>
       </panel>
  -	</frame>
  +    </frame>
   
  -	${frame.setVisible(true)}
  +    ${frame.setVisible(true)}
   
   </j:jelly>
   
  
  
  
  1.3       +12 -12    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/about.jelly
  
  Index: about.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/about.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- about.jelly	1 Mar 2004 12:35:18 -0000	1.2
  +++ about.jelly	8 Sep 2004 05:34:01 -0000	1.3
  @@ -15,11 +15,11 @@
     limitations under the License.
   -->
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing" 
  -	xmlns:log="jelly:log">
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing" 
  +    xmlns:log="jelly:log">
   
  -	<j:set var="text">
  +    <j:set var="text">
   This is an example of the kind of Rich User Interface you can create
   using JellySwing.
   
  @@ -28,14 +28,14 @@
   
   There is support for all the main Swing controls as well as custom controls.
   Configure your views using XML techniques such as XSLT or Jelly, then 
  -plug in your own models or create new models dynamically using Jelly.		
  -	</j:set>
  -	
  -	<optionPane var="optionPane" message="${text}"/>
  -	
  -	<j:set var="dialog" value="${optionPane.createDialog(frame, 'About JellySwing')}"/>
  -	${dialog.show()}
  -	
  +plug in your own models or create new models dynamically using Jelly.        
  +    </j:set>
  +    
  +    <optionPane var="optionPane" message="${text}"/>
  +    
  +    <j:set var="dialog" value="${optionPane.createDialog(frame, 'About JellySwing')}"/>
  +    ${dialog.show()}
  +    
   </j:jelly>
   
   
  
  
  
  1.5       +108 -108  jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/gridBagDemo.jelly
  
  Index: gridBagDemo.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/gridBagDemo.jelly,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- gridBagDemo.jelly	1 Mar 2004 12:35:18 -0000	1.4
  +++ gridBagDemo.jelly	8 Sep 2004 05:34:01 -0000	1.5
  @@ -15,23 +15,23 @@
     limitations under the License.
   -->
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing" 
  -	xmlns:log="jelly:log"
  -	xmlns:define="jelly:define"
  -	xmlns:bsh="jelly:beanshell">
  -
  -		<!-- 
  -			TODO:
  -				- an insets tag (CVS ?)
  -				- some Font support (CVS ?)
  -				- incorporate CollapsablePanel
  -				- dragable Label with subclass ItemTitleLabel
  -				- CollapsablePanel implementing DropTarget (or approacher at least)
  -				- adding relations
  -				- DC pane (later with inheritance)
  -				- Relations Pane with drop
  -			-->
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing" 
  +    xmlns:log="jelly:log"
  +    xmlns:define="jelly:define"
  +    xmlns:bsh="jelly:beanshell">
  +
  +        <!-- 
  +            TODO:
  +                - an insets tag (CVS ?)
  +                - some Font support (CVS ?)
  +                - incorporate CollapsablePanel
  +                - dragable Label with subclass ItemTitleLabel
  +                - CollapsablePanel implementing DropTarget (or approacher at least)
  +                - adding relations
  +                - DC pane (later with inheritance)
  +                - Relations Pane with drop
  +            -->
     <define:script var="onClosing">
       <log:info>The frame is closing via event: ${event}</log:info>
     </define:script>
  @@ -39,97 +39,97 @@
     <frame title="Metadata start of pane for a definition" var="frame" location="100,100" size="800,400">
       
         <panel name="metadata-panel">
  -				<gridBagLayout>
  -					<gbc name="Title-cell" gridx="0" gridy="0" idpadx="20" fill="horizontal"> 
  -						<!-- prefer a title ?? dnd may be harder -->
  -						<panel name="head-panel">
  -						<label text="Definition: Definition of a metrics"/><!-- need fonts ! -->
  -						<!-- this should be a draggable label, being the source to drop a relation -->
  -						</panel>
  -					</gbc>
  -					<gbc name="panes-cell" gridx="0" gridy="1" fill="both">
  -						<!-- constraints variable definitions... for later use, in the children of the center element -->
  -							<gbc var="labelConstraints" 
  -									weightx="0" weighty="0" 
  -									ipadx="5" ipady="2" 
  -									anchor="west"
  -									fill="none"/>
  -							<gbc var="pop_up_constraints" basedOn="${labelConstraints}" 
  -									weightx="1" 
  -									fill="horizontal"
  -									anchor="east" />
  -						<gridBagLayout>
  -								<gbc gridy="0">
  -									<panel name="dc_metadata"><!-- should be a collapasble panel !! -->
  -										<label text="... still todo..."/>
  -									</panel>
  -								</gbc>
  -								<gbc gridy="1">
  -									<panel name="pedagogical metadata"><!-- should be a collapasble panel !! --><gridBagLayout>
  -
  -										<gbc gridx="0" gridy="0" basedOn="${labelConstraints}"><label text="Difficulty:"/>
  -											</gbc>
  -											<gbc gridx="1" gridy="0" basedOn="${pop_up_constraints}">
  -												<comboBox name="comboZero" var="comboZero"/>
  -												${comboZero.addItem("easy")}
  -												${comboZero.addItem("fair")}
  -												${comboZero.addItem("difficult")}
  -												${comboZero.setSelectedIndex(1)}$
  -												</gbc>
  -
  -										<gbc gridx="0" gridy="1" basedOn="${labelConstraints}"><label text="Abstractness:"/>
  -											</gbc>
  -											<gbc gridx="1" gridy="1" basedOn="${pop_up_constraints}">
  -												<comboBox name="c" var="c"/>
  -												${c.addItem("concrete")}
  -												${c.addItem("medium")}
  -												${c.addItem("abstract")}
  -												${c.setSelectedIndex(1)}$
  -												</gbc>
  -
  -										<gbc gridx="2" gridy="0" basedOn="${labelConstraints}" gridheight="2"
  -												ipadx="10"><panel name="blank"/></gbc>
  -										<gbc gridx="3" gridy="0" basedOn="${labelConstraints}"><label text="Learning-context:"/>
  -											</gbc>
  -											<gbc gridx="4" gridy="0" basedOn="${pop_up_constraints}">
  -												<comboBox name="c" var="c"/>
  -												${c.addItem("primary-education")}
  -												${c.addItem("secondary-education")}
  -												${c.addItem("higher-education")}
  -												${c.addItem("university-first-cycle")}
  -												${c.addItem("university-second-cycle")}
  -												${c.addItem("university-postgraduate")}
  -												${c.addItem("technical-school-first-cycle")}
  -												${c.addItem("technical-school-second-cycle")}
  -												${c.addItem("professional-formation")}
  -												${c.addItem("continuous-formation")}
  -												</gbc>
  -
  -										<gbc gridx="3" gridy="1" basedOn="${labelConstraints}"><label text="Field:"/>
  -											</gbc>
  -											<gbc gridx="4" gridy="1" basedOn="${pop_up_constraints}">
  -												<comboBox name="c" var="c"/>
  -												${c.addItem("mathematics")}
  -												${c.addItem("statistics")}
  -												${c.addItem("engineering")}
  -												${c.addItem("psychology")}
  -												${c.addItem("biology")}
  -												${c.addItem("chemistry")}
  -												${c.addItem("physics")}
  -												${c.addItem("computer-science")}
  -												${c.addItem("economy")}
  -												${c.addItem("historical")}
  -												${c.addItem("other")}
  -												</gbc>
  -
  -											</gridBagLayout></panel>
  -								</gbc>
  -							</gridBagLayout>
  -						</gbc>
  -					<gbc name="content-display" gridx="0" gridy="2" fill="horizontal">
  -						<!-- would need a separator here." -->
  -						</gbc>
  -				</gridBagLayout>
  +                <gridBagLayout>
  +                    <gbc name="Title-cell" gridx="0" gridy="0" idpadx="20" fill="horizontal"> 
  +                        <!-- prefer a title ?? dnd may be harder -->
  +                        <panel name="head-panel">
  +                        <label text="Definition: Definition of a metrics"/><!-- need fonts ! -->
  +                        <!-- this should be a draggable label, being the source to drop a relation -->
  +                        </panel>
  +                    </gbc>
  +                    <gbc name="panes-cell" gridx="0" gridy="1" fill="both">
  +                        <!-- constraints variable definitions... for later use, in the children of the center element -->
  +                            <gbc var="labelConstraints" 
  +                                    weightx="0" weighty="0" 
  +                                    ipadx="5" ipady="2" 
  +                                    anchor="west"
  +                                    fill="none"/>
  +                            <gbc var="pop_up_constraints" basedOn="${labelConstraints}" 
  +                                    weightx="1" 
  +                                    fill="horizontal"
  +                                    anchor="east" />
  +                        <gridBagLayout>
  +                                <gbc gridy="0">
  +                                    <panel name="dc_metadata"><!-- should be a collapasble panel !! -->
  +                                        <label text="... still todo..."/>
  +                                    </panel>
  +                                </gbc>
  +                                <gbc gridy="1">
  +                                    <panel name="pedagogical metadata"><!-- should be a collapasble panel !! --><gridBagLayout>
  +
  +                                        <gbc gridx="0" gridy="0" basedOn="${labelConstraints}"><label text="Difficulty:"/>
  +                                            </gbc>
  +                                            <gbc gridx="1" gridy="0" basedOn="${pop_up_constraints}">
  +                                                <comboBox name="comboZero" var="comboZero"/>
  +                                                ${comboZero.addItem("easy")}
  +                                                ${comboZero.addItem("fair")}
  +                                                ${comboZero.addItem("difficult")}
  +                                                ${comboZero.setSelectedIndex(1)}$
  +                                                </gbc>
  +
  +                                        <gbc gridx="0" gridy="1" basedOn="${labelConstraints}"><label text="Abstractness:"/>
  +                                            </gbc>
  +                                            <gbc gridx="1" gridy="1" basedOn="${pop_up_constraints}">
  +                                                <comboBox name="c" var="c"/>
  +                                                ${c.addItem("concrete")}
  +                                                ${c.addItem("medium")}
  +                                                ${c.addItem("abstract")}
  +                                                ${c.setSelectedIndex(1)}$
  +                                                </gbc>
  +
  +                                        <gbc gridx="2" gridy="0" basedOn="${labelConstraints}" gridheight="2"
  +                                                ipadx="10"><panel name="blank"/></gbc>
  +                                        <gbc gridx="3" gridy="0" basedOn="${labelConstraints}"><label text="Learning-context:"/>
  +                                            </gbc>
  +                                            <gbc gridx="4" gridy="0" basedOn="${pop_up_constraints}">
  +                                                <comboBox name="c" var="c"/>
  +                                                ${c.addItem("primary-education")}
  +                                                ${c.addItem("secondary-education")}
  +                                                ${c.addItem("higher-education")}
  +                                                ${c.addItem("university-first-cycle")}
  +                                                ${c.addItem("university-second-cycle")}
  +                                                ${c.addItem("university-postgraduate")}
  +                                                ${c.addItem("technical-school-first-cycle")}
  +                                                ${c.addItem("technical-school-second-cycle")}
  +                                                ${c.addItem("professional-formation")}
  +                                                ${c.addItem("continuous-formation")}
  +                                                </gbc>
  +
  +                                        <gbc gridx="3" gridy="1" basedOn="${labelConstraints}"><label text="Field:"/>
  +                                            </gbc>
  +                                            <gbc gridx="4" gridy="1" basedOn="${pop_up_constraints}">
  +                                                <comboBox name="c" var="c"/>
  +                                                ${c.addItem("mathematics")}
  +                                                ${c.addItem("statistics")}
  +                                                ${c.addItem("engineering")}
  +                                                ${c.addItem("psychology")}
  +                                                ${c.addItem("biology")}
  +                                                ${c.addItem("chemistry")}
  +                                                ${c.addItem("physics")}
  +                                                ${c.addItem("computer-science")}
  +                                                ${c.addItem("economy")}
  +                                                ${c.addItem("historical")}
  +                                                ${c.addItem("other")}
  +                                                </gbc>
  +
  +                                            </gridBagLayout></panel>
  +                                </gbc>
  +                            </gridBagLayout>
  +                        </gbc>
  +                    <gbc name="content-display" gridx="0" gridy="2" fill="horizontal">
  +                        <!-- would need a separator here." -->
  +                        </gbc>
  +                </gridBagLayout>
         </panel>
       
       <windowListener var="event" closing="${onClosing}"/>
  
  
  
  1.3       +20 -20    jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/showVariables.jelly
  
  Index: showVariables.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/jelly-tags/swing/src/test/org/apache/commons/jelly/swing/showVariables.jelly,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- showVariables.jelly	1 Mar 2004 12:35:18 -0000	1.2
  +++ showVariables.jelly	8 Sep 2004 05:34:01 -0000	1.3
  @@ -15,30 +15,30 @@
     limitations under the License.
   -->
   <j:jelly 
  -	xmlns:j="jelly:core" 
  -	xmlns="jelly:swing" 
  -	xmlns:log="jelly:log">
  +    xmlns:j="jelly:core" 
  +    xmlns="jelly:swing" 
  +    xmlns:log="jelly:log">
   
  -	<!-- lets create the model -->
  -	<j:useList var="list" items="${context.getVariableNames()}"/>
  +    <!-- lets create the model -->
  +    <j:useList var="list" items="${context.getVariableNames()}"/>
   
  -	<log:info>Created list ${list}</log:info>
  -		
  -	<!-- create the dialog -->
  -	<dialog var="dialog" size="400,150" location="200,200" title="Variables">
  -		<scrollPane>
  -  		<table>
  -				<tableModel rows="${list}">
  -					<tableModelColumn headerValue="ID" value="${rowIndex}"/>
  -					<tableModelColumn headerValue="Name" value="${row}"/>
  -					<tableModelColumn headerValue="Value" value="${context.getVariable(row)}"/>
  -					<tableModelColumn headerValue="Type" value="${context.getVariable(row).getClass().getName()}"/>
  -				</tableModel>
  -    	</table>
  +    <log:info>Created list ${list}</log:info>
  +        
  +    <!-- create the dialog -->
  +    <dialog var="dialog" size="400,150" location="200,200" title="Variables">
  +        <scrollPane>
  +          <table>
  +                <tableModel rows="${list}">
  +                    <tableModelColumn headerValue="ID" value="${rowIndex}"/>
  +                    <tableModelColumn headerValue="Name" value="${row}"/>
  +                    <tableModelColumn headerValue="Value" value="${context.getVariable(row)}"/>
  +                    <tableModelColumn headerValue="Type" value="${context.getVariable(row).getClass().getName()}"/>
  +                </tableModel>
  +        </table>
       </scrollPane>
  -	</dialog>
  +    </dialog>
   
  -	${dialog.setVisible(true)}
  +    ${dialog.setVisible(true)}
   
   </j:jelly>
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message