1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 package org.openoffice.netbeans.modules.office.loader;
25 
26 import java.awt.Image;
27 import java.beans.*;
28 
29 import org.openide.ErrorManager;
30 import org.openide.util.NbBundle;
31 import org.openide.util.Utilities;
32 
33 /** Description of {@link ParcelFolderDataLoader}.
34  *
35  * @author tomaso
36  */
37 public class ParcelFolderDataLoaderBeanInfo extends SimpleBeanInfo {
38 
39     // If you have additional properties:
40     /*
41     public PropertyDescriptor[] getPropertyDescriptors() {
42         try {
43             PropertyDescriptor myProp = new PropertyDescriptor("myProp", ParcelFolderDataLoader.class);
44             myProp.setDisplayName(NbBundle.getMessage(ParcelFolderDataLoaderBeanInfo.class, "PROP_myProp"));
45             myProp.setShortDescription(NbBundle.getMessage(ParcelFolderDataLoaderBeanInfo.class, "HINT_myProp"));
46             return new PropertyDescriptor[] {myProp};
47         } catch (IntrospectionException ie) {
48             ErrorManager.getDefault().notify(ie);
49             return null;
50         }
51     }
52      */
53 
getAdditionalBeanInfo()54     public BeanInfo[] getAdditionalBeanInfo() {
55         try {
56             // I.e. MultiFileLoader.class or UniFileLoader.class.
57             return new BeanInfo[] {Introspector.getBeanInfo(ParcelFolderDataLoader.class.getSuperclass())};
58         } catch (IntrospectionException ie) {
59             ErrorManager.getDefault().notify(ie);
60             return null;
61         }
62     }
63 
getIcon(int type)64     public Image getIcon(int type) {
65         if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
66             return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelFolderDataIcon.gif");
67         } else {
68             return Utilities.loadImage("org/openoffice/netbeans/modules/office/loaders/ParcelFolderDataIcon32.gif");
69         }
70     }
71 
72 }
73