01: /*
02: * Jacareto Copyright (c) 2002-2005
03: * Applied Computer Science Research Group, Darmstadt University of
04: * Technology, Institute of Mathematics & Computer Science,
05: * Ludwigsburg University of Education, and Computer Based
06: * Learning Research Group, Aachen University. All rights reserved.
07: *
08: * Jacareto is free software; you can redistribute it and/or
09: * modify it under the terms of the GNU General Public
10: * License as published by the Free Software Foundation; either
11: * version 2 of the License, or (at your option) any later version.
12: *
13: * Jacareto is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16: * General Public License for more details.
17: *
18: * You should have received a copy of the GNU General Public
19: * License along with Jacareto; if not, write to the Free
20: * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21: *
22: */
23:
24: package jacareto.cleverphl.menu;
25:
26: import jacareto.cleverphl.CleverPHL;
27:
28: import java.awt.event.ActionEvent;
29:
30: import javax.swing.JCheckBoxMenuItem;
31:
32: /**
33: * The "hide cleverphl" menu item of the main frame
34: *
35: * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a>
36: * @version 1.0
37: */
38: public class HideCleverPHL extends CleverPHLAction {
39: /**
40: * Creates a new instance.
41: *
42: * @param cleverPHL the CleverPHL instance
43: */
44: public HideCleverPHL(CleverPHL cleverPHL) {
45: super (cleverPHL);
46: applyCustomization("CleverPHL.Menu.HideCleverPHL");
47: }
48:
49: /**
50: * Called when this action should be performed.
51: *
52: * @param e DOCUMENT ME!
53: */
54: public void actionPerformed(ActionEvent e) {
55: getCustomization().put("Capture.HideCleverPHL",
56: getCheckbox().isSelected());
57: }
58:
59: /**
60: * Returns the checkbox menu itembelonging to this action.
61: *
62: * @return DOCUMENT ME!
63: */
64: private JCheckBoxMenuItem getCheckbox() {
65: return (JCheckBoxMenuItem) cleverPHL.getMainFrame()
66: .getCleverPHLMenuBar().getMenuItem(
67: "CleverPHL.Menu.HideCleverPHL");
68: }
69: }
|