Oleg
2006-09-13
I cannot create a decent SWT table, has somebody done that? My code looks like:
def subapp = jface.shell( window.getShell() ) {
gridLayout(numColumns:3)
table( toolTipText:"This is a table!", style:"multi, full_selection"
, headerVisible:true
) {
// gridData( style:"fill_both" )
columns() {
tableColumn(text:"Attribute", style:"center")
tableColumn(text:"Value", style:"center")
tableColumn(text:"Flag", style:"center")
}
items( [
tableItem ( text:"root1" )
, tableItem ( text:"root2" )
, tableItem ( text:"root3" )
, tableItem ( text:"root4" )
]
)
}
}
subapp.pack()
subapp.open()
James E. Ervin
2006-09-14
I have not as of yet got a decent SWT table to work yet either, the SWT/JFace Builder for Groovy was horked from the Groovy SWT project that was begun, but never improved upon. It is one of those things that I think could definitely use expounding on and some improvements. So I think that I and others would appreciate hearing more about what you are learning.
Oleg
2006-09-19
Swing is also a challenge :( I am getting null pointer Exception with the following code
def swing = new SwingBuilder();
widget = swing.frame( title:'My Title', defaultCloseOperation:javax.swing.WindowConstants.EXIT_ON_CLOSE) {
panel( layout:new BorderLayout() ) {
splitPane( orientation:JSplitPane.VERTICAL_SPLIT, dividerLocation:24 ) {
panel( layout:new BorderLayout() ) {
label(text:'My Label', constraints:BorderLayout.WEST, toolTipText:'My Label')
}
panel() {
button( text:'Exit', actionPerformed:{ println("I am done - Exit"); System.exit(0) }, toolTipText:'Exit withoit doing anything' )
}
}
}
}
widget.pack()
widget.show()