blob: 14dd6f67c0c01d4cf2c2aa30e55f8a89580a7403 [file] [log] [blame]
package groovy.swt.examples
import groovy.swt.SwtBuilder
class TableTreeDemo {
property swt
void run() {
swt = new SwtBuilder()
shell = swt.shell ( text:'The TableTree Test1', location:[100,100], size:[700,600] ) {
gridLayout(numColumns:3)
tableTree( toolTipText:"This is a table tree!", style:"multi, full_selection" ) {
gridData( style:"fill_both" )
tableTreeItem ( text:"root1" ) {
tableTreeItem ( text:"child 1-1" )
tableTreeItem ( text:"child 1-2" )
tableTreeItem ( text:"child 1-3" )
}
tableTreeItem ( text:"root2" ) {
tableTreeItem ( text:"child 2-1" )
tableTreeItem ( text:"child 2-2" )
tableTreeItem ( text:"child 2-3" )
}
}
}
shell.open()
while(! shell.isDisposed()) {
if (! shell.display.readAndDispatch()) {
shell.display.sleep();
}
}
}
}