/*
 *  Initiative - A role playing utility to track turns
 *  Copyright (C) 2002 Devon D Jones
 *
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 *
 *  The author of this program grants you the ability to use this code
 *  in conjunction with code that is covered under the Open Gaming License
 *
 */
package org.evilsoft.gaming.Init;

import java.awt.Image;
import java.beans.*;

import org.openide.TopManager;
import org.openide.util.NbBundle;
import org.openide.util.Utilities;

/** Description of {@link TutorialDataLoader}.
 *
 * @author devon
 */
public class InitiativeDataLoaderBeanInfo extends SimpleBeanInfo {
    
    // If you have additional properties:
    /*
    public PropertyDescriptor[] getPropertyDescriptors () {
        try {
            PropertyDescriptor myProp = new PropertyDescriptor ("myProp", TutorialDataLoader.class);
            myProp.setDisplayName (NbBundle.getMessage (TutorialDataLoaderBeanInfo.class, "PROP_myProp"));
            myProp.setShortDescription (NbBundle.getMessage (TutorialDataLoaderBeanInfo.class, "HINT_myProp"));
            return new PropertyDescriptor[] { myProp };
        } catch (IntrospectionException ie) {
            TopManager.getDefault ().getErrorManager ().notify (ie);
            return null;
        }
    }
     */
    
    public BeanInfo[] getAdditionalBeanInfo() {
        try {
            // I.e. MultiFileLoader.class or UniFileLoader.class.
            return new BeanInfo[] { Introspector.getBeanInfo(InitiativeDataLoader.class.getSuperclass()) };
        } catch (IntrospectionException ie) {
            TopManager.getDefault().getErrorManager().notify(ie);
            return null;
        }
    }
    
    public Image getIcon(int type) {
        if (type == BeanInfo.ICON_COLOR_16x16 || type == BeanInfo.ICON_MONO_16x16) {
            return Utilities.loadImage("__PACKAGE_NAME_SLASHES$DataLoaderBeanInfo$DataIcon$MyIcon__.gif");
        } else {
            return Utilities.loadImage("__PACKAGE_NAME_SLASHES$DataLoaderBeanInfo$DataIcon32$MyIcon32__.gif");
        }
    }
    
}
