001: //GEN-BEGIN:BeanInfo
002: /*
003: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
004: *
005: * Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
006: *
007: * The contents of this file are subject to the terms of either the GNU
008: * General Public License Version 2 only ("GPL") or the Common
009: * Development and Distribution License("CDDL") (collectively, the
010: * "License"). You may not use this file except in compliance with the
011: * License. You can obtain a copy of the License at
012: * http://www.netbeans.org/cddl-gplv2.html
013: * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
014: * specific language governing permissions and limitations under the
015: * License. When distributing the software, include this License Header
016: * Notice in each file and include the License file at
017: * nbbuild/licenses/CDDL-GPL-2-CP. Sun designates this
018: * particular file as subject to the "Classpath" exception as provided
019: * by Sun in the GPL Version 2 section of the License file that
020: * accompanied this code. If applicable, add the following below the
021: * License Header, with the fields enclosed by brackets [] replaced by
022: * your own identifying information:
023: * "Portions Copyrighted [year] [name of copyright owner]"
024: *
025: * Contributor(s):
026: *
027: * The Original Software is NetBeans. The Initial Developer of the Original
028: * Software is Sun Microsystems, Inc. Portions Copyright 1997-2007 Sun
029: * Microsystems, Inc. All Rights Reserved.
030: *
031: * If you wish your version of this file to be governed by only the CDDL
032: * or only the GPL Version 2, indicate your decision by adding
033: * "[Contributor] elects to include this software in this distribution
034: * under the [CDDL or GPL Version 2] license." If you do not indicate a
035: * single choice of license, a recipient has the option to distribute
036: * your version of this file under either the CDDL, the GPL Version 2 or
037: * to extend the choice of license to its licensees as provided above.
038: * However, if you add GPL Version 2 code and therefore, elected the GPL
039: * Version 2 license, then the option applies only if the new code is
040: * made subject to such option by the copyright holder.
041: */
042: package org.netbeans.modules.visualweb.web.ui.dt.component;
043:
044: import java.awt.Image;
045: import java.beans.BeanDescriptor;
046: import java.beans.BeanInfo;
047: import java.beans.IntrospectionException;
048: import java.beans.PropertyDescriptor;
049: import java.util.Locale;
050: import java.util.ResourceBundle;
051:
052: import com.sun.rave.designtime.CategoryDescriptor;
053: import com.sun.rave.designtime.Constants;
054: import com.sun.rave.designtime.faces.FacetDescriptor;
055: import com.sun.rave.designtime.markup.AttributeDescriptor;
056:
057: import java.beans.SimpleBeanInfo;
058:
059: /**
060: * <p>Auto-generated design time metadata class.
061: * Do <strong>NOT</strong> modify; all changes
062: * <strong>will</strong> be lost!</p>
063: */
064:
065: abstract class IconBeanInfoBase extends SimpleBeanInfo {
066:
067: protected static ResourceBundle resources = ResourceBundle
068: .getBundle(
069: "org.netbeans.modules.visualweb.web.ui.dt.component.Bundle-JSF",
070: Locale.getDefault(), IconBeanInfoBase.class
071: .getClassLoader());
072:
073: /**
074: * <p>Construct a new <code>IconBeanInfoBase</code>.</p>
075: */
076: public IconBeanInfoBase() {
077:
078: beanClass = com.sun.rave.web.ui.component.Icon.class;
079: iconFileName_C16 = "/org/netbeans/modules/visualweb/web/ui/dt/component/Icon_C16";
080: iconFileName_C32 = "/org/netbeans/modules/visualweb/web/ui/dt/component/Icon_C32";
081: iconFileName_M16 = "/org/netbeans/modules/visualweb/web/ui/dt/component/Icon_M16";
082: iconFileName_M32 = "/org/netbeans/modules/visualweb/web/ui/dt/component/Icon_M32";
083:
084: }
085:
086: /**
087: * <p>The bean class that this BeanInfo represents.
088: */
089: protected Class beanClass;
090:
091: /**
092: * <p>The cached BeanDescriptor.</p>
093: */
094: protected BeanDescriptor beanDescriptor;
095:
096: /**
097: * <p>The index of the default property.</p>
098: */
099: protected int defaultPropertyIndex = -2;
100:
101: /**
102: * <p>The name of the default property.</p>
103: */
104: protected String defaultPropertyName;
105:
106: /**
107: * <p>The 16x16 color icon.</p>
108: */
109: protected String iconFileName_C16;
110:
111: /**
112: * <p>The 32x32 color icon.</p>
113: */
114: protected String iconFileName_C32;
115:
116: /**
117: * <p>The 16x16 monochrome icon.</p>
118: */
119: protected String iconFileName_M16;
120:
121: /**
122: * <p>The 32x32 monochrome icon.</p>
123: */
124: protected String iconFileName_M32;
125:
126: /**
127: * <p>The cached property descriptors.</p>
128: */
129: protected PropertyDescriptor[] propDescriptors;
130:
131: /**
132: * <p>Return the <code>BeanDescriptor</code> for this bean.</p>
133: */
134: public BeanDescriptor getBeanDescriptor() {
135:
136: if (beanDescriptor != null) {
137: return beanDescriptor;
138: }
139:
140: beanDescriptor = new BeanDescriptor(beanClass);
141: beanDescriptor.setDisplayName(resources
142: .getString("Icon_DisplayName"));
143: beanDescriptor.setShortDescription(resources
144: .getString("Icon_Description"));
145: beanDescriptor.setExpert(false);
146: beanDescriptor.setHidden(false);
147: beanDescriptor.setPreferred(false);
148: beanDescriptor.setValue(
149: Constants.BeanDescriptor.FACET_DESCRIPTORS,
150: getFacetDescriptors());
151: beanDescriptor.setValue(Constants.BeanDescriptor.INSTANCE_NAME,
152: "icon");
153: beanDescriptor.setValue(Constants.BeanDescriptor.IS_CONTAINER,
154: Boolean.FALSE);
155: beanDescriptor.setValue(
156: Constants.BeanDescriptor.PROPERTY_CATEGORIES,
157: getCategoryDescriptors());
158: beanDescriptor.setValue(Constants.BeanDescriptor.TAG_NAME,
159: "icon");
160: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_PREFIX,
161: "ui");
162: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_URI,
163: "http://www.sun.com/web/ui");
164:
165: return beanDescriptor;
166:
167: }
168:
169: /**
170: * <p>Return the <code>CategoryDescriptor</code> array for the property categories of this component.</p>
171: */
172: private CategoryDescriptor[] getCategoryDescriptors() {
173:
174: return com.sun.rave.designtime.base.CategoryDescriptors
175: .getDefaultCategoryDescriptors();
176:
177: }
178:
179: /**
180: * <p>Return the index of the default property, or
181: * -1 if there is no default property.</p>
182: */
183: public int getDefaultPropertyIndex() {
184:
185: if (defaultPropertyIndex > -2) {
186: return defaultPropertyIndex;
187: } else {
188: if (defaultPropertyName == null) {
189: defaultPropertyIndex = -1;
190: } else {
191: PropertyDescriptor pd[] = getPropertyDescriptors();
192: for (int i = 0; i < pd.length; i++) {
193: if (defaultPropertyName.equals(pd[i].getName())) {
194: defaultPropertyIndex = i;
195: break;
196: }
197: }
198: }
199: }
200: return defaultPropertyIndex;
201: }
202:
203: /**
204: * <p>The cached facet descriptors.</p>
205: */
206: protected FacetDescriptor[] facetDescriptors;
207:
208: /**
209: * <p>Return the <code>FacetDescriptor</code>s for this bean.</p>
210: */
211: public FacetDescriptor[] getFacetDescriptors() {
212:
213: if (facetDescriptors != null) {
214: return facetDescriptors;
215: }
216: facetDescriptors = new FacetDescriptor[] {};
217: return facetDescriptors;
218:
219: }
220:
221: /**
222: * <p>Return the specified image (if any)
223: * for this component class.</p>
224: */
225: public Image getIcon(int kind) {
226:
227: String name;
228: switch (kind) {
229: case ICON_COLOR_16x16:
230: name = iconFileName_C16;
231: break;
232: case ICON_COLOR_32x32:
233: name = iconFileName_C32;
234: break;
235: case ICON_MONO_16x16:
236: name = iconFileName_M16;
237: break;
238: case ICON_MONO_32x32:
239: name = iconFileName_M32;
240: break;
241: default:
242: name = null;
243: break;
244: }
245: if (name == null) {
246: return null;
247: }
248:
249: Image image = loadImage(name + ".png");
250: if (image == null) {
251: image = loadImage(name + ".gif");
252: }
253: return image;
254:
255: }
256:
257: /**
258: * <p>Return a class loaded by name via the class loader that loaded this class.</p>
259: */
260: private java.lang.Class loadClass(java.lang.String name) {
261:
262: try {
263: return Class.forName(name);
264: } catch (ClassNotFoundException e) {
265: throw new RuntimeException(e);
266: }
267:
268: }
269:
270: /**
271: * <p>Return the <code>PropertyDescriptor</code>s for this bean.</p>
272: */
273: public PropertyDescriptor[] getPropertyDescriptors() {
274:
275: if (propDescriptors != null) {
276: return propDescriptors;
277: }
278: AttributeDescriptor attrib = null;
279:
280: try {
281:
282: PropertyDescriptor prop_align = new PropertyDescriptor(
283: "align", beanClass, "getAlign", "setAlign");
284: prop_align.setDisplayName(resources
285: .getString("Icon_align_DisplayName"));
286: prop_align.setShortDescription(resources
287: .getString("Icon_align_Description"));
288: prop_align
289: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.SelectOneDomainEditor"));
290: prop_align.setExpert(false);
291: prop_align.setHidden(false);
292: prop_align.setPreferred(false);
293: attrib = new AttributeDescriptor("align", false, null, true);
294: prop_align.setValue(
295: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
296: attrib);
297: prop_align
298: .setValue(
299: Constants.PropertyDescriptor.CATEGORY,
300: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
301: prop_align
302: .setValue(
303: "com.sun.rave.propertyeditors.DOMAIN_CLASS",
304: com.sun.rave.propertyeditors.domains.HtmlAlignDomain.class);
305:
306: PropertyDescriptor prop_alt = new PropertyDescriptor("alt",
307: beanClass, "getAlt", "setAlt");
308: prop_alt.setDisplayName(resources
309: .getString("Icon_alt_DisplayName"));
310: prop_alt.setShortDescription(resources
311: .getString("Icon_alt_Description"));
312: prop_alt
313: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
314: prop_alt.setExpert(false);
315: prop_alt.setHidden(false);
316: prop_alt.setPreferred(false);
317: attrib = new AttributeDescriptor("alt", false, null, true);
318: prop_alt.setValue(
319: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
320: attrib);
321: prop_alt
322: .setValue(
323: Constants.PropertyDescriptor.CATEGORY,
324: com.sun.rave.designtime.base.CategoryDescriptors.ACCESSIBILITY);
325:
326: PropertyDescriptor prop_border = new PropertyDescriptor(
327: "border", beanClass, "getBorder", "setBorder");
328: prop_border.setDisplayName(resources
329: .getString("Icon_border_DisplayName"));
330: prop_border.setShortDescription(resources
331: .getString("Icon_border_Description"));
332: prop_border
333: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
334: prop_border.setExpert(false);
335: prop_border.setHidden(false);
336: prop_border.setPreferred(false);
337: attrib = new AttributeDescriptor("border", false, "0", true);
338: prop_border.setValue(
339: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
340: attrib);
341: prop_border
342: .setValue(
343: Constants.PropertyDescriptor.CATEGORY,
344: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
345: prop_border.setValue(
346: "com.sun.rave.propertyeditors.MIN_VALUE", "0");
347:
348: PropertyDescriptor prop_height = new PropertyDescriptor(
349: "height", beanClass, "getHeight", "setHeight");
350: prop_height.setDisplayName(resources
351: .getString("Icon_height_DisplayName"));
352: prop_height.setShortDescription(resources
353: .getString("Icon_height_Description"));
354: prop_height
355: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
356: prop_height.setExpert(false);
357: prop_height.setHidden(false);
358: prop_height.setPreferred(false);
359: attrib = new AttributeDescriptor("height", false, null,
360: true);
361: prop_height.setValue(
362: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
363: attrib);
364: prop_height
365: .setValue(
366: Constants.PropertyDescriptor.CATEGORY,
367: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
368: prop_height.setValue(
369: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
370:
371: PropertyDescriptor prop_hspace = new PropertyDescriptor(
372: "hspace", beanClass, "getHspace", "setHspace");
373: prop_hspace.setDisplayName(resources
374: .getString("Icon_hspace_DisplayName"));
375: prop_hspace.setShortDescription(resources
376: .getString("Icon_hspace_Description"));
377: prop_hspace
378: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
379: prop_hspace.setExpert(false);
380: prop_hspace.setHidden(false);
381: prop_hspace.setPreferred(false);
382: attrib = new AttributeDescriptor("hspace", false, null,
383: true);
384: prop_hspace.setValue(
385: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
386: attrib);
387: prop_hspace
388: .setValue(
389: Constants.PropertyDescriptor.CATEGORY,
390: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
391: prop_hspace.setValue(
392: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
393:
394: PropertyDescriptor prop_icon = new PropertyDescriptor(
395: "icon", beanClass, "getIcon", "setIcon");
396: prop_icon.setDisplayName(resources
397: .getString("Icon_icon_DisplayName"));
398: prop_icon.setShortDescription(resources
399: .getString("Icon_icon_Description"));
400: prop_icon
401: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.SelectOneDomainEditor"));
402: prop_icon.setExpert(false);
403: prop_icon.setHidden(false);
404: prop_icon.setPreferred(false);
405: attrib = new AttributeDescriptor("icon", false, null, true);
406: prop_icon.setValue(
407: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
408: attrib);
409: prop_icon
410: .setValue(
411: Constants.PropertyDescriptor.CATEGORY,
412: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
413: prop_icon
414: .setValue(
415: "com.sun.rave.propertyeditors.DOMAIN_CLASS",
416: org.netbeans.modules.visualweb.web.ui.dt.component.propertyeditors.ThemeIconsDomain.class);
417:
418: PropertyDescriptor prop_longDesc = new PropertyDescriptor(
419: "longDesc", beanClass, "getLongDesc", "setLongDesc");
420: prop_longDesc.setDisplayName(resources
421: .getString("Icon_longDesc_DisplayName"));
422: prop_longDesc.setShortDescription(resources
423: .getString("Icon_longDesc_Description"));
424: prop_longDesc
425: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
426: prop_longDesc.setExpert(false);
427: prop_longDesc.setHidden(false);
428: prop_longDesc.setPreferred(false);
429: attrib = new AttributeDescriptor("longDesc", false, null,
430: true);
431: prop_longDesc.setValue(
432: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
433: attrib);
434: prop_longDesc
435: .setValue(
436: Constants.PropertyDescriptor.CATEGORY,
437: com.sun.rave.designtime.base.CategoryDescriptors.ACCESSIBILITY);
438:
439: PropertyDescriptor prop_onClick = new PropertyDescriptor(
440: "onClick", beanClass, "getOnClick", "setOnClick");
441: prop_onClick.setDisplayName(resources
442: .getString("Icon_onClick_DisplayName"));
443: prop_onClick.setShortDescription(resources
444: .getString("Icon_onClick_Description"));
445: prop_onClick
446: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
447: prop_onClick.setExpert(false);
448: prop_onClick.setHidden(false);
449: prop_onClick.setPreferred(false);
450: attrib = new AttributeDescriptor("onClick", false, null,
451: true);
452: prop_onClick.setValue(
453: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
454: attrib);
455: prop_onClick
456: .setValue(
457: Constants.PropertyDescriptor.CATEGORY,
458: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
459:
460: PropertyDescriptor prop_onDblClick = new PropertyDescriptor(
461: "onDblClick", beanClass, "getOnDblClick",
462: "setOnDblClick");
463: prop_onDblClick.setDisplayName(resources
464: .getString("Icon_onDblClick_DisplayName"));
465: prop_onDblClick.setShortDescription(resources
466: .getString("Icon_onDblClick_Description"));
467: prop_onDblClick
468: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
469: prop_onDblClick.setExpert(false);
470: prop_onDblClick.setHidden(false);
471: prop_onDblClick.setPreferred(false);
472: attrib = new AttributeDescriptor("onDblClick", false, null,
473: true);
474: prop_onDblClick.setValue(
475: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
476: attrib);
477: prop_onDblClick
478: .setValue(
479: Constants.PropertyDescriptor.CATEGORY,
480: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
481:
482: PropertyDescriptor prop_onMouseDown = new PropertyDescriptor(
483: "onMouseDown", beanClass, "getOnMouseDown",
484: "setOnMouseDown");
485: prop_onMouseDown.setDisplayName(resources
486: .getString("Icon_onMouseDown_DisplayName"));
487: prop_onMouseDown.setShortDescription(resources
488: .getString("Icon_onMouseDown_Description"));
489: prop_onMouseDown
490: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
491: prop_onMouseDown.setExpert(false);
492: prop_onMouseDown.setHidden(false);
493: prop_onMouseDown.setPreferred(false);
494: attrib = new AttributeDescriptor("onMouseDown", false,
495: null, true);
496: prop_onMouseDown.setValue(
497: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
498: attrib);
499: prop_onMouseDown
500: .setValue(
501: Constants.PropertyDescriptor.CATEGORY,
502: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
503:
504: PropertyDescriptor prop_onMouseMove = new PropertyDescriptor(
505: "onMouseMove", beanClass, "getOnMouseMove",
506: "setOnMouseMove");
507: prop_onMouseMove.setDisplayName(resources
508: .getString("Icon_onMouseMove_DisplayName"));
509: prop_onMouseMove.setShortDescription(resources
510: .getString("Icon_onMouseMove_Description"));
511: prop_onMouseMove
512: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
513: prop_onMouseMove.setExpert(false);
514: prop_onMouseMove.setHidden(false);
515: prop_onMouseMove.setPreferred(false);
516: attrib = new AttributeDescriptor("onMouseMove", false,
517: null, true);
518: prop_onMouseMove.setValue(
519: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
520: attrib);
521: prop_onMouseMove
522: .setValue(
523: Constants.PropertyDescriptor.CATEGORY,
524: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
525:
526: PropertyDescriptor prop_onMouseOut = new PropertyDescriptor(
527: "onMouseOut", beanClass, "getOnMouseOut",
528: "setOnMouseOut");
529: prop_onMouseOut.setDisplayName(resources
530: .getString("Icon_onMouseOut_DisplayName"));
531: prop_onMouseOut.setShortDescription(resources
532: .getString("Icon_onMouseOut_Description"));
533: prop_onMouseOut
534: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
535: prop_onMouseOut.setExpert(false);
536: prop_onMouseOut.setHidden(false);
537: prop_onMouseOut.setPreferred(false);
538: attrib = new AttributeDescriptor("onMouseOut", false, null,
539: true);
540: prop_onMouseOut.setValue(
541: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
542: attrib);
543: prop_onMouseOut
544: .setValue(
545: Constants.PropertyDescriptor.CATEGORY,
546: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
547:
548: PropertyDescriptor prop_onMouseOver = new PropertyDescriptor(
549: "onMouseOver", beanClass, "getOnMouseOver",
550: "setOnMouseOver");
551: prop_onMouseOver.setDisplayName(resources
552: .getString("Icon_onMouseOver_DisplayName"));
553: prop_onMouseOver.setShortDescription(resources
554: .getString("Icon_onMouseOver_Description"));
555: prop_onMouseOver
556: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
557: prop_onMouseOver.setExpert(false);
558: prop_onMouseOver.setHidden(false);
559: prop_onMouseOver.setPreferred(false);
560: attrib = new AttributeDescriptor("onMouseOver", false,
561: null, true);
562: prop_onMouseOver.setValue(
563: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
564: attrib);
565: prop_onMouseOver
566: .setValue(
567: Constants.PropertyDescriptor.CATEGORY,
568: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
569:
570: PropertyDescriptor prop_onMouseUp = new PropertyDescriptor(
571: "onMouseUp", beanClass, "getOnMouseUp",
572: "setOnMouseUp");
573: prop_onMouseUp.setDisplayName(resources
574: .getString("Icon_onMouseUp_DisplayName"));
575: prop_onMouseUp.setShortDescription(resources
576: .getString("Icon_onMouseUp_Description"));
577: prop_onMouseUp
578: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
579: prop_onMouseUp.setExpert(false);
580: prop_onMouseUp.setHidden(false);
581: prop_onMouseUp.setPreferred(false);
582: attrib = new AttributeDescriptor("onMouseUp", false, null,
583: true);
584: prop_onMouseUp.setValue(
585: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
586: attrib);
587: prop_onMouseUp
588: .setValue(
589: Constants.PropertyDescriptor.CATEGORY,
590: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
591:
592: PropertyDescriptor prop_style = new PropertyDescriptor(
593: "style", beanClass, "getStyle", "setStyle");
594: prop_style.setDisplayName(resources
595: .getString("Icon_style_DisplayName"));
596: prop_style.setShortDescription(resources
597: .getString("Icon_style_Description"));
598: prop_style
599: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.css.CssStylePropertyEditor"));
600: prop_style.setExpert(false);
601: prop_style.setHidden(false);
602: prop_style.setPreferred(false);
603: attrib = new AttributeDescriptor("style", false, null, true);
604: prop_style.setValue(
605: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
606: attrib);
607: prop_style
608: .setValue(
609: Constants.PropertyDescriptor.CATEGORY,
610: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
611:
612: PropertyDescriptor prop_styleClass = new PropertyDescriptor(
613: "styleClass", beanClass, "getStyleClass",
614: "setStyleClass");
615: prop_styleClass.setDisplayName(resources
616: .getString("Icon_styleClass_DisplayName"));
617: prop_styleClass.setShortDescription(resources
618: .getString("Icon_styleClass_Description"));
619: prop_styleClass
620: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StyleClassPropertyEditor"));
621: prop_styleClass.setExpert(false);
622: prop_styleClass.setHidden(false);
623: prop_styleClass.setPreferred(false);
624: attrib = new AttributeDescriptor("styleClass", false, null,
625: true);
626: prop_styleClass.setValue(
627: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
628: attrib);
629: prop_styleClass
630: .setValue(
631: Constants.PropertyDescriptor.CATEGORY,
632: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
633:
634: PropertyDescriptor prop_toolTip = new PropertyDescriptor(
635: "toolTip", beanClass, "getToolTip", "setToolTip");
636: prop_toolTip.setDisplayName(resources
637: .getString("Icon_toolTip_DisplayName"));
638: prop_toolTip.setShortDescription(resources
639: .getString("Icon_toolTip_Description"));
640: prop_toolTip
641: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
642: prop_toolTip.setExpert(false);
643: prop_toolTip.setHidden(false);
644: prop_toolTip.setPreferred(false);
645: attrib = new AttributeDescriptor("toolTip", false, null,
646: true);
647: prop_toolTip.setValue(
648: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
649: attrib);
650: prop_toolTip
651: .setValue(
652: Constants.PropertyDescriptor.CATEGORY,
653: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
654:
655: PropertyDescriptor prop_url = new PropertyDescriptor("url",
656: beanClass, "getUrl", "setUrl");
657: prop_url.setDisplayName(resources
658: .getString("Icon_url_DisplayName"));
659: prop_url.setShortDescription(resources
660: .getString("Icon_url_Description"));
661: prop_url
662: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.ImageUrlPropertyEditor"));
663: prop_url.setExpert(false);
664: prop_url.setHidden(false);
665: prop_url.setPreferred(false);
666: attrib = new AttributeDescriptor("url", false, null, true);
667: prop_url.setValue(
668: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
669: attrib);
670: prop_url
671: .setValue(
672: Constants.PropertyDescriptor.CATEGORY,
673: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
674:
675: PropertyDescriptor prop_visible = new PropertyDescriptor(
676: "visible", beanClass, "isVisible", "setVisible");
677: prop_visible.setDisplayName(resources
678: .getString("Icon_visible_DisplayName"));
679: prop_visible.setShortDescription(resources
680: .getString("Icon_visible_Description"));
681: prop_visible.setExpert(false);
682: prop_visible.setHidden(false);
683: prop_visible.setPreferred(false);
684: attrib = new AttributeDescriptor("visible", false, "true",
685: true);
686: prop_visible.setValue(
687: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
688: attrib);
689: prop_visible
690: .setValue(
691: Constants.PropertyDescriptor.CATEGORY,
692: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
693:
694: PropertyDescriptor prop_vspace = new PropertyDescriptor(
695: "vspace", beanClass, "getVspace", "setVspace");
696: prop_vspace.setDisplayName(resources
697: .getString("Icon_vspace_DisplayName"));
698: prop_vspace.setShortDescription(resources
699: .getString("Icon_vspace_Description"));
700: prop_vspace
701: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
702: prop_vspace.setExpert(false);
703: prop_vspace.setHidden(false);
704: prop_vspace.setPreferred(false);
705: attrib = new AttributeDescriptor("vspace", false, null,
706: true);
707: prop_vspace.setValue(
708: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
709: attrib);
710: prop_vspace
711: .setValue(
712: Constants.PropertyDescriptor.CATEGORY,
713: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
714: prop_vspace.setValue(
715: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
716:
717: PropertyDescriptor prop_width = new PropertyDescriptor(
718: "width", beanClass, "getWidth", "setWidth");
719: prop_width.setDisplayName(resources
720: .getString("Icon_width_DisplayName"));
721: prop_width.setShortDescription(resources
722: .getString("Icon_width_Description"));
723: prop_width
724: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
725: prop_width.setExpert(false);
726: prop_width.setHidden(false);
727: prop_width.setPreferred(false);
728: attrib = new AttributeDescriptor("width", false, null, true);
729: prop_width.setValue(
730: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
731: attrib);
732: prop_width
733: .setValue(
734: Constants.PropertyDescriptor.CATEGORY,
735: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
736: prop_width.setValue(
737: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
738:
739: PropertyDescriptor prop_attributes = new PropertyDescriptor(
740: "attributes", beanClass, "getAttributes", null);
741: prop_attributes.setDisplayName(resources
742: .getString("Icon_attributes_DisplayName"));
743: prop_attributes.setShortDescription(resources
744: .getString("Icon_attributes_Description"));
745: prop_attributes.setExpert(false);
746: prop_attributes.setHidden(true);
747: prop_attributes.setPreferred(false);
748: prop_attributes
749: .setValue(
750: Constants.PropertyDescriptor.CATEGORY,
751: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
752:
753: PropertyDescriptor prop_childCount = new PropertyDescriptor(
754: "childCount", beanClass, "getChildCount", null);
755: prop_childCount.setDisplayName(resources
756: .getString("Icon_childCount_DisplayName"));
757: prop_childCount.setShortDescription(resources
758: .getString("Icon_childCount_Description"));
759: prop_childCount.setExpert(false);
760: prop_childCount.setHidden(true);
761: prop_childCount.setPreferred(false);
762: prop_childCount
763: .setValue(
764: Constants.PropertyDescriptor.CATEGORY,
765: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
766:
767: PropertyDescriptor prop_children = new PropertyDescriptor(
768: "children", beanClass, "getChildren", null);
769: prop_children.setDisplayName(resources
770: .getString("Icon_children_DisplayName"));
771: prop_children.setShortDescription(resources
772: .getString("Icon_children_Description"));
773: prop_children.setExpert(false);
774: prop_children.setHidden(true);
775: prop_children.setPreferred(false);
776: prop_children
777: .setValue(
778: Constants.PropertyDescriptor.CATEGORY,
779: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
780:
781: PropertyDescriptor prop_facets = new PropertyDescriptor(
782: "facets", beanClass, "getFacets", null);
783: prop_facets.setDisplayName(resources
784: .getString("Icon_facets_DisplayName"));
785: prop_facets.setShortDescription(resources
786: .getString("Icon_facets_Description"));
787: prop_facets.setExpert(false);
788: prop_facets.setHidden(true);
789: prop_facets.setPreferred(false);
790: prop_facets
791: .setValue(
792: Constants.PropertyDescriptor.CATEGORY,
793: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
794:
795: PropertyDescriptor prop_family = new PropertyDescriptor(
796: "family", beanClass, "getFamily", null);
797: prop_family.setDisplayName(resources
798: .getString("Icon_family_DisplayName"));
799: prop_family.setShortDescription(resources
800: .getString("Icon_family_Description"));
801: prop_family.setExpert(false);
802: prop_family.setHidden(true);
803: prop_family.setPreferred(false);
804: prop_family
805: .setValue(
806: Constants.PropertyDescriptor.CATEGORY,
807: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
808:
809: PropertyDescriptor prop_id = new PropertyDescriptor("id",
810: beanClass, "getId", "setId");
811: prop_id.setDisplayName(resources
812: .getString("Icon_id_DisplayName"));
813: prop_id.setShortDescription(resources
814: .getString("Icon_id_Description"));
815: prop_id.setExpert(false);
816: prop_id.setHidden(true);
817: prop_id.setPreferred(false);
818: attrib = new AttributeDescriptor("id", false, null, true);
819: prop_id.setValue(
820: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
821: attrib);
822: prop_id
823: .setValue(
824: Constants.PropertyDescriptor.CATEGORY,
825: com.sun.rave.designtime.base.CategoryDescriptors.GENERAL);
826:
827: PropertyDescriptor prop_parent = new PropertyDescriptor(
828: "parent", beanClass, "getParent", null);
829: prop_parent.setDisplayName(resources
830: .getString("Icon_parent_DisplayName"));
831: prop_parent.setShortDescription(resources
832: .getString("Icon_parent_Description"));
833: prop_parent.setExpert(false);
834: prop_parent.setHidden(true);
835: prop_parent.setPreferred(false);
836: prop_parent
837: .setValue(
838: Constants.PropertyDescriptor.CATEGORY,
839: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
840:
841: PropertyDescriptor prop_rendered = new PropertyDescriptor(
842: "rendered", beanClass, "isRendered", "setRendered");
843: prop_rendered.setDisplayName(resources
844: .getString("Icon_rendered_DisplayName"));
845: prop_rendered.setShortDescription(resources
846: .getString("Icon_rendered_Description"));
847: prop_rendered.setExpert(false);
848: prop_rendered.setHidden(false);
849: prop_rendered.setPreferred(false);
850: attrib = new AttributeDescriptor("rendered", false, null,
851: true);
852: prop_rendered.setValue(
853: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
854: attrib);
855: prop_rendered
856: .setValue(
857: Constants.PropertyDescriptor.CATEGORY,
858: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
859:
860: PropertyDescriptor prop_rendererType = new PropertyDescriptor(
861: "rendererType", beanClass, "getRendererType",
862: "setRendererType");
863: prop_rendererType.setDisplayName(resources
864: .getString("Icon_rendererType_DisplayName"));
865: prop_rendererType.setShortDescription(resources
866: .getString("Icon_rendererType_Description"));
867: prop_rendererType.setExpert(false);
868: prop_rendererType.setHidden(true);
869: prop_rendererType.setPreferred(false);
870: prop_rendererType
871: .setValue(
872: Constants.PropertyDescriptor.CATEGORY,
873: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
874:
875: PropertyDescriptor prop_rendersChildren = new PropertyDescriptor(
876: "rendersChildren", beanClass, "getRendersChildren",
877: null);
878: prop_rendersChildren.setDisplayName(resources
879: .getString("Icon_rendersChildren_DisplayName"));
880: prop_rendersChildren.setShortDescription(resources
881: .getString("Icon_rendersChildren_Description"));
882: prop_rendersChildren.setExpert(false);
883: prop_rendersChildren.setHidden(true);
884: prop_rendersChildren.setPreferred(false);
885: prop_rendersChildren
886: .setValue(
887: Constants.PropertyDescriptor.CATEGORY,
888: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
889:
890: PropertyDescriptor prop_value = new PropertyDescriptor(
891: "value", beanClass, "getValue", "setValue");
892: prop_value.setDisplayName(resources
893: .getString("Icon_value_DisplayName"));
894: prop_value.setShortDescription(resources
895: .getString("Icon_value_Description"));
896: prop_value
897: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.binding.ValueBindingPropertyEditor"));
898: prop_value.setExpert(false);
899: prop_value.setHidden(false);
900: prop_value.setPreferred(false);
901: attrib = new AttributeDescriptor("value", false, null, true);
902: prop_value.setValue(
903: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
904: attrib);
905: prop_value
906: .setValue(
907: Constants.PropertyDescriptor.CATEGORY,
908: com.sun.rave.designtime.base.CategoryDescriptors.DATA);
909: prop_value.setValue("ignoreIsBound", "true");
910:
911: propDescriptors = new PropertyDescriptor[] { prop_align,
912: prop_alt, prop_attributes, prop_border,
913: prop_childCount, prop_children, prop_facets,
914: prop_family, prop_height, prop_hspace, prop_icon,
915: prop_id, prop_longDesc, prop_onClick,
916: prop_onDblClick, prop_onMouseDown,
917: prop_onMouseMove, prop_onMouseOut,
918: prop_onMouseOver, prop_onMouseUp, prop_parent,
919: prop_rendered, prop_rendererType,
920: prop_rendersChildren, prop_style, prop_styleClass,
921: prop_toolTip, prop_url, prop_value, prop_visible,
922: prop_vspace, prop_width, };
923: return propDescriptors;
924:
925: } catch (IntrospectionException e) {
926: e.printStackTrace();
927: return null;
928: }
929:
930: }
931:
932: }
933: //GEN-END:BeanInfo
|