Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / ResultsInfoComposite.java
1 /*************************************************************************
2  * @author Ali Echihabi (ali_echihabi@ieee.org, ali.echihabi@souss.ca)
3  *
4  * Plugin for PHP unit Testing.
5  * www.phpeclipse.de
6  * 
7  *************************************************************************/
8
9 package net.sourceforge.phpeclipse.phpunit;
10
11 import net.sourceforge.phpeclipse.phpunit.testpool.TestPool;
12
13 import org.eclipse.jface.viewers.TreeViewer;
14 import org.eclipse.swt.SWT;
15 import org.eclipse.swt.layout.GridData;
16 import org.eclipse.swt.layout.GridLayout;
17 import org.eclipse.swt.widgets.Composite;
18
19 public class ResultsInfoComposite extends Composite {
20
21         private TreeViewer treeViewer;
22
23         /**
24          * @param arg0
25          * @param arg1
26          */
27         public ResultsInfoComposite(Composite parent) {
28
29                 super(parent, SWT.BORDER);
30
31                 GridLayout layout = new GridLayout();
32                 layout.numColumns = 1;
33
34                 setLayout(layout);
35
36                 treeViewer = new TreeViewer(this, SWT.BORDER | SWT.SHADOW_ETCHED_IN);
37
38                 treeViewer.getControl().setLayoutData(
39                                 new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.FILL_BOTH
40                                                 | GridData.GRAB_VERTICAL));
41
42                 TestPoolLabelProvider labelProvider = new TestPoolLabelProvider();
43                 TestPoolContentProvider contentProvider = new TestPoolContentProvider();
44
45                 treeViewer.setContentProvider(contentProvider);
46                 treeViewer.setLabelProvider(labelProvider);
47
48         }
49
50         public void resetInfo() {
51
52                 treeViewer.setInput(null);
53         }
54
55         public void updateInfo(TestPool testPool) {
56
57                 // take care of the TreeView and its content and label providers.
58
59                 treeViewer.setInput(testPool.getRoot());
60
61         }
62
63 }