KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > tools > common > dd > webservice > IconType


1 /**
2  * This generated bean class IconType matches the schema element iconType
3  *
4  * ===============================================================
5  *
6  *
7  * The icon type contains small-icon and large-icon elements
8  * that specify the file names for small and large GIF or
9  * JPEG icon images used to represent the parent element in a
10  * GUI tool.
11  *
12  * The xml:lang attribute defines the language that the
13  * icon file names are provided in. Its value is "en" (English)
14  * by default.
15  *
16  *
17  * ===============================================================
18  * Generated on Fri Apr 22 15:43:00 PDT 2005
19  */

20
21 package com.sun.enterprise.tools.common.dd.webservice;
22
23 import org.w3c.dom.*;
24 import org.netbeans.modules.schema2beans.*;
25 import java.beans.*;
26 import java.util.*;
27
28 // BEGIN_NOI18N
29

30 public class IconType extends org.netbeans.modules.schema2beans.BaseBean
31 {
32
33     static Vector comparators = new Vector();
34
35     static public final String JavaDoc SMALL_ICON = "SmallIcon"; // NOI18N
36
static public final String JavaDoc LARGE_ICON = "LargeIcon"; // NOI18N
37

38     public IconType() {
39         this(Common.USE_DEFAULT_VALUES);
40     }
41
42     public IconType(int options)
43     {
44         super(comparators, new org.netbeans.modules.schema2beans.Version(1, 2, 0));
45         // Properties (see root bean comments for the bean graph)
46
this.createProperty("small-icon", // NOI18N
47
SMALL_ICON,
48             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
49             java.lang.String JavaDoc.class);
50         this.createProperty("large-icon", // NOI18N
51
LARGE_ICON,
52             Common.TYPE_0_1 | Common.TYPE_STRING | Common.TYPE_KEY,
53             java.lang.String JavaDoc.class);
54         this.initialize(options);
55     }
56
57     // Setting the default values of the properties
58
void initialize(int options)
59     {
60
61     }
62
63     // This attribute is optional
64
public void setSmallIcon(java.lang.String JavaDoc value) {
65         this.setValue(SMALL_ICON, value);
66     }
67
68     //
69
public java.lang.String JavaDoc getSmallIcon() {
70         return (java.lang.String JavaDoc)this.getValue(SMALL_ICON);
71     }
72
73     // This attribute is optional
74
public void setLargeIcon(java.lang.String JavaDoc value) {
75         this.setValue(LARGE_ICON, value);
76     }
77
78     //
79
public java.lang.String JavaDoc getLargeIcon() {
80         return (java.lang.String JavaDoc)this.getValue(LARGE_ICON);
81     }
82
83     //
84
public static void addComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
85         comparators.add(c);
86     }
87
88     //
89
public static void removeComparator(org.netbeans.modules.schema2beans.BeanComparator c) {
90         comparators.remove(c);
91     }
92     public void validate() throws org.netbeans.modules.schema2beans.ValidateException {
93     }
94
95     // Dump the content of this bean returning it as a String
96
public void dump(StringBuffer JavaDoc str, String JavaDoc indent){
97         String JavaDoc s;
98         Object JavaDoc o;
99         org.netbeans.modules.schema2beans.BaseBean n;
100         str.append(indent);
101         str.append("SmallIcon"); // NOI18N
102
str.append(indent+"\t"); // NOI18N
103
str.append("<"); // NOI18N
104
s = this.getSmallIcon();
105         str.append((s==null?"null":s.trim())); // NOI18N
106
str.append(">\n"); // NOI18N
107
this.dumpAttributes(SMALL_ICON, 0, str, indent);
108
109         str.append(indent);
110         str.append("LargeIcon"); // NOI18N
111
str.append(indent+"\t"); // NOI18N
112
str.append("<"); // NOI18N
113
s = this.getLargeIcon();
114         str.append((s==null?"null":s.trim())); // NOI18N
115
str.append(">\n"); // NOI18N
116
this.dumpAttributes(LARGE_ICON, 0, str, indent);
117
118     }
119     public String JavaDoc dumpBeanNode(){
120         StringBuffer JavaDoc str = new StringBuffer JavaDoc();
121         str.append("IconType\n"); // NOI18N
122
this.dump(str, "\n "); // NOI18N
123
return str.toString();
124     }}
125
126 // END_NOI18N
127

128
129 /*
130  * The contents of this file are subject to the terms
131  * of the Common Development and Distribution License
132  * (the License). You may not use this file except in
133  * compliance with the License.
134  *
135  * You can obtain a copy of the license at
136  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
137  * glassfish/bootstrap/legal/CDDLv1.0.txt.
138  * See the License for the specific language governing
139  * permissions and limitations under the License.
140  *
141  * When distributing Covered Code, include this CDDL
142  * Header Notice in each file and include the License file
143  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
144  * If applicable, add the following below the CDDL Header,
145  * with the fields enclosed by brackets [] replaced by
146  * you own identifying information:
147  * "Portions Copyrighted [year] [name of copyright owner]"
148  *
149  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
150  */

151
Popular Tags