KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > slide > event > AbstractEventMethod


1 /*
2  * $Header: /home/cvs/jakarta-slide/src/share/org/apache/slide/event/AbstractEventMethod.java,v 1.3 2004/07/28 09:36:28 ib Exp $
3  * $Revision: 1.3 $
4  * $Date: 2004/07/28 09:36:28 $
5  *
6  * ====================================================================
7  *
8  * Copyright 2004 The Apache Software Foundation
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  * http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */

23
24 package org.apache.slide.event;
25
26 import org.apache.slide.util.Configuration;
27
28 /**
29  * @version $Revision: 1.3 $
30  */

31
32 public abstract class AbstractEventMethod {
33     private static char SEPARATOR = ':';
34     private String JavaDoc group, name, id;
35     private boolean enabled = Configuration.fireEvents();
36
37     protected AbstractEventMethod(String JavaDoc group, String JavaDoc name) {
38         this.group = group;
39         this.name = name;
40         this.id = group + SEPARATOR + name;
41     }
42
43     public boolean isEnabled() {
44         return enabled;
45     }
46
47     public void setEnabled(boolean enabled) {
48         this.enabled = enabled;
49     }
50
51     public String JavaDoc getName() {
52         return name;
53     }
54
55     public String JavaDoc getGroup() {
56         return group;
57     }
58
59     public String JavaDoc getId() {
60         return id;
61     }
62 }
Popular Tags