Swing开发框架 Griffon
fmms
13年前
<p>Griffon 是Swing开发者的一个Groovy框架。Griffon期望提供一个稳定代码结构给Swing应用,就像Grails给web开发带来的优势一样。同时,Griffon也可能提供一个替代应用框架,替代Spring RCP,Eclipse RCP和NetBeans平台。</p> <p>示例代码:</p> <div style="border-bottom-width:1px;" class="codeHeader panelHeader"> <strong>DemoConsoleView.groovy<pre class="brush:java; toolbar: true; auto-links: false;">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}) } } }</pre> <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1323347846202" target="_blank">http://www.open-open.com/lib/view/home/1323347846202</a></p> </strong> </div>