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 TreeNodeBeanInfoBase 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(), TreeNodeBeanInfoBase.class
071: .getClassLoader());
072:
073: /**
074: * <p>Construct a new <code>TreeNodeBeanInfoBase</code>.</p>
075: */
076: public TreeNodeBeanInfoBase() {
077:
078: beanClass = com.sun.rave.web.ui.component.TreeNode.class;
079: defaultPropertyName = "text";
080: iconFileName_C16 = "/org/netbeans/modules/visualweb/web/ui/dt/component/TreeNode_C16";
081: iconFileName_C32 = "/org/netbeans/modules/visualweb/web/ui/dt/component/TreeNode_C32";
082: iconFileName_M16 = "/org/netbeans/modules/visualweb/web/ui/dt/component/TreeNode_M16";
083: iconFileName_M32 = "/org/netbeans/modules/visualweb/web/ui/dt/component/TreeNode_M32";
084:
085: }
086:
087: /**
088: * <p>The bean class that this BeanInfo represents.
089: */
090: protected Class beanClass;
091:
092: /**
093: * <p>The cached BeanDescriptor.</p>
094: */
095: protected BeanDescriptor beanDescriptor;
096:
097: /**
098: * <p>The index of the default property.</p>
099: */
100: protected int defaultPropertyIndex = -2;
101:
102: /**
103: * <p>The name of the default property.</p>
104: */
105: protected String defaultPropertyName;
106:
107: /**
108: * <p>The 16x16 color icon.</p>
109: */
110: protected String iconFileName_C16;
111:
112: /**
113: * <p>The 32x32 color icon.</p>
114: */
115: protected String iconFileName_C32;
116:
117: /**
118: * <p>The 16x16 monochrome icon.</p>
119: */
120: protected String iconFileName_M16;
121:
122: /**
123: * <p>The 32x32 monochrome icon.</p>
124: */
125: protected String iconFileName_M32;
126:
127: /**
128: * <p>The cached property descriptors.</p>
129: */
130: protected PropertyDescriptor[] propDescriptors;
131:
132: /**
133: * <p>Return the <code>BeanDescriptor</code> for this bean.</p>
134: */
135: public BeanDescriptor getBeanDescriptor() {
136:
137: if (beanDescriptor != null) {
138: return beanDescriptor;
139: }
140:
141: beanDescriptor = new BeanDescriptor(beanClass);
142: beanDescriptor.setDisplayName(resources
143: .getString("TreeNode_DisplayName"));
144: beanDescriptor.setShortDescription(resources
145: .getString("TreeNode_Description"));
146: beanDescriptor.setExpert(false);
147: beanDescriptor.setHidden(false);
148: beanDescriptor.setPreferred(false);
149: beanDescriptor.setValue(
150: Constants.BeanDescriptor.FACET_DESCRIPTORS,
151: getFacetDescriptors());
152: beanDescriptor.setValue(Constants.BeanDescriptor.HELP_KEY,
153: "projrave_ui_elements_palette_bh_tree_node");
154: beanDescriptor.setValue(Constants.BeanDescriptor.INSTANCE_NAME,
155: "treeNode");
156: beanDescriptor.setValue(Constants.BeanDescriptor.IS_CONTAINER,
157: Boolean.TRUE);
158: beanDescriptor
159: .setValue(Constants.BeanDescriptor.PROPERTIES_HELP_KEY,
160: "projrave_ui_elements_palette_bh_propsheets_bh_tree_node_props");
161: beanDescriptor.setValue(
162: Constants.BeanDescriptor.PROPERTY_CATEGORIES,
163: getCategoryDescriptors());
164: beanDescriptor.setValue(Constants.BeanDescriptor.TAG_NAME,
165: "treeNode");
166: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_PREFIX,
167: "ui");
168: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_URI,
169: "http://www.sun.com/web/ui");
170:
171: return beanDescriptor;
172:
173: }
174:
175: /**
176: * <p>Return the <code>CategoryDescriptor</code> array for the property categories of this component.</p>
177: */
178: private CategoryDescriptor[] getCategoryDescriptors() {
179:
180: return com.sun.rave.designtime.base.CategoryDescriptors
181: .getDefaultCategoryDescriptors();
182:
183: }
184:
185: /**
186: * <p>Return the index of the default property, or
187: * -1 if there is no default property.</p>
188: */
189: public int getDefaultPropertyIndex() {
190:
191: if (defaultPropertyIndex > -2) {
192: return defaultPropertyIndex;
193: } else {
194: if (defaultPropertyName == null) {
195: defaultPropertyIndex = -1;
196: } else {
197: PropertyDescriptor pd[] = getPropertyDescriptors();
198: for (int i = 0; i < pd.length; i++) {
199: if (defaultPropertyName.equals(pd[i].getName())) {
200: defaultPropertyIndex = i;
201: break;
202: }
203: }
204: }
205: }
206: return defaultPropertyIndex;
207: }
208:
209: /**
210: * <p>The cached facet descriptors.</p>
211: */
212: protected FacetDescriptor[] facetDescriptors;
213:
214: /**
215: * <p>Return the <code>FacetDescriptor</code>s for this bean.</p>
216: */
217: public FacetDescriptor[] getFacetDescriptors() {
218:
219: if (facetDescriptors != null) {
220: return facetDescriptors;
221: }
222: try {
223:
224: FacetDescriptor facet_content = new FacetDescriptor(
225: "content");
226: facet_content.setDisplayName(resources
227: .getString("TreeNode_content_DisplayName"));
228: facet_content.setShortDescription(resources
229: .getString("TreeNode_content_Description"));
230:
231: FacetDescriptor facet_image = new FacetDescriptor("image");
232: facet_image.setDisplayName(resources
233: .getString("TreeNode_image_DisplayName"));
234: facet_image.setShortDescription(resources
235: .getString("TreeNode_image_Description"));
236:
237: facetDescriptors = new FacetDescriptor[] { facet_content,
238: facet_image, };
239: return facetDescriptors;
240:
241: } catch (RuntimeException e) {
242: System.out.println(e.getMessage());
243: e.printStackTrace(System.out);
244: throw e;
245: }
246:
247: }
248:
249: /**
250: * <p>Return the specified image (if any)
251: * for this component class.</p>
252: */
253: public Image getIcon(int kind) {
254:
255: String name;
256: switch (kind) {
257: case ICON_COLOR_16x16:
258: name = iconFileName_C16;
259: break;
260: case ICON_COLOR_32x32:
261: name = iconFileName_C32;
262: break;
263: case ICON_MONO_16x16:
264: name = iconFileName_M16;
265: break;
266: case ICON_MONO_32x32:
267: name = iconFileName_M32;
268: break;
269: default:
270: name = null;
271: break;
272: }
273: if (name == null) {
274: return null;
275: }
276:
277: Image image = loadImage(name + ".png");
278: if (image == null) {
279: image = loadImage(name + ".gif");
280: }
281: return image;
282:
283: }
284:
285: /**
286: * <p>Return a class loaded by name via the class loader that loaded this class.</p>
287: */
288: private java.lang.Class loadClass(java.lang.String name) {
289:
290: try {
291: return Class.forName(name);
292: } catch (ClassNotFoundException e) {
293: throw new RuntimeException(e);
294: }
295:
296: }
297:
298: /**
299: * <p>Return the <code>PropertyDescriptor</code>s for this bean.</p>
300: */
301: public PropertyDescriptor[] getPropertyDescriptors() {
302:
303: if (propDescriptors != null) {
304: return propDescriptors;
305: }
306: AttributeDescriptor attrib = null;
307:
308: try {
309:
310: PropertyDescriptor prop_action = new PropertyDescriptor(
311: "action", beanClass, "getAction", "setAction");
312: prop_action.setDisplayName(resources
313: .getString("TreeNode_action_DisplayName"));
314: prop_action.setShortDescription(resources
315: .getString("TreeNode_action_Description"));
316: prop_action.setExpert(false);
317: prop_action.setHidden(false);
318: prop_action.setPreferred(false);
319: attrib = new AttributeDescriptor("action", false, null,
320: true);
321: prop_action.setValue(
322: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
323: attrib);
324: prop_action
325: .setValue(
326: Constants.PropertyDescriptor.CATEGORY,
327: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
328:
329: PropertyDescriptor prop_actionListener = new PropertyDescriptor(
330: "actionListener", beanClass, "getActionListener",
331: "setActionListener");
332: prop_actionListener.setDisplayName(resources
333: .getString("TreeNode_actionListener_DisplayName"));
334: prop_actionListener.setShortDescription(resources
335: .getString("TreeNode_actionListener_Description"));
336: prop_actionListener
337: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.MethodBindingPropertyEditor"));
338: prop_actionListener.setExpert(false);
339: prop_actionListener.setHidden(false);
340: prop_actionListener.setPreferred(false);
341: attrib = new AttributeDescriptor("actionListener", false,
342: null, true);
343: prop_actionListener.setValue(
344: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
345: attrib);
346: prop_actionListener
347: .setValue(
348: Constants.PropertyDescriptor.CATEGORY,
349: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
350:
351: PropertyDescriptor prop_expanded = new PropertyDescriptor(
352: "expanded", beanClass, "isExpanded", "setExpanded");
353: prop_expanded.setDisplayName(resources
354: .getString("TreeNode_expanded_DisplayName"));
355: prop_expanded.setShortDescription(resources
356: .getString("TreeNode_expanded_Description"));
357: prop_expanded.setExpert(false);
358: prop_expanded.setHidden(false);
359: prop_expanded.setPreferred(false);
360: attrib = new AttributeDescriptor("expanded", false,
361: "false", true);
362: prop_expanded.setValue(
363: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
364: attrib);
365: prop_expanded
366: .setValue(
367: Constants.PropertyDescriptor.CATEGORY,
368: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
369:
370: PropertyDescriptor prop_imageURL = new PropertyDescriptor(
371: "imageURL", beanClass, "getImageURL", "setImageURL");
372: prop_imageURL.setDisplayName(resources
373: .getString("TreeNode_imageURL_DisplayName"));
374: prop_imageURL.setShortDescription(resources
375: .getString("TreeNode_imageURL_Description"));
376: prop_imageURL
377: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.ImageUrlPropertyEditor"));
378: prop_imageURL.setExpert(false);
379: prop_imageURL.setHidden(true);
380: prop_imageURL.setPreferred(false);
381: attrib = new AttributeDescriptor("imageURL", false, null,
382: true);
383: prop_imageURL.setValue(
384: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
385: attrib);
386: prop_imageURL
387: .setValue(
388: Constants.PropertyDescriptor.CATEGORY,
389: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
390:
391: PropertyDescriptor prop_style = new PropertyDescriptor(
392: "style", beanClass, "getStyle", "setStyle");
393: prop_style.setDisplayName(resources
394: .getString("TreeNode_style_DisplayName"));
395: prop_style.setShortDescription(resources
396: .getString("TreeNode_style_Description"));
397: prop_style
398: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.css.CssStylePropertyEditor"));
399: prop_style.setExpert(false);
400: prop_style.setHidden(false);
401: prop_style.setPreferred(false);
402: attrib = new AttributeDescriptor("style", false, null, true);
403: prop_style.setValue(
404: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
405: attrib);
406: prop_style
407: .setValue(
408: Constants.PropertyDescriptor.CATEGORY,
409: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
410:
411: PropertyDescriptor prop_styleClass = new PropertyDescriptor(
412: "styleClass", beanClass, "getStyleClass",
413: "setStyleClass");
414: prop_styleClass.setDisplayName(resources
415: .getString("TreeNode_styleClass_DisplayName"));
416: prop_styleClass.setShortDescription(resources
417: .getString("TreeNode_styleClass_Description"));
418: prop_styleClass
419: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StyleClassPropertyEditor"));
420: prop_styleClass.setExpert(false);
421: prop_styleClass.setHidden(false);
422: prop_styleClass.setPreferred(false);
423: attrib = new AttributeDescriptor("styleClass", false, null,
424: true);
425: prop_styleClass.setValue(
426: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
427: attrib);
428: prop_styleClass
429: .setValue(
430: Constants.PropertyDescriptor.CATEGORY,
431: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
432:
433: PropertyDescriptor prop_target = new PropertyDescriptor(
434: "target", beanClass, "getTarget", "setTarget");
435: prop_target.setDisplayName(resources
436: .getString("TreeNode_target_DisplayName"));
437: prop_target.setShortDescription(resources
438: .getString("TreeNode_target_Description"));
439: prop_target
440: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.SelectOneDomainEditor"));
441: prop_target.setExpert(false);
442: prop_target.setHidden(false);
443: prop_target.setPreferred(false);
444: attrib = new AttributeDescriptor("target", false, null,
445: true);
446: prop_target.setValue(
447: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
448: attrib);
449: prop_target
450: .setValue(
451: Constants.PropertyDescriptor.CATEGORY,
452: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
453: prop_target
454: .setValue(
455: "com.sun.rave.propertyeditors.DOMAIN_CLASS",
456: com.sun.rave.propertyeditors.domains.HtmlFrameTargetsDomain.class);
457:
458: PropertyDescriptor prop_text = new PropertyDescriptor(
459: "text", beanClass, "getText", "setText");
460: prop_text.setDisplayName(resources
461: .getString("TreeNode_text_DisplayName"));
462: prop_text.setShortDescription(resources
463: .getString("TreeNode_text_Description"));
464: prop_text
465: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
466: prop_text.setExpert(false);
467: prop_text.setHidden(false);
468: prop_text.setPreferred(false);
469: attrib = new AttributeDescriptor("text", false, null, true);
470: prop_text.setValue(
471: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
472: attrib);
473: prop_text
474: .setValue(
475: Constants.PropertyDescriptor.CATEGORY,
476: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
477:
478: PropertyDescriptor prop_toolTip = new PropertyDescriptor(
479: "toolTip", beanClass, "getToolTip", "setToolTip");
480: prop_toolTip.setDisplayName(resources
481: .getString("TreeNode_toolTip_DisplayName"));
482: prop_toolTip.setShortDescription(resources
483: .getString("TreeNode_toolTip_Description"));
484: prop_toolTip
485: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
486: prop_toolTip.setExpert(false);
487: prop_toolTip.setHidden(false);
488: prop_toolTip.setPreferred(false);
489: attrib = new AttributeDescriptor("toolTip", false, null,
490: true);
491: prop_toolTip.setValue(
492: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
493: attrib);
494: prop_toolTip
495: .setValue(
496: Constants.PropertyDescriptor.CATEGORY,
497: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
498:
499: PropertyDescriptor prop_url = new PropertyDescriptor("url",
500: beanClass, "getUrl", "setUrl");
501: prop_url.setDisplayName(resources
502: .getString("TreeNode_url_DisplayName"));
503: prop_url.setShortDescription(resources
504: .getString("TreeNode_url_Description"));
505: prop_url
506: .setPropertyEditorClass(loadClass("org.netbeans.modules.visualweb.web.ui.dt.component.propertyeditors.SunWebUrlPropertyEditor"));
507: prop_url.setExpert(false);
508: prop_url.setHidden(false);
509: prop_url.setPreferred(false);
510: attrib = new AttributeDescriptor("url", false, null, true);
511: prop_url.setValue(
512: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
513: attrib);
514: prop_url
515: .setValue(
516: Constants.PropertyDescriptor.CATEGORY,
517: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
518:
519: PropertyDescriptor prop_visible = new PropertyDescriptor(
520: "visible", beanClass, "isVisible", "setVisible");
521: prop_visible.setDisplayName(resources
522: .getString("TreeNode_visible_DisplayName"));
523: prop_visible.setShortDescription(resources
524: .getString("TreeNode_visible_Description"));
525: prop_visible.setExpert(false);
526: prop_visible.setHidden(false);
527: prop_visible.setPreferred(false);
528: attrib = new AttributeDescriptor("visible", false, "true",
529: true);
530: prop_visible.setValue(
531: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
532: attrib);
533: prop_visible
534: .setValue(
535: Constants.PropertyDescriptor.CATEGORY,
536: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
537:
538: PropertyDescriptor prop_attributes = new PropertyDescriptor(
539: "attributes", beanClass, "getAttributes", null);
540: prop_attributes.setDisplayName(resources
541: .getString("TreeNode_attributes_DisplayName"));
542: prop_attributes.setShortDescription(resources
543: .getString("TreeNode_attributes_Description"));
544: prop_attributes.setExpert(false);
545: prop_attributes.setHidden(true);
546: prop_attributes.setPreferred(false);
547: prop_attributes
548: .setValue(
549: Constants.PropertyDescriptor.CATEGORY,
550: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
551:
552: PropertyDescriptor prop_childCount = new PropertyDescriptor(
553: "childCount", beanClass, "getChildCount", null);
554: prop_childCount.setDisplayName(resources
555: .getString("TreeNode_childCount_DisplayName"));
556: prop_childCount.setShortDescription(resources
557: .getString("TreeNode_childCount_Description"));
558: prop_childCount.setExpert(false);
559: prop_childCount.setHidden(true);
560: prop_childCount.setPreferred(false);
561: prop_childCount
562: .setValue(
563: Constants.PropertyDescriptor.CATEGORY,
564: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
565:
566: PropertyDescriptor prop_children = new PropertyDescriptor(
567: "children", beanClass, "getChildren", null);
568: prop_children.setDisplayName(resources
569: .getString("TreeNode_children_DisplayName"));
570: prop_children.setShortDescription(resources
571: .getString("TreeNode_children_Description"));
572: prop_children.setExpert(false);
573: prop_children.setHidden(true);
574: prop_children.setPreferred(false);
575: prop_children
576: .setValue(
577: Constants.PropertyDescriptor.CATEGORY,
578: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
579:
580: PropertyDescriptor prop_facets = new PropertyDescriptor(
581: "facets", beanClass, "getFacets", null);
582: prop_facets.setDisplayName(resources
583: .getString("TreeNode_facets_DisplayName"));
584: prop_facets.setShortDescription(resources
585: .getString("TreeNode_facets_Description"));
586: prop_facets.setExpert(false);
587: prop_facets.setHidden(true);
588: prop_facets.setPreferred(false);
589: prop_facets
590: .setValue(
591: Constants.PropertyDescriptor.CATEGORY,
592: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
593:
594: PropertyDescriptor prop_family = new PropertyDescriptor(
595: "family", beanClass, "getFamily", null);
596: prop_family.setDisplayName(resources
597: .getString("TreeNode_family_DisplayName"));
598: prop_family.setShortDescription(resources
599: .getString("TreeNode_family_Description"));
600: prop_family.setExpert(false);
601: prop_family.setHidden(true);
602: prop_family.setPreferred(false);
603: prop_family
604: .setValue(
605: Constants.PropertyDescriptor.CATEGORY,
606: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
607:
608: PropertyDescriptor prop_id = new PropertyDescriptor("id",
609: beanClass, "getId", "setId");
610: prop_id.setDisplayName(resources
611: .getString("TreeNode_id_DisplayName"));
612: prop_id.setShortDescription(resources
613: .getString("TreeNode_id_Description"));
614: prop_id.setExpert(false);
615: prop_id.setHidden(true);
616: prop_id.setPreferred(false);
617: attrib = new AttributeDescriptor("id", false, null, false);
618: prop_id.setValue(
619: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
620: attrib);
621: prop_id
622: .setValue(
623: Constants.PropertyDescriptor.CATEGORY,
624: com.sun.rave.designtime.base.CategoryDescriptors.GENERAL);
625:
626: PropertyDescriptor prop_parent = new PropertyDescriptor(
627: "parent", beanClass, "getParent", "setParent");
628: prop_parent.setDisplayName(resources
629: .getString("TreeNode_parent_DisplayName"));
630: prop_parent.setShortDescription(resources
631: .getString("TreeNode_parent_Description"));
632: prop_parent.setExpert(false);
633: prop_parent.setHidden(true);
634: prop_parent.setPreferred(false);
635: prop_parent
636: .setValue(
637: Constants.PropertyDescriptor.CATEGORY,
638: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
639:
640: PropertyDescriptor prop_rendered = new PropertyDescriptor(
641: "rendered", beanClass, "isRendered", "setRendered");
642: prop_rendered.setDisplayName(resources
643: .getString("TreeNode_rendered_DisplayName"));
644: prop_rendered.setShortDescription(resources
645: .getString("TreeNode_rendered_Description"));
646: prop_rendered.setExpert(false);
647: prop_rendered.setHidden(false);
648: prop_rendered.setPreferred(false);
649: attrib = new AttributeDescriptor("rendered", false, null,
650: true);
651: prop_rendered.setValue(
652: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
653: attrib);
654: prop_rendered
655: .setValue(
656: Constants.PropertyDescriptor.CATEGORY,
657: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
658:
659: PropertyDescriptor prop_rendererType = new PropertyDescriptor(
660: "rendererType", beanClass, "getRendererType",
661: "setRendererType");
662: prop_rendererType.setDisplayName(resources
663: .getString("TreeNode_rendererType_DisplayName"));
664: prop_rendererType.setShortDescription(resources
665: .getString("TreeNode_rendererType_Description"));
666: prop_rendererType.setExpert(false);
667: prop_rendererType.setHidden(true);
668: prop_rendererType.setPreferred(false);
669: prop_rendererType
670: .setValue(
671: Constants.PropertyDescriptor.CATEGORY,
672: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
673:
674: PropertyDescriptor prop_rendersChildren = new PropertyDescriptor(
675: "rendersChildren", beanClass, "getRendersChildren",
676: null);
677: prop_rendersChildren.setDisplayName(resources
678: .getString("TreeNode_rendersChildren_DisplayName"));
679: prop_rendersChildren.setShortDescription(resources
680: .getString("TreeNode_rendersChildren_Description"));
681: prop_rendersChildren.setExpert(false);
682: prop_rendersChildren.setHidden(true);
683: prop_rendersChildren.setPreferred(false);
684: prop_rendersChildren
685: .setValue(
686: Constants.PropertyDescriptor.CATEGORY,
687: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
688:
689: propDescriptors = new PropertyDescriptor[] { prop_action,
690: prop_actionListener, prop_attributes,
691: prop_childCount, prop_children, prop_expanded,
692: prop_facets, prop_family, prop_id, prop_imageURL,
693: prop_parent, prop_rendered, prop_rendererType,
694: prop_rendersChildren, prop_style, prop_styleClass,
695: prop_target, prop_text, prop_toolTip, prop_url,
696: prop_visible, };
697: return propDescriptors;
698:
699: } catch (IntrospectionException e) {
700: e.printStackTrace();
701: return null;
702: }
703:
704: }
705:
706: }
707: //GEN-END:BeanInfo
|