new class to manage icons. Showing failures,etc on a test suite.
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / SettingsInfoComposite.java
1 /*
2  * Created on Sep 11, 2004
3  *
4  * To change the template for this generated file go to
5  * Window>Preferences>Java>Code Generation>Code and Comments
6  */
7 package net.sourceforge.phpeclipse.phpunit;
8
9 import org.eclipse.swt.SWT;
10 import org.eclipse.swt.events.MouseEvent;
11 import org.eclipse.swt.events.MouseListener;
12 import org.eclipse.swt.widgets.Button;
13 import org.eclipse.swt.widgets.Composite;
14 import org.eclipse.swt.widgets.FileDialog;
15
16 /**
17  * @author Ali Echihabi
18  *
19  * To change the template for this generated type comment go to
20  * Window>Preferences>Java>Code Generation>Code and Comments
21  */
22 public class SettingsInfoComposite extends Composite {
23
24         FileDialog dialog;
25         Button button;
26         
27         String testSuitePath;
28
29         /**
30          * @param arg0
31          * @param arg1
32          */
33         public SettingsInfoComposite(Composite parent, int style) {
34                 
35                 super(parent, style);
36                 
37                 dialog = new FileDialog(parent.getShell());
38                 
39                 button = new Button(parent, SWT.NONE);
40                 button.setText("Browser for test...");
41                 
42                 button.addMouseListener(new MouseListener() {
43                         public void mouseDoubleClick(MouseEvent arg0) {
44                                 // TODO Auto-generated method stub
45
46                         }
47
48                         public void mouseDown(MouseEvent arg0) {
49                         
50                                 testSuitePath = dialog.open();
51                                 System.out.println("file: " + testSuitePath);
52
53                         }
54
55                         public void mouseUp(MouseEvent arg0) {
56                                 // TODO Auto-generated method stub
57
58                         }
59                 });
60                 
61                 
62                 
63                 
64                 
65         }
66         
67         
68         public String getTestSuite() {
69                 
70                 return testSuitePath;
71         }
72
73
74         /**
75          * 
76          */
77         protected void showFileDialog() {
78                 
79                 testSuitePath = dialog.open();
80                 System.out.println("file: " + testSuitePath);
81                 
82                 
83         }
84         
85         
86
87 }