-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathframe3.java
More file actions
201 lines (172 loc) · 5.63 KB
/
Copy pathframe3.java
File metadata and controls
201 lines (172 loc) · 5.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
import java.awt.BorderLayout;
import java.awt.EventQueue;
import java.awt.Graphics;
import java.awt.Graphics2D;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.UIManager;
import javax.swing.border.EmptyBorder;
import javax.swing.JButton;
import javax.swing.JTextField;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.geom.Ellipse2D;
import javax.swing.JTree;
import java.awt.Color;
import javax.swing.tree.DefaultTreeModel;
import javax.swing.tree.DefaultMutableTreeNode;
import java.awt.Canvas;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import javax.swing.JProgressBar;
public class frame3 extends JFrame {
private JPanel contentPane;
private JTextField textField;
/**
* Launch the application.
*/
// public static void main(String[] args) {
//
// try{
// UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
// }
// catch(Exception e){
// e.printStackTrace();
// }
//
// EventQueue.invokeLater(new Runnable() {
// public void run() {
// try {
// frame3 frame = new frame3();
// frame.setVisible(true);
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
// });
// }
/**
* Create the frame.
*/
public frame3(frame2 frame2_temp) {
frame3 frame3_temp = this;
frame4 frame_4 = new frame4(frame3_temp);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(200, 200, 600, 384);
contentPane = new JPanel();
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
/*JScrollPane scrollPane = new JScrollPane();
scrollPane.setBounds(106, 14, 345, 286);
contentPane.add(scrollPane);
JTextArea textArea1 = new JTextArea();
scrollPane.setViewportView(textArea1);
*/
JButton btnNewButton = new JButton("Back");
btnNewButton.setToolTipText("Go back to the previous pannel");
btnNewButton.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
frame3_temp.setVisible(false);
frame2_temp.setVisible(true);
}
});
btnNewButton.setBounds(10, 30, 89, 23);
contentPane.add(btnNewButton);
JButton btnNewButton_1 = new JButton("PHPUnit");
btnNewButton_1.setToolTipText("Run whole test suite");
btnNewButton_1.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
try {
Process p = Runtime.getRuntime().exec("cmd /c phpunit");
p.waitFor();
frame_4.setVisible(true);
// BufferedReader reader = new BufferedReader(
// new InputStreamReader(p.getInputStream()));
// textArea.setText("");
// String line = reader.readLine();
// while (line != null) {
//// System.out.println(line);
// textArea.append(line+"\n");
// line = reader.readLine();
// }
} catch (Exception e1) {
// TODO Auto-generated catch block
JOptionPane.showMessageDialog(frame3_temp,
"Eggs are not supposed to be green.",
"Inane error",
JOptionPane.ERROR_MESSAGE);
}
}
});
btnNewButton_1.setBounds(10, 110, 89, 23);
contentPane.add(btnNewButton_1);
JButton btnNewButton_4 = new JButton("Open");
btnNewButton_4.setToolTipText("Open file or folder");
btnNewButton_4.setBounds(10, 144, 89, 23);
contentPane.add(btnNewButton_4);
JButton btnNewButton_2 = new JButton("Run");
btnNewButton_2.setToolTipText("To run a Test file");
btnNewButton_2.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
btnNewButton_2.setBounds(10, 179, 89, 23);
contentPane.add(btnNewButton_2);
JButton btnNewButton_3 = new JButton("Report");
btnNewButton_3.setToolTipText("Go to the Report webPage");
btnNewButton_3.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
String URL = "http://localhost/gsoc/tests/system/webdriver/tests/report/";
try {
java.awt.Desktop.getDesktop().browse(java.net.URI.create(URL));
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
JOptionPane.showMessageDialog(frame3_temp, "Webpage not present");
}
}
});
btnNewButton_3.setBounds(10, 214, 89, 23);
contentPane.add(btnNewButton_3);
JButton btnNewButton_5 = new JButton("Test Log");
btnNewButton_2.setToolTipText("View the Test log");
btnNewButton_5.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
frame_4.setVisible(true);
}
});
btnNewButton_5.setBounds(10, 249, 89, 23);
contentPane.add(btnNewButton_5);
JButton btnNewButton_6 = new JButton("Selenium");
btnNewButton_6.setBounds(463, 30, 89, 23);
contentPane.add(btnNewButton_6);
// Graphics g = null;
// Graphics2D g2d = (Graphics2D) g;
// g2d.setColor(Color.RED);
// g2d.fillOval(521, 33, 92, 23);
//
JButton btnNewButton_7 = new JButton("Xampp");
btnNewButton_7.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
btnNewButton_7.setBounds(463, 65, 89, 23);
contentPane.add(btnNewButton_7);
JButton btnNewButton_8 = new JButton("Test");
btnNewButton_8.setBounds(463, 100, 89, 23);
contentPane.add(btnNewButton_8);
JTree tree = new JTree();
tree.setBackground(UIManager.getColor("ArrowButton.background"));
tree.setBounds(105, 30, 353, 275);
contentPane.add(tree);
JProgressBar progressBar = new JProgressBar();
progressBar.setBounds(105, 317, 353, 19);
contentPane.add(progressBar);
}
}