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