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 ImageComponentBeanInfoBase 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(),
071: ImageComponentBeanInfoBase.class.getClassLoader());
072:
073: /**
074: * <p>Construct a new <code>ImageComponentBeanInfoBase</code>.</p>
075: */
076: public ImageComponentBeanInfoBase() {
077:
078: beanClass = com.sun.rave.web.ui.component.ImageComponent.class;
079: iconFileName_C16 = "/org/netbeans/modules/visualweb/web/ui/dt/component/ImageComponent_C16";
080: iconFileName_C32 = "/org/netbeans/modules/visualweb/web/ui/dt/component/ImageComponent_C32";
081: iconFileName_M16 = "/org/netbeans/modules/visualweb/web/ui/dt/component/ImageComponent_M16";
082: iconFileName_M32 = "/org/netbeans/modules/visualweb/web/ui/dt/component/ImageComponent_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("ImageComponent_DisplayName"));
143: beanDescriptor.setShortDescription(resources
144: .getString("ImageComponent_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.HELP_KEY,
152: "projrave_ui_elements_palette_bh_image");
153: beanDescriptor.setValue(Constants.BeanDescriptor.INSTANCE_NAME,
154: "image");
155: beanDescriptor.setValue(Constants.BeanDescriptor.IS_CONTAINER,
156: Boolean.FALSE);
157: beanDescriptor
158: .setValue(Constants.BeanDescriptor.PROPERTIES_HELP_KEY,
159: "projrave_ui_elements_palette_bh_propsheets_bh_image_props");
160: beanDescriptor.setValue(
161: Constants.BeanDescriptor.PROPERTY_CATEGORIES,
162: getCategoryDescriptors());
163: beanDescriptor.setValue(Constants.BeanDescriptor.TAG_NAME,
164: "image");
165: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_PREFIX,
166: "ui");
167: beanDescriptor.setValue(Constants.BeanDescriptor.TAGLIB_URI,
168: "http://www.sun.com/web/ui");
169:
170: return beanDescriptor;
171:
172: }
173:
174: /**
175: * <p>Return the <code>CategoryDescriptor</code> array for the property categories of this component.</p>
176: */
177: private CategoryDescriptor[] getCategoryDescriptors() {
178:
179: return com.sun.rave.designtime.base.CategoryDescriptors
180: .getDefaultCategoryDescriptors();
181:
182: }
183:
184: /**
185: * <p>Return the index of the default property, or
186: * -1 if there is no default property.</p>
187: */
188: public int getDefaultPropertyIndex() {
189:
190: if (defaultPropertyIndex > -2) {
191: return defaultPropertyIndex;
192: } else {
193: if (defaultPropertyName == null) {
194: defaultPropertyIndex = -1;
195: } else {
196: PropertyDescriptor pd[] = getPropertyDescriptors();
197: for (int i = 0; i < pd.length; i++) {
198: if (defaultPropertyName.equals(pd[i].getName())) {
199: defaultPropertyIndex = i;
200: break;
201: }
202: }
203: }
204: }
205: return defaultPropertyIndex;
206: }
207:
208: /**
209: * <p>The cached facet descriptors.</p>
210: */
211: protected FacetDescriptor[] facetDescriptors;
212:
213: /**
214: * <p>Return the <code>FacetDescriptor</code>s for this bean.</p>
215: */
216: public FacetDescriptor[] getFacetDescriptors() {
217:
218: if (facetDescriptors != null) {
219: return facetDescriptors;
220: }
221: facetDescriptors = new FacetDescriptor[] {};
222: return facetDescriptors;
223:
224: }
225:
226: /**
227: * <p>Return the specified image (if any)
228: * for this component class.</p>
229: */
230: public Image getIcon(int kind) {
231:
232: String name;
233: switch (kind) {
234: case ICON_COLOR_16x16:
235: name = iconFileName_C16;
236: break;
237: case ICON_COLOR_32x32:
238: name = iconFileName_C32;
239: break;
240: case ICON_MONO_16x16:
241: name = iconFileName_M16;
242: break;
243: case ICON_MONO_32x32:
244: name = iconFileName_M32;
245: break;
246: default:
247: name = null;
248: break;
249: }
250: if (name == null) {
251: return null;
252: }
253:
254: Image image = loadImage(name + ".png");
255: if (image == null) {
256: image = loadImage(name + ".gif");
257: }
258: return image;
259:
260: }
261:
262: /**
263: * <p>Return a class loaded by name via the class loader that loaded this class.</p>
264: */
265: private java.lang.Class loadClass(java.lang.String name) {
266:
267: try {
268: return Class.forName(name);
269: } catch (ClassNotFoundException e) {
270: throw new RuntimeException(e);
271: }
272:
273: }
274:
275: /**
276: * <p>Return the <code>PropertyDescriptor</code>s for this bean.</p>
277: */
278: public PropertyDescriptor[] getPropertyDescriptors() {
279:
280: if (propDescriptors != null) {
281: return propDescriptors;
282: }
283: AttributeDescriptor attrib = null;
284:
285: try {
286:
287: PropertyDescriptor prop_align = new PropertyDescriptor(
288: "align", beanClass, "getAlign", "setAlign");
289: prop_align.setDisplayName(resources
290: .getString("ImageComponent_align_DisplayName"));
291: prop_align.setShortDescription(resources
292: .getString("ImageComponent_align_Description"));
293: prop_align
294: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.SelectOneDomainEditor"));
295: prop_align.setExpert(false);
296: prop_align.setHidden(false);
297: prop_align.setPreferred(false);
298: attrib = new AttributeDescriptor("align", false, null, true);
299: prop_align.setValue(
300: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
301: attrib);
302: prop_align
303: .setValue(
304: Constants.PropertyDescriptor.CATEGORY,
305: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
306: prop_align
307: .setValue(
308: "com.sun.rave.propertyeditors.DOMAIN_CLASS",
309: com.sun.rave.propertyeditors.domains.HtmlAlignDomain.class);
310:
311: PropertyDescriptor prop_alt = new PropertyDescriptor("alt",
312: beanClass, "getAlt", "setAlt");
313: prop_alt.setDisplayName(resources
314: .getString("ImageComponent_alt_DisplayName"));
315: prop_alt.setShortDescription(resources
316: .getString("ImageComponent_alt_Description"));
317: prop_alt
318: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
319: prop_alt.setExpert(false);
320: prop_alt.setHidden(false);
321: prop_alt.setPreferred(false);
322: attrib = new AttributeDescriptor("alt", false, null, true);
323: prop_alt.setValue(
324: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
325: attrib);
326: prop_alt
327: .setValue(
328: Constants.PropertyDescriptor.CATEGORY,
329: com.sun.rave.designtime.base.CategoryDescriptors.ACCESSIBILITY);
330:
331: PropertyDescriptor prop_border = new PropertyDescriptor(
332: "border", beanClass, "getBorder", "setBorder");
333: prop_border.setDisplayName(resources
334: .getString("ImageComponent_border_DisplayName"));
335: prop_border.setShortDescription(resources
336: .getString("ImageComponent_border_Description"));
337: prop_border
338: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
339: prop_border.setExpert(false);
340: prop_border.setHidden(false);
341: prop_border.setPreferred(false);
342: attrib = new AttributeDescriptor("border", false, "0", true);
343: prop_border.setValue(
344: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
345: attrib);
346: prop_border
347: .setValue(
348: Constants.PropertyDescriptor.CATEGORY,
349: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
350: prop_border.setValue(
351: "com.sun.rave.propertyeditors.MIN_VALUE", "0");
352:
353: PropertyDescriptor prop_height = new PropertyDescriptor(
354: "height", beanClass, "getHeight", "setHeight");
355: prop_height.setDisplayName(resources
356: .getString("ImageComponent_height_DisplayName"));
357: prop_height.setShortDescription(resources
358: .getString("ImageComponent_height_Description"));
359: prop_height
360: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
361: prop_height.setExpert(false);
362: prop_height.setHidden(false);
363: prop_height.setPreferred(false);
364: attrib = new AttributeDescriptor("height", false, null,
365: true);
366: prop_height.setValue(
367: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
368: attrib);
369: prop_height
370: .setValue(
371: Constants.PropertyDescriptor.CATEGORY,
372: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
373: prop_height.setValue(
374: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
375:
376: PropertyDescriptor prop_hspace = new PropertyDescriptor(
377: "hspace", beanClass, "getHspace", "setHspace");
378: prop_hspace.setDisplayName(resources
379: .getString("ImageComponent_hspace_DisplayName"));
380: prop_hspace.setShortDescription(resources
381: .getString("ImageComponent_hspace_Description"));
382: prop_hspace
383: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
384: prop_hspace.setExpert(false);
385: prop_hspace.setHidden(false);
386: prop_hspace.setPreferred(false);
387: attrib = new AttributeDescriptor("hspace", false, null,
388: true);
389: prop_hspace.setValue(
390: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
391: attrib);
392: prop_hspace
393: .setValue(
394: Constants.PropertyDescriptor.CATEGORY,
395: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
396: prop_hspace.setValue(
397: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
398:
399: PropertyDescriptor prop_icon = new PropertyDescriptor(
400: "icon", beanClass, "getIcon", "setIcon");
401: prop_icon.setDisplayName(resources
402: .getString("ImageComponent_icon_DisplayName"));
403: prop_icon.setShortDescription(resources
404: .getString("ImageComponent_icon_Description"));
405: prop_icon
406: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.SelectOneDomainEditor"));
407: prop_icon.setExpert(false);
408: prop_icon.setHidden(false);
409: prop_icon.setPreferred(false);
410: attrib = new AttributeDescriptor("icon", false, null, true);
411: prop_icon.setValue(
412: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
413: attrib);
414: prop_icon
415: .setValue(
416: Constants.PropertyDescriptor.CATEGORY,
417: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
418: prop_icon
419: .setValue(
420: "com.sun.rave.propertyeditors.DOMAIN_CLASS",
421: org.netbeans.modules.visualweb.web.ui.dt.component.propertyeditors.ThemeIconsDomain.class);
422:
423: PropertyDescriptor prop_longDesc = new PropertyDescriptor(
424: "longDesc", beanClass, "getLongDesc", "setLongDesc");
425: prop_longDesc.setDisplayName(resources
426: .getString("ImageComponent_longDesc_DisplayName"));
427: prop_longDesc.setShortDescription(resources
428: .getString("ImageComponent_longDesc_Description"));
429: prop_longDesc
430: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
431: prop_longDesc.setExpert(false);
432: prop_longDesc.setHidden(false);
433: prop_longDesc.setPreferred(false);
434: attrib = new AttributeDescriptor("longDesc", false, null,
435: true);
436: prop_longDesc.setValue(
437: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
438: attrib);
439: prop_longDesc
440: .setValue(
441: Constants.PropertyDescriptor.CATEGORY,
442: com.sun.rave.designtime.base.CategoryDescriptors.ACCESSIBILITY);
443:
444: PropertyDescriptor prop_onClick = new PropertyDescriptor(
445: "onClick", beanClass, "getOnClick", "setOnClick");
446: prop_onClick.setDisplayName(resources
447: .getString("ImageComponent_onClick_DisplayName"));
448: prop_onClick.setShortDescription(resources
449: .getString("ImageComponent_onClick_Description"));
450: prop_onClick
451: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
452: prop_onClick.setExpert(false);
453: prop_onClick.setHidden(false);
454: prop_onClick.setPreferred(false);
455: attrib = new AttributeDescriptor("onClick", false, null,
456: true);
457: prop_onClick.setValue(
458: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
459: attrib);
460: prop_onClick
461: .setValue(
462: Constants.PropertyDescriptor.CATEGORY,
463: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
464:
465: PropertyDescriptor prop_onDblClick = new PropertyDescriptor(
466: "onDblClick", beanClass, "getOnDblClick",
467: "setOnDblClick");
468: prop_onDblClick
469: .setDisplayName(resources
470: .getString("ImageComponent_onDblClick_DisplayName"));
471: prop_onDblClick
472: .setShortDescription(resources
473: .getString("ImageComponent_onDblClick_Description"));
474: prop_onDblClick
475: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
476: prop_onDblClick.setExpert(false);
477: prop_onDblClick.setHidden(false);
478: prop_onDblClick.setPreferred(false);
479: attrib = new AttributeDescriptor("onDblClick", false, null,
480: true);
481: prop_onDblClick.setValue(
482: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
483: attrib);
484: prop_onDblClick
485: .setValue(
486: Constants.PropertyDescriptor.CATEGORY,
487: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
488:
489: PropertyDescriptor prop_onMouseDown = new PropertyDescriptor(
490: "onMouseDown", beanClass, "getOnMouseDown",
491: "setOnMouseDown");
492: prop_onMouseDown
493: .setDisplayName(resources
494: .getString("ImageComponent_onMouseDown_DisplayName"));
495: prop_onMouseDown
496: .setShortDescription(resources
497: .getString("ImageComponent_onMouseDown_Description"));
498: prop_onMouseDown
499: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
500: prop_onMouseDown.setExpert(false);
501: prop_onMouseDown.setHidden(false);
502: prop_onMouseDown.setPreferred(false);
503: attrib = new AttributeDescriptor("onMouseDown", false,
504: null, true);
505: prop_onMouseDown.setValue(
506: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
507: attrib);
508: prop_onMouseDown
509: .setValue(
510: Constants.PropertyDescriptor.CATEGORY,
511: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
512:
513: PropertyDescriptor prop_onMouseMove = new PropertyDescriptor(
514: "onMouseMove", beanClass, "getOnMouseMove",
515: "setOnMouseMove");
516: prop_onMouseMove
517: .setDisplayName(resources
518: .getString("ImageComponent_onMouseMove_DisplayName"));
519: prop_onMouseMove
520: .setShortDescription(resources
521: .getString("ImageComponent_onMouseMove_Description"));
522: prop_onMouseMove
523: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
524: prop_onMouseMove.setExpert(false);
525: prop_onMouseMove.setHidden(false);
526: prop_onMouseMove.setPreferred(false);
527: attrib = new AttributeDescriptor("onMouseMove", false,
528: null, true);
529: prop_onMouseMove.setValue(
530: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
531: attrib);
532: prop_onMouseMove
533: .setValue(
534: Constants.PropertyDescriptor.CATEGORY,
535: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
536:
537: PropertyDescriptor prop_onMouseOut = new PropertyDescriptor(
538: "onMouseOut", beanClass, "getOnMouseOut",
539: "setOnMouseOut");
540: prop_onMouseOut
541: .setDisplayName(resources
542: .getString("ImageComponent_onMouseOut_DisplayName"));
543: prop_onMouseOut
544: .setShortDescription(resources
545: .getString("ImageComponent_onMouseOut_Description"));
546: prop_onMouseOut
547: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
548: prop_onMouseOut.setExpert(false);
549: prop_onMouseOut.setHidden(false);
550: prop_onMouseOut.setPreferred(false);
551: attrib = new AttributeDescriptor("onMouseOut", false, null,
552: true);
553: prop_onMouseOut.setValue(
554: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
555: attrib);
556: prop_onMouseOut
557: .setValue(
558: Constants.PropertyDescriptor.CATEGORY,
559: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
560:
561: PropertyDescriptor prop_onMouseOver = new PropertyDescriptor(
562: "onMouseOver", beanClass, "getOnMouseOver",
563: "setOnMouseOver");
564: prop_onMouseOver
565: .setDisplayName(resources
566: .getString("ImageComponent_onMouseOver_DisplayName"));
567: prop_onMouseOver
568: .setShortDescription(resources
569: .getString("ImageComponent_onMouseOver_Description"));
570: prop_onMouseOver
571: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
572: prop_onMouseOver.setExpert(false);
573: prop_onMouseOver.setHidden(false);
574: prop_onMouseOver.setPreferred(false);
575: attrib = new AttributeDescriptor("onMouseOver", false,
576: null, true);
577: prop_onMouseOver.setValue(
578: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
579: attrib);
580: prop_onMouseOver
581: .setValue(
582: Constants.PropertyDescriptor.CATEGORY,
583: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
584:
585: PropertyDescriptor prop_onMouseUp = new PropertyDescriptor(
586: "onMouseUp", beanClass, "getOnMouseUp",
587: "setOnMouseUp");
588: prop_onMouseUp.setDisplayName(resources
589: .getString("ImageComponent_onMouseUp_DisplayName"));
590: prop_onMouseUp.setShortDescription(resources
591: .getString("ImageComponent_onMouseUp_Description"));
592: prop_onMouseUp
593: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.JavaScriptPropertyEditor"));
594: prop_onMouseUp.setExpert(false);
595: prop_onMouseUp.setHidden(false);
596: prop_onMouseUp.setPreferred(false);
597: attrib = new AttributeDescriptor("onMouseUp", false, null,
598: true);
599: prop_onMouseUp.setValue(
600: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
601: attrib);
602: prop_onMouseUp
603: .setValue(
604: Constants.PropertyDescriptor.CATEGORY,
605: com.sun.rave.designtime.base.CategoryDescriptors.JAVASCRIPT);
606:
607: PropertyDescriptor prop_style = new PropertyDescriptor(
608: "style", beanClass, "getStyle", "setStyle");
609: prop_style.setDisplayName(resources
610: .getString("ImageComponent_style_DisplayName"));
611: prop_style.setShortDescription(resources
612: .getString("ImageComponent_style_Description"));
613: prop_style
614: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.css.CssStylePropertyEditor"));
615: prop_style.setExpert(false);
616: prop_style.setHidden(false);
617: prop_style.setPreferred(false);
618: attrib = new AttributeDescriptor("style", false, null, true);
619: prop_style.setValue(
620: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
621: attrib);
622: prop_style
623: .setValue(
624: Constants.PropertyDescriptor.CATEGORY,
625: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
626:
627: PropertyDescriptor prop_styleClass = new PropertyDescriptor(
628: "styleClass", beanClass, "getStyleClass",
629: "setStyleClass");
630: prop_styleClass
631: .setDisplayName(resources
632: .getString("ImageComponent_styleClass_DisplayName"));
633: prop_styleClass
634: .setShortDescription(resources
635: .getString("ImageComponent_styleClass_Description"));
636: prop_styleClass
637: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StyleClassPropertyEditor"));
638: prop_styleClass.setExpert(false);
639: prop_styleClass.setHidden(false);
640: prop_styleClass.setPreferred(false);
641: attrib = new AttributeDescriptor("styleClass", false, null,
642: true);
643: prop_styleClass.setValue(
644: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
645: attrib);
646: prop_styleClass
647: .setValue(
648: Constants.PropertyDescriptor.CATEGORY,
649: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
650:
651: PropertyDescriptor prop_toolTip = new PropertyDescriptor(
652: "toolTip", beanClass, "getToolTip", "setToolTip");
653: prop_toolTip.setDisplayName(resources
654: .getString("ImageComponent_toolTip_DisplayName"));
655: prop_toolTip.setShortDescription(resources
656: .getString("ImageComponent_toolTip_Description"));
657: prop_toolTip
658: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.StringPropertyEditor"));
659: prop_toolTip.setExpert(false);
660: prop_toolTip.setHidden(false);
661: prop_toolTip.setPreferred(false);
662: attrib = new AttributeDescriptor("toolTip", false, null,
663: true);
664: prop_toolTip.setValue(
665: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
666: attrib);
667: prop_toolTip
668: .setValue(
669: Constants.PropertyDescriptor.CATEGORY,
670: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
671:
672: PropertyDescriptor prop_url = new PropertyDescriptor("url",
673: beanClass, "getUrl", "setUrl");
674: prop_url.setDisplayName(resources
675: .getString("ImageComponent_url_DisplayName"));
676: prop_url.setShortDescription(resources
677: .getString("ImageComponent_url_Description"));
678: prop_url
679: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.ImageUrlPropertyEditor"));
680: prop_url.setExpert(false);
681: prop_url.setHidden(false);
682: prop_url.setPreferred(false);
683: attrib = new AttributeDescriptor("url", false, null, true);
684: prop_url.setValue(
685: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
686: attrib);
687: prop_url
688: .setValue(
689: Constants.PropertyDescriptor.CATEGORY,
690: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
691:
692: PropertyDescriptor prop_visible = new PropertyDescriptor(
693: "visible", beanClass, "isVisible", "setVisible");
694: prop_visible.setDisplayName(resources
695: .getString("ImageComponent_visible_DisplayName"));
696: prop_visible.setShortDescription(resources
697: .getString("ImageComponent_visible_Description"));
698: prop_visible.setExpert(false);
699: prop_visible.setHidden(false);
700: prop_visible.setPreferred(false);
701: attrib = new AttributeDescriptor("visible", false, "true",
702: true);
703: prop_visible.setValue(
704: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
705: attrib);
706: prop_visible
707: .setValue(
708: Constants.PropertyDescriptor.CATEGORY,
709: com.sun.rave.designtime.base.CategoryDescriptors.BEHAVIOR);
710:
711: PropertyDescriptor prop_vspace = new PropertyDescriptor(
712: "vspace", beanClass, "getVspace", "setVspace");
713: prop_vspace.setDisplayName(resources
714: .getString("ImageComponent_vspace_DisplayName"));
715: prop_vspace.setShortDescription(resources
716: .getString("ImageComponent_vspace_Description"));
717: prop_vspace
718: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
719: prop_vspace.setExpert(false);
720: prop_vspace.setHidden(false);
721: prop_vspace.setPreferred(false);
722: attrib = new AttributeDescriptor("vspace", false, null,
723: true);
724: prop_vspace.setValue(
725: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
726: attrib);
727: prop_vspace
728: .setValue(
729: Constants.PropertyDescriptor.CATEGORY,
730: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
731: prop_vspace.setValue(
732: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
733:
734: PropertyDescriptor prop_width = new PropertyDescriptor(
735: "width", beanClass, "getWidth", "setWidth");
736: prop_width.setDisplayName(resources
737: .getString("ImageComponent_width_DisplayName"));
738: prop_width.setShortDescription(resources
739: .getString("ImageComponent_width_Description"));
740: prop_width
741: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.IntegerPropertyEditor"));
742: prop_width.setExpert(false);
743: prop_width.setHidden(false);
744: prop_width.setPreferred(false);
745: attrib = new AttributeDescriptor("width", false, null, true);
746: prop_width.setValue(
747: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
748: attrib);
749: prop_width
750: .setValue(
751: Constants.PropertyDescriptor.CATEGORY,
752: com.sun.rave.designtime.base.CategoryDescriptors.APPEARANCE);
753: prop_width.setValue(
754: "com.sun.rave.propertyeditors.MIN_VALUE", "1");
755:
756: PropertyDescriptor prop_attributes = new PropertyDescriptor(
757: "attributes", beanClass, "getAttributes", null);
758: prop_attributes
759: .setDisplayName(resources
760: .getString("ImageComponent_attributes_DisplayName"));
761: prop_attributes
762: .setShortDescription(resources
763: .getString("ImageComponent_attributes_Description"));
764: prop_attributes.setExpert(false);
765: prop_attributes.setHidden(true);
766: prop_attributes.setPreferred(false);
767: prop_attributes
768: .setValue(
769: Constants.PropertyDescriptor.CATEGORY,
770: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
771:
772: PropertyDescriptor prop_childCount = new PropertyDescriptor(
773: "childCount", beanClass, "getChildCount", null);
774: prop_childCount
775: .setDisplayName(resources
776: .getString("ImageComponent_childCount_DisplayName"));
777: prop_childCount
778: .setShortDescription(resources
779: .getString("ImageComponent_childCount_Description"));
780: prop_childCount.setExpert(false);
781: prop_childCount.setHidden(true);
782: prop_childCount.setPreferred(false);
783: prop_childCount
784: .setValue(
785: Constants.PropertyDescriptor.CATEGORY,
786: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
787:
788: PropertyDescriptor prop_children = new PropertyDescriptor(
789: "children", beanClass, "getChildren", null);
790: prop_children.setDisplayName(resources
791: .getString("ImageComponent_children_DisplayName"));
792: prop_children.setShortDescription(resources
793: .getString("ImageComponent_children_Description"));
794: prop_children.setExpert(false);
795: prop_children.setHidden(true);
796: prop_children.setPreferred(false);
797: prop_children
798: .setValue(
799: Constants.PropertyDescriptor.CATEGORY,
800: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
801:
802: PropertyDescriptor prop_facets = new PropertyDescriptor(
803: "facets", beanClass, "getFacets", null);
804: prop_facets.setDisplayName(resources
805: .getString("ImageComponent_facets_DisplayName"));
806: prop_facets.setShortDescription(resources
807: .getString("ImageComponent_facets_Description"));
808: prop_facets.setExpert(false);
809: prop_facets.setHidden(true);
810: prop_facets.setPreferred(false);
811: prop_facets
812: .setValue(
813: Constants.PropertyDescriptor.CATEGORY,
814: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
815:
816: PropertyDescriptor prop_family = new PropertyDescriptor(
817: "family", beanClass, "getFamily", null);
818: prop_family.setDisplayName(resources
819: .getString("ImageComponent_family_DisplayName"));
820: prop_family.setShortDescription(resources
821: .getString("ImageComponent_family_Description"));
822: prop_family.setExpert(false);
823: prop_family.setHidden(true);
824: prop_family.setPreferred(false);
825: prop_family
826: .setValue(
827: Constants.PropertyDescriptor.CATEGORY,
828: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
829:
830: PropertyDescriptor prop_id = new PropertyDescriptor("id",
831: beanClass, "getId", "setId");
832: prop_id.setDisplayName(resources
833: .getString("ImageComponent_id_DisplayName"));
834: prop_id.setShortDescription(resources
835: .getString("ImageComponent_id_Description"));
836: prop_id.setExpert(false);
837: prop_id.setHidden(true);
838: prop_id.setPreferred(false);
839: attrib = new AttributeDescriptor("id", false, null, true);
840: prop_id.setValue(
841: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
842: attrib);
843: prop_id
844: .setValue(
845: Constants.PropertyDescriptor.CATEGORY,
846: com.sun.rave.designtime.base.CategoryDescriptors.GENERAL);
847:
848: PropertyDescriptor prop_parent = new PropertyDescriptor(
849: "parent", beanClass, "getParent", null);
850: prop_parent.setDisplayName(resources
851: .getString("ImageComponent_parent_DisplayName"));
852: prop_parent.setShortDescription(resources
853: .getString("ImageComponent_parent_Description"));
854: prop_parent.setExpert(false);
855: prop_parent.setHidden(true);
856: prop_parent.setPreferred(false);
857: prop_parent
858: .setValue(
859: Constants.PropertyDescriptor.CATEGORY,
860: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
861:
862: PropertyDescriptor prop_rendered = new PropertyDescriptor(
863: "rendered", beanClass, "isRendered", "setRendered");
864: prop_rendered.setDisplayName(resources
865: .getString("ImageComponent_rendered_DisplayName"));
866: prop_rendered.setShortDescription(resources
867: .getString("ImageComponent_rendered_Description"));
868: prop_rendered.setExpert(false);
869: prop_rendered.setHidden(false);
870: prop_rendered.setPreferred(false);
871: attrib = new AttributeDescriptor("rendered", false, null,
872: true);
873: prop_rendered.setValue(
874: Constants.PropertyDescriptor.ATTRIBUTE_DESCRIPTOR,
875: attrib);
876: prop_rendered
877: .setValue(
878: Constants.PropertyDescriptor.CATEGORY,
879: com.sun.rave.designtime.base.CategoryDescriptors.ADVANCED);
880:
881: PropertyDescriptor prop_rendererType = new PropertyDescriptor(
882: "rendererType", beanClass, "getRendererType",
883: "setRendererType");
884: prop_rendererType
885: .setDisplayName(resources
886: .getString("ImageComponent_rendererType_DisplayName"));
887: prop_rendererType
888: .setShortDescription(resources
889: .getString("ImageComponent_rendererType_Description"));
890: prop_rendererType.setExpert(false);
891: prop_rendererType.setHidden(true);
892: prop_rendererType.setPreferred(false);
893: prop_rendererType
894: .setValue(
895: Constants.PropertyDescriptor.CATEGORY,
896: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
897:
898: PropertyDescriptor prop_rendersChildren = new PropertyDescriptor(
899: "rendersChildren", beanClass, "getRendersChildren",
900: null);
901: prop_rendersChildren
902: .setDisplayName(resources
903: .getString("ImageComponent_rendersChildren_DisplayName"));
904: prop_rendersChildren
905: .setShortDescription(resources
906: .getString("ImageComponent_rendersChildren_Description"));
907: prop_rendersChildren.setExpert(false);
908: prop_rendersChildren.setHidden(true);
909: prop_rendersChildren.setPreferred(false);
910: prop_rendersChildren
911: .setValue(
912: Constants.PropertyDescriptor.CATEGORY,
913: com.sun.rave.designtime.base.CategoryDescriptors.INTERNAL);
914:
915: PropertyDescriptor prop_value = new PropertyDescriptor(
916: "value", beanClass, "getValue", "setValue");
917: prop_value.setDisplayName(resources
918: .getString("ImageComponent_value_DisplayName"));
919: prop_value.setShortDescription(resources
920: .getString("ImageComponent_value_Description"));
921: prop_value
922: .setPropertyEditorClass(loadClass("com.sun.rave.propertyeditors.binding.ValueBindingPropertyEditor"));
923: prop_value.setExpert(false);
924: prop_value.setHidden(true);
925: prop_value.setPreferred(false);
926: prop_value
927: .setValue(
928: Constants.PropertyDescriptor.CATEGORY,
929: com.sun.rave.designtime.base.CategoryDescriptors.DATA);
930: prop_value.setValue("ignoreIsBound", "true");
931:
932: propDescriptors = new PropertyDescriptor[] { prop_align,
933: prop_alt, prop_attributes, prop_border,
934: prop_childCount, prop_children, prop_facets,
935: prop_family, prop_height, prop_hspace, prop_icon,
936: prop_id, prop_longDesc, prop_onClick,
937: prop_onDblClick, prop_onMouseDown,
938: prop_onMouseMove, prop_onMouseOut,
939: prop_onMouseOver, prop_onMouseUp, prop_parent,
940: prop_rendered, prop_rendererType,
941: prop_rendersChildren, prop_style, prop_styleClass,
942: prop_toolTip, prop_url, prop_value, prop_visible,
943: prop_vspace, prop_width, };
944: return propDescriptors;
945:
946: } catch (IntrospectionException e) {
947: e.printStackTrace();
948: return null;
949: }
950:
951: }
952:
953: }
954: //GEN-END:BeanInfo
|