A quick work around to display a bindable xml to the text area.I tried with tables, but some issues with events, so I will try later.Developing is easy and with less code.Scripting makes a flexible (agile) application layers like views and controller.Groovy can act as a super glue for different layers.It could combine XML parsing,widgets,networking...Each widget node written in the view classes is syntactically a method call.All of these method calls are dynamically dispatched.Most don’t actually exist in bytecode.Child closures create hierarchical relations.Closures are first class objects.This hierarchy of components would normally be created through a series of repetitive instantiations, setters, and finally attaching child to its respective parent.Child widgets are added to parent containers.
Like a ScrollPane having a text area etc.An event listener method is equivalent to adding a listener with that method; actionPerformed : { ... } ;in Groovy.
For this same Java does as
button.addActionListener(new ActionListener() {
void actionPerformed(ActionEvent evt) { ...}
})
Samples

source
Download source
Follow the quickstart guide and run the app from griffon-test directory
Groovy rocks!! says http://onestepback.org/articles/groovy/index.html
More here
http://groovy.codehaus.org/Griffon+Quick+Start
http://groovy.codehaus.org/Swing+Builder
http://griffon.codehaus.org/
No comments:
Post a Comment