From 5e425bd0328a39727cb7b560e27cf6f579feb0c9 Mon Sep 17 00:00:00 2001 From: willemc Date: Mon, 26 Mar 2007 01:20:47 +0200 Subject: [PATCH] [svn r235] added made first swt query working.. --- lib/idcanet-x4o-bin.jar | Bin 65322 -> 65538 bytes .../vasc/core/column/VascColumnValue.java | 2 +- .../column/BeanPropertyVascColumnValue.java | 11 +- .../vasc/impl/column/NullVascColumnValue.java | 2 +- .../serv5/Serv5HibernateVascDataSource.java | 43 ++----- .../vasc/impl/swt/SwtVascViewRenderer.java | 120 +++++++++++++++++- tests/com/idcanet/vasc/tests/SimpleTest.java | 13 +- 7 files changed, 149 insertions(+), 42 deletions(-) diff --git a/lib/idcanet-x4o-bin.jar b/lib/idcanet-x4o-bin.jar index 2ec1c380e20e9537ba915178bdd6a6d4f34f9f68..5fd57486cc59485cc9d18a2eefb2fc0987142f9c 100644 GIT binary patch delta 6716 zcmY+JWmpwm*T>-?a?>S;K8Nn^?(UKhlsa_Cp+Vq)A_$TW-Q7qx2uevyNOyzMoxa?> zzR&eO^I`Vy|DUzz+OuYVShJ?&9_4M|6KpM2lqVQS{~lNbzOmR$D3}DkRYE6Z_&4~z z0`T?uutj_%q&fy9BsxGlgb>gqr^QUFM8#8(?o)x`^8xONtMZgrE1Si(!qJ6q#RWsZW01huGy;J__8DF}EA5K{=@Nqp=tITgtc2Z!XYtkZmL z1WYMJ5O2{@Bq*P!Foi62z)JYum6vl87!hFtciv=GxV`8MyPl>+a~P+=o~Suhu&hoD zIrP0=IyGJ20%)&ga}eQ^UKpN$qD)wD7^#r9nY(dcy;d|miScuB9W6=goLMQNut;lc zLjEG6XN1~6_!r9jSjZRBp6(XEUtt{H##C%Bd)kPL{gyBVfKZYkc5I@;nvxVzLVVwp z+a_iOxH~I+a?p8pqRytZaruecM)#*nN|-`Y?e?b21W#oQ*}#@a0AKdJre#1^mj!<# zY1sSb;aY*vYnr}b=QQ&iBm5b1X#*rOCZ$#Ctfq94Eq-}V{VoMX%wyP!UW8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b@p4Tw|LKipH)BwOb=zxqyMj+va zzHPaoP+;Lg4BXaw3uP|hV5#;SC<63c5dohrA>g@AV0VBC*zKaese}Kd>Rm4x(f^(& zKdiO~fL+;vWxw4#n1P4=w71^>N$JED1Nfr<=5^SA%KJtV{mTG;J_tPgYXuJe4zyj< y0MR3~z|`NH&pCEWAB=MXDc5Ac%EbTc executeQuery(Query query) throws Exception { + public List executeQuery(com.idcanet.xtes.xpql.query.Query query) throws Exception { try { - /* - Query q = Hibernate3Factory.getSession("flowstats").createQuery(query.toString()); - q.setMaxResults(crudTable.getQueryLimit()); - if(crudTable.getViewOnly()) { - q.setReadOnly(true); - } - for(CrudParameterOption para:crudTable.getQueryParameterOptions().values()) { - if(para.getValueHolder().getValue()==null) { - logger.finer("Value is null of parameter: "+para.getName()); - return; - } - try { - Object value = para.getValueHolder().getValue(); - logger.finer("Setting parameter: "+para.getName()+" with: "+value); - if(para.getValueProperty()!=null) { - q.setParameter(para.getName(),BeanUtils.getValue(value,BeanUtils.getPropertyDescriptor(value,para.getValueProperty()))); - } else { - q.setParameter(para.getName(),value); - } - } catch (Exception e) { - logger.log(Level.WARNING,e.getMessage(),e); - } - } + Query q = Hibernate3Factory.getSession(getSession()).createQuery(query.toPreparedSQL(query)); + + List values = query.getOrderQueryParameterValues(); + int i = 0; + for (QueryParameterValue value:values) { + q.setParameter(i,value.getValue()); + i++; + } List data = q.list(); - logger.info("Query returned: "+data.size()+" of: "+crudTable.getQueryName()); - crudTable.getSelectionInList().setList(data); - */ - return null; + //logger.info("Query returned: "+data.size()+" of: "+crudTable.getQueryName()); + return data; } finally { Hibernate3Factory.getSession("flowstats").close(); // close session in threads } diff --git a/src/com/idcanet/vasc/impl/swt/SwtVascViewRenderer.java b/src/com/idcanet/vasc/impl/swt/SwtVascViewRenderer.java index 9ac62b3..e5f607e 100644 --- a/src/com/idcanet/vasc/impl/swt/SwtVascViewRenderer.java +++ b/src/com/idcanet/vasc/impl/swt/SwtVascViewRenderer.java @@ -31,10 +31,15 @@ import java.util.Collections; import java.util.List; import java.util.logging.Logger; +import org.eclipse.jface.viewers.ILabelProviderListener; +import org.eclipse.jface.viewers.IStructuredContentProvider; +import org.eclipse.jface.viewers.ITableLabelProvider; import org.eclipse.jface.viewers.TableViewer; +import org.eclipse.jface.viewers.Viewer; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.Font; +import org.eclipse.swt.graphics.Image; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.widgets.Button; @@ -51,10 +56,6 @@ import com.idcanet.vasc.core.VascViewRenderer; import com.idcanet.vasc.core.actions.RowVascAction; import com.idcanet.vasc.core.column.VascTableColumn; -import fr.jayasoft.binding.jface.adapter.JFaceComponentFactory; -import fr.jayasoft.binding.jface.utils.table.AbstractColumn; -import fr.jayasoft.binding.jface.utils.table.PropertyColumn; - /** * * @author Willem Cazander @@ -72,6 +73,14 @@ public class SwtVascViewRenderer implements VascViewRenderer { } public void renderView(VascTable table) { + + try { + table.setTableData(table.getVascDataSource().executeQuery(table.getQuery())); + } catch (Exception e) { + e.printStackTrace(); + } + + this.table=table; GridLayout layout = new GridLayout(); layout.marginHeight = 0; @@ -143,12 +152,29 @@ public class SwtVascViewRenderer implements VascViewRenderer { public void createBody(Composite body) { logger.finer("Creating body"); - final TableViewer tableViewer = JFaceComponentFactory.createTableViewer(body,table.getSelectionInList(),getTableColumns(crudTable),false); + //final TableViewer tableViewer = JFaceComponentFactory.createTableViewer(body,table.getSelectionInList(),getTableColumns(crudTable),false); + // Create the table viewer to display the players + final TableViewer tableViewer = new TableViewer(body); final Table table2 = tableViewer.getTable(); table2.setLayoutData(new GridData(GridData.FILL_BOTH)); table2.setHeaderVisible(true); table2.setLinesVisible(true); + // Set the content and label providers + tableViewer.setContentProvider(new ListConverterContentProvider()); + tableViewer.setLabelProvider(new DefaultLabelProvider(table)); + //tv.setSorter(new PlayerViewerSorter()); + tableViewer.setInput(table); + + for(VascTableColumn c:table.getTableColumns()) { + TableColumn tc = new TableColumn(table2, SWT.LEFT); + tc.setText(c.getName()); + tc.setToolTipText(c.getToolTip()); + tc.setMoveable(false); + tc.setResizable(true); + } + + //Add sort indicator and sort data when column selected Listener sortListener = new Listener() { public void handleEvent(Event e) { @@ -200,6 +226,7 @@ public class SwtVascViewRenderer implements VascViewRenderer { logger.fine("Table with columns created: "+table2.getColumnCount()); } + /* private static AbstractColumn[] getTableColumns(VascTable crudTable) { AbstractColumn[] cols = new AbstractColumn[crudTable.getCrudTableColumns().size()]; int i=0; @@ -212,7 +239,7 @@ public class SwtVascViewRenderer implements VascViewRenderer { i++; } return cols; - } + }*/ public void createFooter(Composite footer) { logger.finest("Creating footer"); @@ -232,5 +259,86 @@ public class SwtVascViewRenderer implements VascViewRenderer { * Is called when all createPartControl is done with creating Parts */ public void partCreated() { + + } + + class DefaultLabelProvider implements ITableLabelProvider { + + private VascTable table = null; + + public DefaultLabelProvider(VascTable table) { + this.table=table; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnImage(java.lang.Object, int) + */ + public Image getColumnImage(Object arg0, int arg1) { + return null; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.ITableLabelProvider#getColumnText(java.lang.Object, int) + */ + public String getColumnText(Object bean, int columnNumber) { + System.out.println("Rending column; "+columnNumber+" bean: "+bean); + VascTableColumn vtc = table.getTableColumns().get(columnNumber); + if (vtc.getColumnRenderer()!=null) { + //do iets + return "RENDER"; + } else { + return ""+vtc.getVascColumnValue().getValue(vtc,bean); + } + + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IBaseLabelProvider#addListener(org.eclipse.jface.viewers.ILabelProviderListener) + */ + public void addListener(ILabelProviderListener arg0) { + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IBaseLabelProvider#dispose() + */ + public void dispose() { + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IBaseLabelProvider#isLabelProperty(java.lang.Object, java.lang.String) + */ + public boolean isLabelProperty(Object arg0, String arg1) { + return false; + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IBaseLabelProvider#removeListener(org.eclipse.jface.viewers.ILabelProviderListener) + */ + public void removeListener(ILabelProviderListener arg0) { + } + + } + + class ListConverterContentProvider implements IStructuredContentProvider { + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object) + */ + public Object[] getElements(Object obj) { + return ((VascTable)obj).getTableData().toArray(); + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IContentProvider#dispose() + */ + public void dispose() { + } + + /* (non-Javadoc) + * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) + */ + public void inputChanged(Viewer arg0, Object arg1, Object arg2) { + } + } } \ No newline at end of file diff --git a/tests/com/idcanet/vasc/tests/SimpleTest.java b/tests/com/idcanet/vasc/tests/SimpleTest.java index e26a7f5..279d505 100644 --- a/tests/com/idcanet/vasc/tests/SimpleTest.java +++ b/tests/com/idcanet/vasc/tests/SimpleTest.java @@ -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()) {