1 | public void menuSelected(MenuEvent e)↵ | | 1 | public void menuSelected(MenuEvent e)↵
|
2 | {↵ | | 2 | {↵
|
3 | construct();↵ | | 3 | construct();↵
|
4 | } //}}}↵ | | 4 | } //}}}↵
|
5 | ↵ | | 5 | ↵
|
6 | //{{{ menuDeselected() method↵ | | 6 | //{{{ menuDeselected() method↵
|
7 | public void menuDeselected(MenuEvent e)↵ | | 7 | public void menuDeselected(MenuEvent e)↵
|
8 | {↵ | | 8 | {↵
|
9 | removeAll();↵ | | 9 | removeAll();↵
|
10 | } //}}}↵ | | 10 | } //}}}↵
|
11 | ↵ | | 11 | ↵
|
12 | //{{{ menuCanceled() method↵ | | 12 | //{{{ menuCanceled() method↵
|
13 | public void menuCanceled(MenuEvent e)↵ | | 13 | public void menuCanceled(MenuEvent e)↵
|
14 | {↵ | | 14 | {↵
|
15 | } //}}}↵ | | 15 | } //}}}↵
|
16 | ↵ | | 16 | ↵
|
17 | //{{{ ShowRecentDirMenuItem class↵ | | 17 | //{{{ ShowRecentMenuItem class↵
|
18 | class ShowRecentDirMenuItem extends JMenuItem↵ | | 18 | class ShowRecentMenuItem extends JMenuItem↵
|
19 | {↵ | | 19 | {↵
|
20 | String path;↵ | | 20 | String path;↵
|
21 | ↵ | | 21 | ↵
|
22 | public ShowRecentDirMenuItem(String name, String path)↵ | | 22 | public ShowRecentMenuItem(String name, String path)↵
|
23 | {↵ | | 23 | {↵
|
24 | super(name);↵ | | 24 | super(name);↵
|
25 | this.path = path;↵ | | 25 | this.path = path;↵
|
26 | addActionListener(new ShowFileAction());↵ | | 26 | addActionListener(new ShowFileAction());↵
|
27 | }↵ | | 27 | }↵
|
28 | ↵ | | 28 | ↵
|
29 | class ShowFileAction implements ActionListener↵ | | 29 | class ShowFileAction implements ActionListener↵
|
30 | {↵ | | 30 | {↵
|
31 | public void actionPerformed(ActionEvent e)↵ | | 31 | public void actionPerformed(ActionEvent e)↵
|
32 | {↵ | | 32 | {↵
|
33 | MacOSActions.showInFinder(path); | | 33 | MacOSActions.showInFinder(path);
|