Since 3.1 not in use
[phpeclipse.git] / net.sourceforge.phpeclipse.phpunit / src / net / sourceforge / phpeclipse / phpunit / SettingsInfoComposite.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
10 package net.sourceforge.phpeclipse.phpunit;
11
12 import org.eclipse.swt.SWT;
13 import org.eclipse.swt.events.MouseEvent;
14 import org.eclipse.swt.events.MouseListener;
15 import org.eclipse.swt.widgets.Button;
16 import org.eclipse.swt.widgets.Composite;
17 import org.eclipse.swt.widgets.FileDialog;
18
19
20
21 public class SettingsInfoComposite extends Composite {
22
23         FileDialog dialog;
24         Button button;
25         
26         String testSuitePath;
27
28         /**
29          * @param arg0
30          * @param arg1
31          */
32         public SettingsInfoComposite(Composite parent, int style) {
33                 
34                 super(parent, style);
35                 
36                 dialog = new FileDialog(parent.getShell());
37                 
38                 button = new Button(parent, SWT.NONE);
39                 button.setText("Browser for test...");
40                 
41                 button.addMouseListener(new MouseListener() {
42                         public void mouseDoubleClick(MouseEvent arg0) {
43                                 // TODO Auto-generated method stub
44
45                         }
46
47                         public void mouseDown(MouseEvent arg0) {
48                         
49                                 testSuitePath = dialog.open();
50                                 System.out.println("file: " + testSuitePath);
51
52                         }
53
54                         public void mouseUp(MouseEvent arg0) {
55                                 // TODO Auto-generated method stub
56
57                         }
58                 });
59                 
60                 
61                 
62                 
63                 
64         }
65         
66         
67         public String getTestSuite() {
68                 
69                 return testSuitePath;
70         }
71
72
73         /**
74          * 
75          */
76         protected void showFileDialog() {
77                 
78                 testSuitePath = dialog.open();
79                 System.out.println("file: " + testSuitePath);
80                 
81                 
82         }
83         
84         
85
86 }