2
0
Fork 0

[svn r235] added made first swt query working..

This commit is contained in:
willemc 2007-03-26 01:20:47 +02:00
parent d62b09bd3b
commit 5e425bd032
7 changed files with 149 additions and 42 deletions

View file

@ -67,15 +67,21 @@ public class SimpleTest extends TestCase {
public void testAll() throws Exception {
// get GUI
Display display = new Display();
Shell shell = new Shell(display);
shell.setText("Hello, world!");
// define query
XTESParser parser = new XTESParser();
parser.parseResource("/META-INF/xtes/tests.xml");
TemplateStore store = XTESParser.getTemplateStore(parser.getElementContext());
Query query = store.getQuery("testUsers2");
// define redering
SwtVascViewRenderer render = new SwtVascViewRenderer(shell);
// config table
VascTable table = new VascTable();
table.setName("Testje");
table.setHeaderName("TableHeader");
@ -84,7 +90,7 @@ public class SimpleTest extends TestCase {
table.setHelpId("someKey");
table.setVascDataSource(new Serv5HibernateVascDataSource("flowstats"));
table.setVascTextValue(new DefaultVascTextValue());
table.setVascViewRenderer(new SwtVascViewRenderer(shell));
table.setVascViewRenderer(render);
table.setQuery(query);
table.setVascRecordCreator(new BeanVascRecordCreator());
@ -99,9 +105,10 @@ public class SimpleTest extends TestCase {
column.setVascColumnValue(new BeanPropertyVascColumnValue("someValue"));
table.addTableColumns(column);
table.getV
// render
render.renderView(table);
// view
shell.open();
// Set up the event loop.
while (!shell.isDisposed()) {