Hello,

   Christiaan ten Klooster has started work on a
Groovy markup builder for Eclipse (SWT/JFace).

   In case you wondered: What is Groovy?

   Groovy is a new dynamic object-oriented scripting
language combining the best from Smalltalk, Python and
Ruby that also includes a new alternative XML syntax
called Groovy markup that lets you mix markup and
traditional scripting as you please.


   Christiaan has uploaded a first preview for the new
markup builder that also includes more than half a
dozen examples including a complete webbrowser.

   To see Groovy markup in action here's a JFace
sample:

package groovy.swt

import groovy.jface.JFaceBuilder

class ApplicationDemo 
{
  property mainapp
  property event
        
  void run() 
  {
    swt = new JFaceBuilder()
        
    shell = swt.shell() {
         
      mainapp = applicationWindow() {   
                        
        menuManager( text:"File" ) {
          action ( text:"Very Nice", closure:{ println "Very
Nice !!!" } )
          separator()
          action ( text:"Check me", checked:true, closure:{
println "I've been checked" } )
        }
        
        menuManager( text:"Edit" ) {
          action ( text:"Say Hi Statusbar", closure:{
mainapp.setStatus('Hello ...') } )
        }
               
        fillLayout ( type:"vertical" )
        
        label( text:"A big red label", background:[204, 0, 0]
) 
        label( text:"I can barelly read this",
foreground:[0,200,0] )  
        label( text:"It sure looks like the dutch flag",
foreground:[0,0,150], background:[0, 0, 153] )
         
      }
    }
  
    mainapp.MenuBarManager.updateAll( true )
    mainapp.getShell().pack()
    mainapp.open()
  }
}
          
    
  Full story @
http://article.gmane.org/gmane.comp.lang.groovy.devel/350
and http://www.dacelo.nl/data/groovy-swt

   - Gerald

PS: To find out more about Groovy start at
http://groovy.codehaus.org and
http://groovy.codehaus.org/markup.html

Mark Volkmann has written up an excellent article
about Groovy online @ http://www.ociweb.com/jnb/jnbFeb2004.html


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
xul-announce mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xul-announce

Reply via email to