Griffon 0.9.5發布 Groovy開發Swing的框架
作者:傾楓
Griffon 是Swing開發者的一個Groovy框架。Griffon期望提供一個穩定代碼結構給Swing應用,就像Grails給web開發帶來的優勢一樣。同時,Griffon也可能提供一個替代應用框架,替代Spring RCP,Eclipse RCP和NetBeans平臺。
Griffon 0.9.5 穩定版發布了,該版本修復了 RC2 的一些 bug。
Griffon 是Swing開發者的一個Groovy框架。Griffon期望提供一個穩定代碼結構給Swing應用,就像Grails給web開發帶來的優勢一樣。同 時,Griffon也可能提供一個替代應用框架,替代Spring RCP,Eclipse RCP和NetBeans平臺。
示例代碼:
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
【編輯推薦】
責任編輯:林師授
來源:
51CTO