Back to index

wims  3.65+svn20090927
LinearParserBeanInfo.java
Go to the documentation of this file.
00001 /*
00002 $Id: LinearParserBeanInfo.java,v 1.4 2003/02/18 11:48:46 sander Exp $
00003 */
00004 
00005 
00006 /*
00007 Copyright (C) 2001-2002 Mainline Project (I3S - ESSI - CNRS -UNSA)
00008 
00009 This library is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU Lesser General Public
00011 License as published by the Free Software Foundation; either
00012 version 2.1 of the License, or (at your option) any later version.
00013 
00014 This library is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 Lesser General Public License for more details.
00018 
00019 You should have received a copy of the GNU Lesser General Public
00020 License along with this library; if not, write to the Free Software
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023 For further information on the GNU Lesser General Public License,
00024 see: http://www.gnu.org/copyleft/lesser.html
00025 For further information on this library, contact: mainline@essi.fr
00026 */
00027 
00028 
00029 package fr.ove.openmath.jome.ctrl.linear;
00030 
00031 import java.beans.*;
00032 import java.beans.SimpleBeanInfo;
00033 //import symantec.itools.beans.*;
00034 
00035 public class LinearParserBeanInfo extends java.beans.SimpleBeanInfo
00036 {
00037        public LinearParserBeanInfo()
00038        {
00039        }
00040 
00045        public BeanInfo[] getAdditionalBeanInfo()
00046        {
00047               try
00048               {
00049                      BeanInfo[] bi = new BeanInfo[1];
00050                      bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
00051                      return bi;
00052               }
00053               catch (IntrospectionException e)
00054               {
00055                      throw new Error(e.toString());
00056               }
00057        }
00058 
00064        public BeanDescriptor getBeanDescriptor()
00065        {
00066               BeanDescriptor bd = new BeanDescriptor(beanClass);
00067               return bd;
00068        }
00069 
00081        public java.awt.Image getIcon(int nIconKind)
00082        {
00083               java.awt.Image img = null;
00084               if (nIconKind == BeanInfo.ICON_COLOR_16x16)
00085                             img = loadImage("LinearParser_16.gif");
00086               if (nIconKind == BeanInfo.ICON_COLOR_32x32)
00087                      img = loadImage("LinearParser_32.gif");
00088               return img;
00089        }
00090 
00091        private final static Class beanClass = LinearParser.class;
00092 }