2 * Created on Jul 31, 2004
4 * To change the template for this generated file go to
5 * Window>Preferences>Java>Code Generation>Code and Comments
7 package net.sourceforge.phpeclipse.phpunit;
9 import net.sourceforge.phpeclipse.phpunit.testpool.TestPool;
11 import org.eclipse.jface.viewers.TreeViewer;
12 import org.eclipse.swt.SWT;
13 import org.eclipse.swt.layout.GridData;
14 import org.eclipse.swt.layout.GridLayout;
15 import org.eclipse.swt.widgets.Composite;
18 * @author Ali Echihabi
20 * To change the template for this generated type comment go to
21 * Window>Preferences>Java>Code Generation>Code and Comments
23 public class ResultsInfoComposite extends Composite {
27 private TreeViewer treeViewer;
33 public ResultsInfoComposite(Composite parent) {
35 super(parent, SWT.BORDER);
37 GridLayout layout = new GridLayout();
38 layout.numColumns = 1;
42 treeViewer = new TreeViewer(this, SWT.BORDER | SWT.SHADOW_ETCHED_IN);
44 treeViewer.getControl().setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_BOTH | GridData.GRAB_VERTICAL));
47 TestPoolLabelProvider labelProvider = new TestPoolLabelProvider();
48 TestPoolContentProvider contentProvider= new TestPoolContentProvider();
50 treeViewer.setContentProvider(contentProvider);
51 treeViewer.setLabelProvider(labelProvider);
56 public void resetInfo() {
58 treeViewer.setInput(null);
61 public void updateInfo(TestPool testPool) {
63 // take care of the TreeView and its content and label providers.
65 treeViewer.setInput(testPool.getRoot());