KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > web > monitor > data > ClientData


1 /*
2  * The contents of this file are subject to the terms of the Common Development
3  * and Distribution License (the License). You may not use this file except in
4  * compliance with the License.
5  *
6  * You can obtain a copy of the License at http://www.netbeans.org/cddl.html
7  * or http://www.netbeans.org/cddl.txt.
8  *
9  * When distributing Covered Code, include this CDDL Header Notice in each file
10  * and include the License file at http://www.netbeans.org/cddl.txt.
11  * If applicable, add the following below the CDDL Header, with the fields
12  * enclosed by brackets [] replaced by your own identifying information:
13  * "Portions Copyrighted [year] [name of copyright owner]"
14  *
15  * The Original Software is NetBeans. The Initial Developer of the Original
16  * Software is Sun Microsystems, Inc. Portions Copyright 1997-2006 Sun
17  * Microsystems, Inc. All Rights Reserved.
18  */

19
20 package org.netbeans.modules.web.monitor.data;
21
22 import org.w3c.dom.*;
23 import org.netbeans.modules.schema2beans.*;
24 import java.beans.*;
25 import java.util.*;
26
27 public class ClientData extends BaseBean {
28
29     static Vector comparators = new Vector();
30
31
32     public ClientData() {
33     this(Common.USE_DEFAULT_VALUES);
34     }
35
36     public ClientData(int options) {
37     super(ClientData.comparators, new org.netbeans.modules.schema2beans.Version(1, 0, 6));
38     // Properties (see root bean comments for the bean graph)
39
this.initialize(options);
40     }
41
42     // Setting the default values of the properties
43
void initialize(int options) {
44
45     }
46
47     // This method verifies that the mandatory properties are set
48
public boolean verify() {
49     return true;
50     }
51
52     //
53
static public void addComparator(BeanComparator c) {
54     ClientData.comparators.add(c);
55     }
56
57     //
58
static public void removeComparator(BeanComparator c) {
59     ClientData.comparators.remove(c);
60     }
61     //
62
public void addPropertyChangeListener(PropertyChangeListener l) {
63     BeanProp p = this.beanProp();
64     if (p != null)
65         p.addPCListener(l);
66     }
67
68     //
69
public void removePropertyChangeListener(PropertyChangeListener l) {
70     BeanProp p = this.beanProp();
71     if (p != null)
72         p.removePCListener(l);
73     }
74
75     //
76
public void addPropertyChangeListener(String JavaDoc n, PropertyChangeListener l) {
77     BeanProp p = this.beanProp(n);
78     if (p != null)
79         p.addPCListener(l);
80     }
81
82     //
83
public void removePropertyChangeListener(String JavaDoc n,
84                          PropertyChangeListener l) {
85     BeanProp p = this.beanProp(n);
86     if (p != null)
87         p.removePCListener(l);
88     }
89
90     // Dump the content of this bean returning it as a String
91
public void dump(StringBuffer JavaDoc str, String JavaDoc indent) {
92     String JavaDoc s;
93     BaseBean n;
94     }
95
96     public String JavaDoc dumpBeanNode() {
97     StringBuffer JavaDoc str = new StringBuffer JavaDoc();
98     str.append("ClientData\n");//NOI18N
99
this.dump(str, "\n ");//NOI18N
100
return str.toString();
101     }
102 }
103
104
Popular Tags