提交 | 用户 | 时间
|
149dd0
|
1 |
package com.iailab.netsdk.common; |
H |
2 |
|
|
3 |
import java.awt.BorderLayout; |
|
4 |
import java.awt.GridLayout; |
|
5 |
import java.awt.event.ActionEvent; |
|
6 |
import java.awt.event.ActionListener; |
|
7 |
import java.awt.event.WindowAdapter; |
|
8 |
import java.awt.event.WindowEvent; |
|
9 |
|
|
10 |
import javax.swing.JButton; |
|
11 |
import javax.swing.JFrame; |
|
12 |
import javax.swing.JPanel; |
|
13 |
import javax.swing.SwingUtilities; |
|
14 |
import javax.swing.border.EmptyBorder; |
|
15 |
import com.iailab.netsdk.demo.frame.*; |
|
16 |
import com.iailab.netsdk.demo.frame.Attendance.Attendance; |
|
17 |
import com.iailab.netsdk.demo.frame.AutoRegister.AutoRegister; |
|
18 |
import com.iailab.netsdk.demo.frame.TargetRecognition.NewLatticeScreen; |
|
19 |
import com.iailab.netsdk.demo.frame.Gate.Gate; |
|
20 |
import com.iailab.netsdk.demo.frame.TargetRecognition.TargetRecognition; |
|
21 |
import com.iailab.netsdk.demo.frame.ThermalCamera.ThermalCamera; |
|
22 |
import com.iailab.netsdk.demo.frame.scada.SCADADemo; |
|
23 |
import com.iailab.netsdk.demo.frame.vto.VTODemo; |
|
24 |
|
|
25 |
/** |
|
26 |
* 功能列表界面 |
|
27 |
*/ |
|
28 |
public class FunctionList extends JFrame { |
|
29 |
private static final long serialVersionUID = 1L; |
|
30 |
|
|
31 |
public FunctionList() { |
|
32 |
setTitle(Res.string().getFunctionList()); |
|
33 |
setLayout(new BorderLayout()); |
|
34 |
pack(); |
|
35 |
setSize(450, 300); |
|
36 |
setResizable(false); |
|
37 |
setLocationRelativeTo(null); |
|
38 |
|
|
39 |
add(new FunctionPanel(), BorderLayout.CENTER); |
|
40 |
|
|
41 |
addWindowListener(new WindowAdapter() { |
|
42 |
public void windowClosing(WindowEvent e) { |
|
43 |
dispose(); |
|
44 |
System.exit(0); |
|
45 |
} |
|
46 |
}); |
|
47 |
} |
|
48 |
|
|
49 |
public class FunctionPanel extends JPanel { |
|
50 |
private static final long serialVersionUID = 1L; |
|
51 |
|
|
52 |
public FunctionPanel() { |
|
53 |
setLayout(new GridLayout(9, 2)); |
|
54 |
|
|
55 |
setBorder(new EmptyBorder(30, 50, 0, 50)); |
|
56 |
|
|
57 |
faceRecognitionBtn = new JButton(Res.string().getTargetRecognition()); |
|
58 |
gateBtn = new JButton(Res.string().getGate()); |
|
59 |
capturePictureBtn = new JButton(Res.string().getCapturePicture()); |
|
60 |
realPlayBtn = new JButton(Res.string().getRealplay()); |
|
61 |
itsEventBtn = new JButton(Res.string().getITSEvent()); |
|
62 |
downloadBtn = new JButton(Res.string().getDownloadRecord()); |
|
63 |
talkBtn = new JButton(Res.string().getTalk()); |
|
64 |
deviceSearchAndInitBtn = new JButton(Res.string().getDeviceSearchAndInit()); |
|
65 |
ptzBtn = new JButton(Res.string().getPTZ()); |
|
66 |
deviceCtlBtn = new JButton(Res.string().getDeviceControl()); |
|
67 |
alarmListenBtn = new JButton(Res.string().getAlarmListen()); |
|
68 |
autoRegisterBtn = new JButton(Res.string().getAutoRegister()); |
|
69 |
attendanceBtn = new JButton(Res.string().getAttendance()); |
|
70 |
thermalCameraBtn = new JButton(Res.string().getThermalCamera()); |
|
71 |
matrixScreenBtn = new JButton(Res.string().getmatrixScreen()); |
|
72 |
humanNumberStatisticBtn = new JButton(Res.string().getHumanNumberStatistic()); |
|
73 |
vtoBtn = new JButton(Res.string().getVTO()); |
|
74 |
|
|
75 |
SCADABtn = new JButton(Res.string().getSCADA()); |
|
76 |
|
|
77 |
trafficAllowListBtn = new JButton(Res.string().getTrafficAllowList()); |
|
78 |
|
|
79 |
|
|
80 |
add(gateBtn); |
|
81 |
add(faceRecognitionBtn); |
|
82 |
add(deviceSearchAndInitBtn); |
|
83 |
add(ptzBtn); |
|
84 |
add(realPlayBtn); |
|
85 |
add(capturePictureBtn); |
|
86 |
add(talkBtn); |
|
87 |
add(itsEventBtn); |
|
88 |
add(downloadBtn); |
|
89 |
add(deviceCtlBtn); |
|
90 |
add(alarmListenBtn); |
|
91 |
add(autoRegisterBtn); |
|
92 |
//add(attendanceBtn); |
|
93 |
add(thermalCameraBtn); |
|
94 |
add(matrixScreenBtn); |
|
95 |
add(humanNumberStatisticBtn); |
|
96 |
add(vtoBtn); |
|
97 |
add(SCADABtn); |
|
98 |
add(trafficAllowListBtn); |
|
99 |
gateBtn.addActionListener(new ActionListener() { |
|
100 |
@Override |
|
101 |
public void actionPerformed(ActionEvent arg0) { |
|
102 |
SwingUtilities.invokeLater(new Runnable() { |
|
103 |
public void run() { |
|
104 |
dispose(); |
|
105 |
Gate.main(null); |
|
106 |
} |
|
107 |
}); |
|
108 |
} |
|
109 |
}); |
|
110 |
|
|
111 |
faceRecognitionBtn.addActionListener(new ActionListener() { |
|
112 |
@Override |
|
113 |
public void actionPerformed(ActionEvent arg0) { |
|
114 |
SwingUtilities.invokeLater(new Runnable() { |
|
115 |
public void run() { |
|
116 |
dispose(); |
|
117 |
TargetRecognition.main(null); |
|
118 |
} |
|
119 |
}); |
|
120 |
} |
|
121 |
}); |
|
122 |
|
|
123 |
|
|
124 |
capturePictureBtn.addActionListener(new ActionListener() { |
|
125 |
@Override |
|
126 |
public void actionPerformed(ActionEvent arg0) { |
|
127 |
SwingUtilities.invokeLater(new Runnable() { |
|
128 |
public void run() { |
|
129 |
dispose(); |
|
130 |
CapturePicture.main(null); |
|
131 |
} |
|
132 |
}); |
|
133 |
} |
|
134 |
}); |
|
135 |
|
|
136 |
realPlayBtn.addActionListener(new ActionListener() { |
|
137 |
@Override |
|
138 |
public void actionPerformed(ActionEvent arg0) { |
|
139 |
SwingUtilities.invokeLater(new Runnable() { |
|
140 |
public void run() { |
|
141 |
dispose(); |
|
142 |
RealPlay.main(null); |
|
143 |
} |
|
144 |
}); |
|
145 |
} |
|
146 |
}); |
|
147 |
|
|
148 |
downloadBtn.addActionListener(new ActionListener() { |
|
149 |
@Override |
|
150 |
public void actionPerformed(ActionEvent arg0) { |
|
151 |
SwingUtilities.invokeLater(new Runnable() { |
|
152 |
public void run() { |
|
153 |
dispose(); |
|
154 |
DownLoadRecord.main(null); |
|
155 |
} |
|
156 |
}); |
|
157 |
} |
|
158 |
}); |
|
159 |
|
|
160 |
talkBtn.addActionListener(new ActionListener() { |
|
161 |
@Override |
|
162 |
public void actionPerformed(ActionEvent arg0) { |
|
163 |
SwingUtilities.invokeLater(new Runnable() { |
|
164 |
public void run() { |
|
165 |
dispose(); |
|
166 |
Talk.main(null); |
|
167 |
} |
|
168 |
}); |
|
169 |
} |
|
170 |
}); |
|
171 |
|
|
172 |
itsEventBtn.addActionListener(new ActionListener() { |
|
173 |
@Override |
|
174 |
public void actionPerformed(ActionEvent arg0) { |
|
175 |
SwingUtilities.invokeLater(new Runnable() { |
|
176 |
public void run() { |
|
177 |
dispose(); |
|
178 |
TrafficEvent.main(null); |
|
179 |
} |
|
180 |
}); |
|
181 |
} |
|
182 |
}); |
|
183 |
|
|
184 |
deviceSearchAndInitBtn.addActionListener(new ActionListener() { |
|
185 |
@Override |
|
186 |
public void actionPerformed(ActionEvent arg0) { |
|
187 |
SwingUtilities.invokeLater(new Runnable() { |
|
188 |
public void run() { |
|
189 |
dispose(); |
|
190 |
DeviceSearchAndInit.main(null); |
|
191 |
} |
|
192 |
}); |
|
193 |
} |
|
194 |
}); |
|
195 |
|
|
196 |
ptzBtn.addActionListener(new ActionListener() { |
|
197 |
@Override |
|
198 |
public void actionPerformed(ActionEvent arg0) { |
|
199 |
SwingUtilities.invokeLater(new Runnable() { |
|
200 |
public void run() { |
|
201 |
dispose(); |
|
202 |
PTZControl.main(null); |
|
203 |
} |
|
204 |
}); |
|
205 |
} |
|
206 |
}); |
|
207 |
|
|
208 |
deviceCtlBtn.addActionListener(new ActionListener() { |
|
209 |
@Override |
|
210 |
public void actionPerformed(ActionEvent arg0) { |
|
211 |
SwingUtilities.invokeLater(new Runnable() { |
|
212 |
public void run() { |
|
213 |
dispose(); |
|
214 |
DeviceControl.main(null); |
|
215 |
} |
|
216 |
}); |
|
217 |
} |
|
218 |
}); |
|
219 |
|
|
220 |
alarmListenBtn.addActionListener(new ActionListener() { |
|
221 |
@Override |
|
222 |
public void actionPerformed(ActionEvent arg0) { |
|
223 |
SwingUtilities.invokeLater(new Runnable() { |
|
224 |
public void run() { |
|
225 |
dispose(); |
|
226 |
AlarmListen.main(null); |
|
227 |
} |
|
228 |
}); |
|
229 |
} |
|
230 |
}); |
|
231 |
|
|
232 |
autoRegisterBtn.addActionListener(new ActionListener() { |
|
233 |
@Override |
|
234 |
public void actionPerformed(ActionEvent arg0) { |
|
235 |
SwingUtilities.invokeLater(new Runnable() { |
|
236 |
public void run() { |
|
237 |
dispose(); |
|
238 |
AutoRegister.main(null); |
|
239 |
} |
|
240 |
}); |
|
241 |
} |
|
242 |
}); |
|
243 |
|
|
244 |
attendanceBtn.addActionListener(new ActionListener() { |
|
245 |
@Override |
|
246 |
public void actionPerformed(ActionEvent arg0) { |
|
247 |
SwingUtilities.invokeLater(new Runnable() { |
|
248 |
public void run() { |
|
249 |
dispose(); |
|
250 |
Attendance.main(null); |
|
251 |
} |
|
252 |
}); |
|
253 |
} |
|
254 |
}); |
|
255 |
|
|
256 |
thermalCameraBtn.addActionListener(new ActionListener() { |
|
257 |
@Override |
|
258 |
public void actionPerformed(ActionEvent arg0) { |
|
259 |
SwingUtilities.invokeLater(new Runnable() { |
|
260 |
public void run() { |
|
261 |
dispose(); |
|
262 |
ThermalCamera.main(null); |
|
263 |
} |
|
264 |
}); |
|
265 |
} |
|
266 |
}); |
|
267 |
|
|
268 |
|
|
269 |
matrixScreenBtn.addActionListener(new ActionListener() { |
|
270 |
@Override public void actionPerformed(ActionEvent e) { |
|
271 |
SwingUtilities.invokeLater(new Runnable() { |
|
272 |
public void run() |
|
273 |
{ |
|
274 |
dispose(); |
|
275 |
NewLatticeScreen.main(null); |
|
276 |
} |
|
277 |
}); |
|
278 |
} |
|
279 |
}); |
|
280 |
|
|
281 |
|
|
282 |
humanNumberStatisticBtn.addActionListener(new ActionListener() { |
|
283 |
|
|
284 |
@Override public void actionPerformed(ActionEvent e) { |
|
285 |
SwingUtilities.invokeLater(new Runnable() { |
|
286 |
public void run() |
|
287 |
{ |
|
288 |
dispose(); |
|
289 |
HumanNumberStatistic.main(null); |
|
290 |
} |
|
291 |
}); |
|
292 |
} |
|
293 |
}); |
|
294 |
vtoBtn.addActionListener(new ActionListener() { |
|
295 |
@Override |
|
296 |
public void actionPerformed(ActionEvent e) { |
|
297 |
SwingUtilities.invokeLater(new Runnable() { |
|
298 |
@Override |
|
299 |
public void run() { |
|
300 |
dispose(); |
|
301 |
VTODemo.main(null); |
|
302 |
} |
|
303 |
}); |
|
304 |
} |
|
305 |
}); |
|
306 |
|
|
307 |
SCADABtn.addActionListener(new ActionListener() { |
|
308 |
@Override |
|
309 |
public void actionPerformed(ActionEvent e) { |
|
310 |
SwingUtilities.invokeLater(new Runnable() { |
|
311 |
@Override |
|
312 |
public void run() { |
|
313 |
dispose(); |
|
314 |
SCADADemo.main(null); |
|
315 |
} |
|
316 |
}); |
|
317 |
} |
|
318 |
}); |
|
319 |
|
|
320 |
trafficAllowListBtn.addActionListener(new ActionListener() { |
|
321 |
@Override |
|
322 |
public void actionPerformed(ActionEvent e) { |
|
323 |
SwingUtilities.invokeLater(new Runnable() { |
|
324 |
public void run() { |
|
325 |
dispose(); |
|
326 |
TrafficAllowList.main(null); |
|
327 |
} |
|
328 |
}); |
|
329 |
} |
|
330 |
}); |
|
331 |
|
|
332 |
|
|
333 |
} |
|
334 |
|
|
335 |
/* |
|
336 |
* 功能列表组件 |
|
337 |
*/ |
|
338 |
private JButton faceRecognitionBtn; |
|
339 |
private JButton capturePictureBtn; |
|
340 |
private JButton realPlayBtn; |
|
341 |
private JButton downloadBtn; |
|
342 |
private JButton itsEventBtn; |
|
343 |
private JButton talkBtn; |
|
344 |
private JButton deviceSearchAndInitBtn; |
|
345 |
private JButton ptzBtn; |
|
346 |
private JButton deviceCtlBtn; |
|
347 |
private JButton alarmListenBtn; |
|
348 |
private JButton autoRegisterBtn; |
|
349 |
private JButton attendanceBtn; |
|
350 |
private JButton gateBtn; |
|
351 |
private JButton thermalCameraBtn; |
|
352 |
private JButton matrixScreenBtn; |
|
353 |
private JButton humanNumberStatisticBtn; |
|
354 |
private JButton vtoBtn; |
|
355 |
|
|
356 |
/** |
|
357 |
* 动环主机按钮 |
|
358 |
*/ |
|
359 |
private JButton SCADABtn; |
|
360 |
|
|
361 |
/** |
|
362 |
* 允许名单注册 |
|
363 |
*/ |
|
364 |
private JButton trafficAllowListBtn; |
|
365 |
} |
|
366 |
} |