source: ether_statistics/service/implementation/gov/noaa/pmel/sgt/beans/DataModelBeanInfo.java @ 569

Last change on this file since 569 was 569, checked in by vmipsl, 12 years ago

Nouveau projet

File size: 1.5 KB
Line 
1package gov.noaa.pmel.sgt.beans;
2
3import java.beans.*;
4
5/**
6 * BeanInfo object for <code>DataModel</code>.
7 * @author Donald Denbo
8 * @version $Revision: 1.2 $, $Date: 2003/08/22 23:02:34 $
9 * @since 3.0
10 **/
11public class DataModelBeanInfo extends SimpleBeanInfo {
12  private Class beanClass = DataModel.class;
13  private String iconColor16x16Filename = "DataModelIcon16.gif";
14  private String iconColor32x32Filename = "DataModelIcon32.gif";
15  private String iconMono16x16Filename;
16  private String iconMono32x32Filename;
17
18  public DataModelBeanInfo() {
19  }
20  public PropertyDescriptor[] getPropertyDescriptors() {
21    try {
22      PropertyDescriptor _page = new PropertyDescriptor("page", beanClass, "getPage", "setPage");
23      PropertyDescriptor[] pds = new PropertyDescriptor[] {
24        _page};
25      return pds;
26    }
27    catch(IntrospectionException ex) {
28      ex.printStackTrace();
29      return null;
30    }
31  }
32  public java.awt.Image getIcon(int iconKind) {
33    switch (iconKind) {
34      case BeanInfo.ICON_COLOR_16x16:
35        return iconColor16x16Filename != null ? loadImage(iconColor16x16Filename) : null;
36      case BeanInfo.ICON_COLOR_32x32:
37        return iconColor32x32Filename != null ? loadImage(iconColor32x32Filename) : null;
38      case BeanInfo.ICON_MONO_16x16:
39        return iconMono16x16Filename != null ? loadImage(iconMono16x16Filename) : null;
40      case BeanInfo.ICON_MONO_32x32:
41        return iconMono32x32Filename != null ? loadImage(iconMono32x32Filename) : null;
42    }
43    return null;
44  }
45}
Note: See TracBrowser for help on using the repository browser.