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