1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package com.cosylab.gui.components.introspection;
21
22
23
24
25
26
27
28 public class ClassEntryPanelBeanInfo extends java.beans.SimpleBeanInfo {
29
30
31
32
33 public java.beans.PropertyDescriptor allowInterfacePropertyDescriptor() {
34 java.beans.PropertyDescriptor aDescriptor = null;
35 try {
36 try {
37
38 java.lang.reflect.Method aGetMethod = null;
39 try {
40
41 java.lang.Class aGetMethodParameterTypes[] = {};
42 aGetMethod = getBeanClass().getMethod("getAllowInterface", aGetMethodParameterTypes);
43 } catch (Throwable exception) {
44
45 handleException(exception);
46 aGetMethod = findMethod(getBeanClass(), "getAllowInterface", 0);
47 };
48 java.lang.reflect.Method aSetMethod = null;
49 try {
50
51 java.lang.Class aSetMethodParameterTypes[] = {
52 boolean.class
53 };
54 aSetMethod = getBeanClass().getMethod("setAllowInterface", aSetMethodParameterTypes);
55 } catch (Throwable exception) {
56
57 handleException(exception);
58 aSetMethod = findMethod(getBeanClass(), "setAllowInterface", 1);
59 };
60 aDescriptor = new java.beans.PropertyDescriptor("allowInterface"
61 , aGetMethod, aSetMethod);
62 } catch (Throwable exception) {
63
64 handleException(exception);
65 aDescriptor = new java.beans.PropertyDescriptor("allowInterface"
66 , getBeanClass());
67 };
68
69
70
71 aDescriptor.setShortDescription("specifies whether user can enter an interface");
72
73
74
75
76 } catch (Throwable exception) {
77 handleException(exception);
78 };
79 return aDescriptor;
80 }
81
82
83
84
85
86 public java.beans.PropertyDescriptor backgroundPropertyDescriptor() {
87 java.beans.PropertyDescriptor aDescriptor = null;
88 try {
89 try {
90
91 java.lang.reflect.Method aGetMethod = null;
92 try {
93
94 java.lang.Class aGetMethodParameterTypes[] = {};
95 aGetMethod = getBeanClass().getMethod("getBackground", aGetMethodParameterTypes);
96 } catch (Throwable exception) {
97
98 handleException(exception);
99 aGetMethod = findMethod(getBeanClass(), "getBackground", 0);
100 };
101 java.lang.reflect.Method aSetMethod = null;
102 try {
103
104 java.lang.Class aSetMethodParameterTypes[] = {
105 java.awt.Color.class
106 };
107 aSetMethod = getBeanClass().getMethod("setBackground", aSetMethodParameterTypes);
108 } catch (Throwable exception) {
109
110 handleException(exception);
111 aSetMethod = findMethod(getBeanClass(), "setBackground", 1);
112 };
113 aDescriptor = new java.beans.PropertyDescriptor("background"
114 , aGetMethod, aSetMethod);
115 } catch (Throwable exception) {
116
117 handleException(exception);
118 aDescriptor = new java.beans.PropertyDescriptor("background"
119 , getBeanClass());
120 };
121
122
123
124 aDescriptor.setShortDescription("Background color");
125
126
127
128
129 } catch (Throwable exception) {
130 handleException(exception);
131 };
132 return aDescriptor;
133 }
134
135
136
137
138
139 public java.beans.PropertyDescriptor captionPropertyDescriptor() {
140 java.beans.PropertyDescriptor aDescriptor = null;
141 try {
142 try {
143
144 java.lang.reflect.Method aGetMethod = null;
145 try {
146
147 java.lang.Class aGetMethodParameterTypes[] = {};
148 aGetMethod = getBeanClass().getMethod("getCaption", aGetMethodParameterTypes);
149 } catch (Throwable exception) {
150
151 handleException(exception);
152 aGetMethod = findMethod(getBeanClass(), "getCaption", 0);
153 };
154 java.lang.reflect.Method aSetMethod = null;
155 try {
156
157 java.lang.Class aSetMethodParameterTypes[] = {
158 java.lang.String.class
159 };
160 aSetMethod = getBeanClass().getMethod("setCaption", aSetMethodParameterTypes);
161 } catch (Throwable exception) {
162
163 handleException(exception);
164 aSetMethod = findMethod(getBeanClass(), "setCaption", 1);
165 };
166 aDescriptor = new java.beans.PropertyDescriptor("caption"
167 , aGetMethod, aSetMethod);
168 } catch (Throwable exception) {
169
170 handleException(exception);
171 aDescriptor = new java.beans.PropertyDescriptor("caption"
172 , getBeanClass());
173 };
174
175
176
177
178
179
180
181
182 } catch (Throwable exception) {
183 handleException(exception);
184 };
185 return aDescriptor;
186 }
187
188
189
190
191
192 public java.beans.PropertyDescriptor componentOrientationPropertyDescriptor() {
193 java.beans.PropertyDescriptor aDescriptor = null;
194 try {
195 try {
196
197 java.lang.reflect.Method aGetMethod = null;
198 try {
199
200 java.lang.Class aGetMethodParameterTypes[] = {};
201 aGetMethod = getBeanClass().getMethod("getComponentOrientation", aGetMethodParameterTypes);
202 } catch (Throwable exception) {
203
204 handleException(exception);
205 aGetMethod = findMethod(getBeanClass(), "getComponentOrientation", 0);
206 };
207 java.lang.reflect.Method aSetMethod = null;
208 try {
209
210 java.lang.Class aSetMethodParameterTypes[] = {
211 java.awt.ComponentOrientation.class
212 };
213 aSetMethod = getBeanClass().getMethod("setComponentOrientation", aSetMethodParameterTypes);
214 } catch (Throwable exception) {
215
216 handleException(exception);
217 aSetMethod = findMethod(getBeanClass(), "setComponentOrientation", 1);
218 };
219 aDescriptor = new java.beans.PropertyDescriptor("componentOrientation"
220 , aGetMethod, aSetMethod);
221 } catch (Throwable exception) {
222
223 handleException(exception);
224 aDescriptor = new java.beans.PropertyDescriptor("componentOrientation"
225 , getBeanClass());
226 };
227
228
229
230
231
232
233
234
235 aDescriptor.setValue("enumerationValues", new Object[] {
236 "UNKNOWN",java.awt.ComponentOrientation.UNKNOWN,"java.awt.ComponentOrientation.UNKNOWN",
237 "LEFT_TO_RIGHT",java.awt.ComponentOrientation.LEFT_TO_RIGHT,"java.awt.ComponentOrientation.LEFT_TO_RIGHT",
238 "RIGHT_TO_LEFT",java.awt.ComponentOrientation.RIGHT_TO_LEFT,"java.awt.ComponentOrientation.RIGHT_TO_LEFT",
239 });
240 } catch (Throwable exception) {
241 handleException(exception);
242 };
243 return aDescriptor;
244 }
245
246
247
248
249
250 public java.beans.PropertyDescriptor errorColorPropertyDescriptor() {
251 java.beans.PropertyDescriptor aDescriptor = null;
252 try {
253 try {
254
255 java.lang.reflect.Method aGetMethod = null;
256 try {
257
258 java.lang.Class aGetMethodParameterTypes[] = {};
259 aGetMethod = getBeanClass().getMethod("getErrorColor", aGetMethodParameterTypes);
260 } catch (Throwable exception) {
261
262 handleException(exception);
263 aGetMethod = findMethod(getBeanClass(), "getErrorColor", 0);
264 };
265 java.lang.reflect.Method aSetMethod = null;
266 try {
267
268 java.lang.Class aSetMethodParameterTypes[] = {
269 java.awt.Color.class
270 };
271 aSetMethod = getBeanClass().getMethod("setErrorColor", aSetMethodParameterTypes);
272 } catch (Throwable exception) {
273
274 handleException(exception);
275 aSetMethod = findMethod(getBeanClass(), "setErrorColor", 1);
276 };
277 aDescriptor = new java.beans.PropertyDescriptor("errorColor"
278 , aGetMethod, aSetMethod);
279 } catch (Throwable exception) {
280
281 handleException(exception);
282 aDescriptor = new java.beans.PropertyDescriptor("errorColor"
283 , getBeanClass());
284 };
285
286
287
288
289
290
291
292
293 } catch (Throwable exception) {
294 handleException(exception);
295 };
296 return aDescriptor;
297 }
298
299
300
301
302
303
304
305
306 public static java.lang.reflect.Method findMethod(java.lang.Class aClass, java.lang.String methodName, int parameterCount) {
307 try {
308
309
310 java.lang.reflect.Method methods[] = aClass.getMethods();
311 for (int index = 0; index < methods.length; index++){
312 java.lang.reflect.Method method = methods[index];
313 if ((method.getParameterTypes().length == parameterCount) && (method.getName().equals(methodName))) {
314 return method;
315 }
316 }
317 } catch (java.lang.Throwable exception) {
318 return null;
319 }
320 return null;
321 }
322
323
324
325
326
327
328 public java.beans.BeanInfo[] getAdditionalBeanInfo() {
329 java.lang.Class superClass;
330 java.beans.BeanInfo superBeanInfo = null;
331
332 try {
333 superClass = getBeanDescriptor().getBeanClass().getSuperclass();
334 } catch (java.lang.Throwable exception) {
335 return null;
336 }
337
338 try {
339 superBeanInfo = java.beans.Introspector.getBeanInfo(superClass);
340 } catch (java.beans.IntrospectionException ie) {}
341
342 if (superBeanInfo != null) {
343 java.beans.BeanInfo[] ret = new java.beans.BeanInfo[1];
344 ret[0] = superBeanInfo;
345 return ret;
346 }
347 return null;
348 }
349
350
351
352
353 public static java.lang.Class getBeanClass() {
354 return com.cosylab.gui.components.introspection.ClassEntryPanel.class;
355 }
356
357
358
359
360 public static java.lang.String getBeanClassName() {
361 return "com.cosylab.gui.adapters.infobus.ClassTextField";
362 }
363
364
365
366
367 public java.beans.BeanDescriptor getBeanDescriptor() {
368 java.beans.BeanDescriptor aDescriptor = null;
369 try {
370
371 aDescriptor = new java.beans.BeanDescriptor(com.cosylab.gui.components.introspection.ClassEntryPanel.class);
372
373
374
375 } catch (Throwable exception) {
376 };
377 return aDescriptor;
378 }
379
380
381
382
383
384 public java.beans.EventSetDescriptor[] getEventSetDescriptors() {
385 try {
386 java.beans.EventSetDescriptor aDescriptorList[] = {};
387 return aDescriptorList;
388 } catch (Throwable exception) {
389 handleException(exception);
390 };
391 return null;
392 }
393
394
395
396
397
398 public java.beans.MethodDescriptor[] getMethodDescriptors() {
399 try {
400 java.beans.MethodDescriptor aDescriptorList[] = {
401 main_javalangString__MethodDescriptor()
402 };
403 return aDescriptorList;
404 } catch (Throwable exception) {
405 handleException(exception);
406 };
407 return null;
408 }
409
410
411
412
413
414 public java.beans.PropertyDescriptor[] getPropertyDescriptors() {
415 try {
416 java.beans.PropertyDescriptor aDescriptorList[] = {
417 allowInterfacePropertyDescriptor()
418 ,backgroundPropertyDescriptor()
419 ,captionPropertyDescriptor()
420 ,componentOrientationPropertyDescriptor()
421 ,errorColorPropertyDescriptor()
422 ,showCaptionPropertyDescriptor()
423 ,showErrorLabelPropertyDescriptor()
424 ,superClassPropertyDescriptor()
425 ,userClassPropertyDescriptor()
426 };
427 return aDescriptorList;
428 } catch (Throwable exception) {
429 handleException(exception);
430 };
431 return null;
432 }
433
434
435
436
437 private void handleException(java.lang.Throwable exception) {
438
439
440
441
442 }
443
444
445
446
447 public java.beans.MethodDescriptor main_javalangString__MethodDescriptor() {
448 java.beans.MethodDescriptor aDescriptor = null;
449 try {
450
451 java.lang.reflect.Method aMethod = null;
452 try {
453
454 java.lang.Class aParameterTypes[] = {
455 java.lang.String[].class
456 };
457 aMethod = getBeanClass().getMethod("main", aParameterTypes);
458 } catch (Throwable exception) {
459
460 handleException(exception);
461 aMethod = findMethod(getBeanClass(), "main", 1);
462 };
463 try {
464
465 java.beans.ParameterDescriptor aParameterDescriptor1 = new java.beans.ParameterDescriptor();
466 aParameterDescriptor1.setName("arg1");
467 aParameterDescriptor1.setDisplayName("args");
468 java.beans.ParameterDescriptor aParameterDescriptors[] = {
469 aParameterDescriptor1
470 };
471 aDescriptor = new java.beans.MethodDescriptor(aMethod, aParameterDescriptors);
472 } catch (Throwable exception) {
473
474 handleException(exception);
475 aDescriptor = new java.beans.MethodDescriptor(aMethod);
476 };
477
478
479
480
481
482 } catch (Throwable exception) {
483 handleException(exception);
484 };
485 return aDescriptor;
486 }
487
488
489
490
491 public java.beans.PropertyDescriptor showCaptionPropertyDescriptor() {
492 java.beans.PropertyDescriptor aDescriptor = null;
493 try {
494 try {
495
496 java.lang.reflect.Method aGetMethod = null;
497 try {
498
499 java.lang.Class aGetMethodParameterTypes[] = {};
500 aGetMethod = getBeanClass().getMethod("getShowCaption", aGetMethodParameterTypes);
501 } catch (Throwable exception) {
502
503 handleException(exception);
504 aGetMethod = findMethod(getBeanClass(), "getShowCaption", 0);
505 };
506 java.lang.reflect.Method aSetMethod = null;
507 try {
508
509 java.lang.Class aSetMethodParameterTypes[] = {
510 boolean.class
511 };
512 aSetMethod = getBeanClass().getMethod("setShowCaption", aSetMethodParameterTypes);
513 } catch (Throwable exception) {
514
515 handleException(exception);
516 aSetMethod = findMethod(getBeanClass(), "setShowCaption", 1);
517 };
518 aDescriptor = new java.beans.PropertyDescriptor("showCaption"
519 , aGetMethod, aSetMethod);
520 } catch (Throwable exception) {
521
522 handleException(exception);
523 aDescriptor = new java.beans.PropertyDescriptor("showCaption"
524 , getBeanClass());
525 };
526
527
528
529
530
531
532
533
534 } catch (Throwable exception) {
535 handleException(exception);
536 };
537 return aDescriptor;
538 }
539
540
541
542
543 public java.beans.PropertyDescriptor showErrorLabelPropertyDescriptor() {
544 java.beans.PropertyDescriptor aDescriptor = null;
545 try {
546 try {
547
548 java.lang.reflect.Method aGetMethod = null;
549 try {
550
551 java.lang.Class aGetMethodParameterTypes[] = {};
552 aGetMethod = getBeanClass().getMethod("getShowErrorLabel", aGetMethodParameterTypes);
553 } catch (Throwable exception) {
554
555 handleException(exception);
556 aGetMethod = findMethod(getBeanClass(), "getShowErrorLabel", 0);
557 };
558 java.lang.reflect.Method aSetMethod = null;
559 try {
560
561 java.lang.Class aSetMethodParameterTypes[] = {
562 boolean.class
563 };
564 aSetMethod = getBeanClass().getMethod("setShowErrorLabel", aSetMethodParameterTypes);
565 } catch (Throwable exception) {
566
567 handleException(exception);
568 aSetMethod = findMethod(getBeanClass(), "setShowErrorLabel", 1);
569 };
570 aDescriptor = new java.beans.PropertyDescriptor("showErrorLabel"
571 , aGetMethod, aSetMethod);
572 } catch (Throwable exception) {
573
574 handleException(exception);
575 aDescriptor = new java.beans.PropertyDescriptor("showErrorLabel"
576 , getBeanClass());
577 };
578
579
580
581 aDescriptor.setShortDescription("s");
582
583
584
585
586 } catch (Throwable exception) {
587 handleException(exception);
588 };
589 return aDescriptor;
590 }
591
592
593
594
595 public java.beans.PropertyDescriptor superClassPropertyDescriptor() {
596 java.beans.PropertyDescriptor aDescriptor = null;
597 try {
598 try {
599
600 java.lang.reflect.Method aGetMethod = null;
601 try {
602
603 java.lang.Class aGetMethodParameterTypes[] = {};
604 aGetMethod = getBeanClass().getMethod("getSuperClass", aGetMethodParameterTypes);
605 } catch (Throwable exception) {
606
607 handleException(exception);
608 aGetMethod = findMethod(getBeanClass(), "getSuperClass", 0);
609 };
610 java.lang.reflect.Method aSetMethod = null;
611 try {
612
613 java.lang.Class aSetMethodParameterTypes[] = {
614 java.lang.Class.class
615 };
616 aSetMethod = getBeanClass().getMethod("setSuperClass", aSetMethodParameterTypes);
617 } catch (Throwable exception) {
618
619 handleException(exception);
620 aSetMethod = findMethod(getBeanClass(), "setSuperClass", 1);
621 };
622 aDescriptor = new java.beans.PropertyDescriptor("superClass"
623 , aGetMethod, aSetMethod);
624 } catch (Throwable exception) {
625
626 handleException(exception);
627 aDescriptor = new java.beans.PropertyDescriptor("superClass"
628 , getBeanClass());
629 };
630
631
632
633
634
635
636 aDescriptor.setValue("preferred", new Boolean(true));
637
638 } catch (Throwable exception) {
639 handleException(exception);
640 };
641 return aDescriptor;
642 }
643
644
645
646
647 public java.beans.PropertyDescriptor userClassPropertyDescriptor() {
648 java.beans.PropertyDescriptor aDescriptor = null;
649 try {
650 try {
651
652 java.lang.reflect.Method aGetMethod = null;
653 try {
654
655 java.lang.Class aGetMethodParameterTypes[] = {};
656 aGetMethod = getBeanClass().getMethod("getUserClass", aGetMethodParameterTypes);
657 } catch (Throwable exception) {
658
659 handleException(exception);
660 aGetMethod = findMethod(getBeanClass(), "getUserClass", 0);
661 };
662 java.lang.reflect.Method aSetMethod = null;
663 aDescriptor = new java.beans.PropertyDescriptor("userClass"
664 , aGetMethod, aSetMethod);
665 } catch (Throwable exception) {
666
667 handleException(exception);
668 aDescriptor = new java.beans.PropertyDescriptor("userClass"
669 , getBeanClass());
670 };
671 aDescriptor.setBound(true);
672
673
674
675
676
677 aDescriptor.setValue("preferred", new Boolean(true));
678
679 } catch (Throwable exception) {
680 handleException(exception);
681 };
682 return aDescriptor;
683 }
684 }