1 package com.explosion.expf.menusandtools.menu;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.Map;
23
24 import javax.swing.JMenuItem;
25
26 import com.explosion.expf.menusandtools.CookieChecker;
27
28 /***
29 * @author Stephen Cowx
30 */
31
32 public class ExpMenuItem extends JMenuItem
33 {
34
35 private CookieChecker cookieChecker;
36
37 public ExpMenuItem(String name, String cookieName, int enabledThreshold)
38 {
39 super(name);
40 this.cookieChecker = new CookieChecker(cookieName, enabledThreshold);
41 }
42
43
44 /***
45 * This method checks for an object of type Integer
46 */
47 public void checkEnabled(Map componentCookies, Map localCookies,Map globalCookies) throws Exception
48 {
49 cookieChecker.checkEnabled(componentCookies, localCookies, globalCookies, this);
50 }
51 }