Griffon 0.9.5發(fā)布 Groovy開(kāi)發(fā)Swing的框架
Griffon 0.9.5 穩(wěn)定版發(fā)布了,該版本修復(fù)了 RC2 的一些 bug。
Griffon 是Swing開(kāi)發(fā)者的一個(gè)Groovy框架。Griffon期望提供一個(gè)穩(wěn)定代碼結(jié)構(gòu)給Swing應(yīng)用,就像Grails給web開(kāi)發(fā)帶來(lái)的優(yōu)勢(shì)一樣。同 時(shí),Griffon也可能提供一個(gè)替代應(yīng)用框架,替代Spring RCP,Eclipse RCP和NetBeans平臺(tái)。
示例代碼:
DemoConsoleView.groovy
- application(title:'DemoConsole', pack:true, locationByPlatform:true) {
- panel(border:emptyBorder(6)) {
- borderLayout()
- scrollPane(constraints:CENTER) {
- textArea(text:bind(target:model, targetProperty:'scriptSource'),
- enabled: bind {model.enabled},
- columns:40, rows:10)
- }
- hbox(constraints:SOUTH) {
- button("Execute", actionPerformed:controller.&executeScript,
- enabled: bind {model.enabled})
- hstrut(5)
- label("Result:")
- hstrut(5)
- label(text:bind {model.scriptResult})
- }
- }
- }
下載地址:http://griffon.codehaus.org/Download
【編輯推薦】