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.eventmask;
25:
26: import jacareto.system.Environment;
27:
28: import java.awt.AWTEvent;
29: import java.awt.event.ContainerEvent;
30:
31: /**
32: * A container event mask.
33: *
34: * @author <a href="mailto:cspannagel@web.de">Christian Spannagel</a>
35: * @version 1.0
36: */
37: public class ContainerEventMask extends AWTEventMaskSkeleton {
38: /**
39: * Creates a new container event mask.
40: *
41: * @param env the environment
42: * @param init the initialization method
43: */
44: public ContainerEventMask(Environment env, int init) {
45: super (env, AWTEvent.CONTAINER_EVENT_MASK,
46: ContainerEvent.CONTAINER_FIRST,
47: ContainerEvent.CONTAINER_LAST, init);
48: }
49:
50: /**
51: * Creates a new container event mask. The initial values will be loaded from the customization
52: * instance included in the env object.
53: *
54: * @param env the environment
55: */
56: public ContainerEventMask(Environment env) {
57: this (env, LOAD);
58: }
59:
60: /**
61: * Applies the customization.
62: */
63: protected void applyCustomization() {
64: setIncluded(ContainerEvent.COMPONENT_ADDED, customization
65: .getBoolean(
66: "ContainerEventMask.Include.ComponentAdded",
67: false));
68: setIncluded(ContainerEvent.COMPONENT_REMOVED, customization
69: .getBoolean(
70: "ContainerEventMask.Include.ComponentRemoved",
71: false));
72: fireEventMaskChange(new EventMaskEvent(env, this));
73: }
74: }
|