KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > resource > metadata > DescriptionGroupMetaData


1 /*
2 * JBoss, Home of Professional Open Source
3 * Copyright 2005, JBoss Inc., and individual contributors as indicated
4 * by the @authors tag. See the copyright.txt in the distribution for a
5 * full listing of individual contributors.
6 *
7 * This is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License as
9 * published by the Free Software Foundation; either version 2.1 of
10 * the License, or (at your option) any later version.
11 *
12 * This software is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this software; if not, write to the Free
19 * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
20 * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
21 */

22 package org.jboss.resource.metadata;
23
24 import java.io.Serializable JavaDoc;
25 import java.util.Locale JavaDoc;
26
27 /**
28  * Description group meta data
29  *
30  * @author <a HREF="mailto:adrian@jboss.com">Adrian Brock</a>
31  * @version $Revision: 38342 $
32  */

33 public class DescriptionGroupMetaData implements Serializable JavaDoc
34 {
35    static final long serialVersionUID = 1324619949051028127L;
36
37    /** The language */
38    private String JavaDoc lang;
39    
40    /** The description */
41    private String JavaDoc description;
42    
43    /** The display name */
44    private String JavaDoc displayName;
45    
46    /** The small icon */
47    private String JavaDoc smallIcon;
48    
49    /** The large icon */
50    private String JavaDoc largeIcon;
51
52    /**
53     * Create a new description group meta data using the default langugage
54     */

55    public DescriptionGroupMetaData()
56    {
57       this(null);
58    }
59
60    /**
61     * Create a new description group meta data
62     *
63     * @param lang the language
64     */

65    public DescriptionGroupMetaData(String JavaDoc lang)
66    {
67       if (lang == null)
68          this.lang = Locale.getDefault().getLanguage();
69       else
70          this.lang = lang;
71    }
72
73    /**
74     * Get the language
75     *
76     * @return the language
77     */

78    public String JavaDoc getLanguage()
79    {
80       return lang;
81    }
82
83    /**
84     * Get the description
85     *
86     * @return the description
87     */

88    public String JavaDoc getDescription()
89    {
90       return description;
91    }
92
93    /**
94     * Set the description
95     *
96     * @param description the description
97     */

98    public void setDescription(String JavaDoc description)
99    {
100       this.description = description;
101    }
102
103    /**
104     * Get the display name
105     *
106     * @return the display name
107     */

108    public String JavaDoc getDisplayName()
109    {
110       return displayName;
111    }
112
113    /**
114     * Set the display name
115     *
116     * @param displayName the display name
117     */

118    public void setDisplayName(String JavaDoc displayName)
119    {
120       this.displayName = displayName;
121    }
122
123    /**
124     * Get the small icon
125     *
126     * @return the small icon
127     */

128    public String JavaDoc getSmallIcon()
129    {
130       return smallIcon;
131    }
132
133    /**
134     * Set the small icon
135     *
136     * @param icon the icon
137     */

138    public void setSmallIcon(String JavaDoc icon)
139    {
140       this.smallIcon = icon;
141    }
142
143    /**
144     * Get the large icon
145     *
146     * @return the large icon
147     */

148    public String JavaDoc getLargeIcon()
149    {
150       return largeIcon;
151    }
152
153    /**
154     * Set the large icon
155     *
156     * @param icon the icon
157     */

158    public void setLargeIcon(String JavaDoc icon)
159    {
160       this.largeIcon = icon;
161    }
162    
163    public String JavaDoc toString()
164    {
165       StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
166       buffer.append("DescriptionGroupMetaData").append('@');
167       buffer.append(Integer.toHexString(System.identityHashCode(this)));
168       buffer.append("[language=").append(lang);
169       if (description != null)
170          buffer.append(" description=").append(description);
171       if (displayName != null)
172          buffer.append(" displayName=").append(displayName);
173       if (smallIcon != null)
174          buffer.append(" smallIcon=").append(smallIcon);
175       if (largeIcon != null)
176          buffer.append(" largeIcon=").append(largeIcon);
177       buffer.append(']');
178       return buffer.toString();
179    }
180 }
181
Popular Tags