-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathChartBeanBeanInfo.java
More file actions
37 lines (32 loc) · 991 Bytes
/
Copy pathChartBeanBeanInfo.java
File metadata and controls
37 lines (32 loc) · 991 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package chart2;
import java.awt.*;
import java.beans.*;
/**
* The bean info for the chart bean, specifying the icons and the customizer.
* @version 1.30 2007-10-05
* @author Cay Horstmann
*/
public class ChartBeanBeanInfo extends SimpleBeanInfo
{
private BeanDescriptor beanDescriptor;
private Image iconColor16;
private Image iconColor32;
private Image iconMono16;
private Image iconMono32;
public ChartBeanBeanInfo()
{
beanDescriptor = new BeanDescriptor(ChartBean.class, ChartBeanCustomizer.class);
}
public BeanDescriptor getBeanDescriptor()
{
return beanDescriptor;
}
public Image getIcon(int iconType)
{
if (iconType == BeanInfo.ICON_COLOR_16x16) return iconColor16;
else if (iconType == BeanInfo.ICON_COLOR_32x32) return iconColor32;
else if (iconType == BeanInfo.ICON_MONO_16x16) return iconMono16;
else if (iconType == BeanInfo.ICON_MONO_32x32) return iconMono32;
else return null;
}
}