1 |
/* gnu.java.beans.ExplicitBeanInfo |
/* ExplicitBeanInfo.java -- |
2 |
Copyright (C) 1998 Free Software Foundation, Inc. |
Copyright (C) 1998, 2004 Free Software Foundation, Inc. |
3 |
|
|
4 |
This file is part of GNU Classpath. |
This file is part of GNU Classpath. |
5 |
|
|
38 |
|
|
39 |
package gnu.java.beans; |
package gnu.java.beans; |
40 |
|
|
41 |
|
import java.awt.Image; |
42 |
import java.beans.BeanDescriptor; |
import java.beans.BeanDescriptor; |
43 |
import java.beans.BeanInfo; |
import java.beans.BeanInfo; |
44 |
import java.beans.EventSetDescriptor; |
import java.beans.EventSetDescriptor; |
85 |
protected BeanInfo[] additionalBeanInfo; |
protected BeanInfo[] additionalBeanInfo; |
86 |
|
|
87 |
/** The set of icons. **/ |
/** The set of icons. **/ |
88 |
protected java.awt.Image[] icons; |
protected Image[] icons; |
89 |
|
|
90 |
public ExplicitBeanInfo(BeanDescriptor beanDescriptor, |
public ExplicitBeanInfo(BeanDescriptor beanDescriptor, |
91 |
BeanInfo[] additionalBeanInfo, |
BeanInfo[] additionalBeanInfo, |
94 |
EventSetDescriptor[] eventSetDescriptors, |
EventSetDescriptor[] eventSetDescriptors, |
95 |
int defaultEventIndex, |
int defaultEventIndex, |
96 |
MethodDescriptor[] methodDescriptors, |
MethodDescriptor[] methodDescriptors, |
97 |
java.awt.Image[] icons) { |
Image[] icons) { |
98 |
this.beanDescriptor = beanDescriptor; |
this.beanDescriptor = beanDescriptor; |
99 |
this.additionalBeanInfo = additionalBeanInfo; |
this.additionalBeanInfo = additionalBeanInfo; |
100 |
this.propertyDescriptors = propertyDescriptors; |
this.propertyDescriptors = propertyDescriptors; |
143 |
/** Get Bean icons. |
/** Get Bean icons. |
144 |
** @param iconType the type of icon |
** @param iconType the type of icon |
145 |
**/ |
**/ |
146 |
public java.awt.Image getIcon(int iconType) { |
public Image getIcon(int iconType) { |
147 |
return icons != null ? icons[iconType] : null; |
return icons != null ? icons[iconType - 1] : null; |
148 |
} |
} |
149 |
} |
} |