Logo Search packages:      
Sourcecode: wims version File versions


$Id: JomeBeanInfo.java,v 1.4 2003/02/18 11:48:46 sander Exp $

Copyright (C) 2001-2002 Mainline Project (I3S - ESSI - CNRS -UNSA)

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

For further information on the GNU Lesser General Public License,
see: http://www.gnu.org/copyleft/lesser.html
For further information on this library, contact: mainline@essi.fr

package fr.ove.openmath.jome;

import java.beans.*;
import java.beans.SimpleBeanInfo;
//import symantec.itools.beans.*;

public class JomeBeanInfo extends java.beans.SimpleBeanInfo
      public JomeBeanInfo()

       * Gets a BeanInfo for the superclass of this bean.
       * @return BeanInfo[] containing this bean's superclass BeanInfo
      public BeanInfo[] getAdditionalBeanInfo()
                  BeanInfo[] bi = new BeanInfo[1];
                  bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
                  return bi;
            catch (IntrospectionException e)
                  throw new Error(e.toString());

      * Gets the SymantecBeanDescriptor for this bean.
      * @return an object of type SymantecBeanDescriptor
      * @see symantec.itools.beans.SymantecBeanDescriptor
      public BeanDescriptor getBeanDescriptor()
            BeanDescriptor bd = new BeanDescriptor(beanClass);
            bd.setValue("CAN_ADD_CHILD",new Boolean(true));

            return bd;

       * Gets an image that may be used to visually represent this bean
       * (in the toolbar, on a form, etc).
       * @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
       * BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
       * @return an image for this bean
       * @see BeanInfo#ICON_MONO_16x16
       * @see BeanInfo#ICON_COLOR_16x16
       * @see BeanInfo#ICON_MONO_32x32
       * @see BeanInfo#ICON_COLOR_32x32
      public java.awt.Image getIcon(int nIconKind)
            java.awt.Image img = null;
            if (nIconKind == BeanInfo.ICON_COLOR_16x16)
                        img = loadImage("IconJOME_16.gif");
            if (nIconKind == BeanInfo.ICON_COLOR_32x32)
                  img = loadImage("IconJOME_16_32.gif");
            return img;

      private final static Class beanClass = Jome.class;

Generated by  Doxygen 1.6.0   Back to index