-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBtnHandler.java
More file actions
46 lines (42 loc) · 1.58 KB
/
Copy pathBtnHandler.java
File metadata and controls
46 lines (42 loc) · 1.58 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
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
/**
*
* @author Baqir 4.2.0
*/
public class BtnHandler implements ActionListener {
MainGUI gui;
MainGUIController mainCont;
public BtnHandler(MainGUI gui, MainGUIController mainCont) {
this.gui = gui;
this.mainCont = mainCont;
}
@Override
public void actionPerformed(ActionEvent ae) {
System.out.println(ae.getActionCommand());
if (ae.getActionCommand().equals("GO") || ae.getActionCommand().equals("address"))
mainCont.goAndAddressPressed(gui.tfAddres.getText());
if (ae.getActionCommand().equals("back"))
mainCont.back();
if (ae.getActionCommand().equals("forward"))
mainCont.forward();
if (ae.getActionCommand().equals("addfav"))
mainCont.addFav();
if (ae.getActionCommand().equals("home"))
mainCont.home();
if (ae.getActionCommand().equals("refresh"))
mainCont.refresh();
if (ae.getActionCommand().equals("history"))
mainCont.history();
if (ae.getActionCommand().equals("favorities"))
mainCont.favorities();
if (ae.getActionCommand().equals("Set Homepage"))
mainCont.setHome();
if (ae.getActionCommand().equals("firewall"))
mainCont.addFirewall();
if (ae.getActionCommand().equals("manage firewall"))
mainCont.manageFirewall();
if (ae.getActionCommand().equals("search"))
mainCont.search();
}
}