Clover coverage report - Graph - 1.0.0
Coverage timestamp: ven. déc. 26 2003 02:14:20 CET
file stats: LOC: 234   Methods: 7
NCLOC: 157   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
GraphInternalFrameBeanInfo.java 0% 0% 0% 0%
coverage
 1   
 /*
 2   
  * Fichier g�n�r� - Ne pas �diter!
 3   
  */
 4   
 package org.ejtools.graph.frame;
 5   
 
 6   
 import java.awt.Image;
 7   
 import java.beans.BeanDescriptor;
 8   
 import java.beans.BeanInfo;
 9   
 import java.beans.Introspector;
 10   
 import java.beans.IntrospectionException;
 11   
 import java.beans.PropertyDescriptor;
 12   
 import java.beans.ParameterDescriptor;
 13   
 import java.beans.MethodDescriptor;
 14   
 import java.beans.SimpleBeanInfo;
 15   
 import java.lang.reflect.Method;
 16   
 import java.util.ResourceBundle;
 17   
 import java.util.Vector;
 18   
 
 19   
 /**
 20   
  * beaninfo_for arguments: [Ljava.lang.String;@7e9505
 21   
  */
 22   
 public class GraphInternalFrameBeanInfo extends SimpleBeanInfo
 23   
 {
 24   
    /** Description of the Field */
 25   
    protected BeanDescriptor bd = new BeanDescriptor(org.ejtools.graph.frame.GraphInternalFrame.class);
 26   
    /** Description of the Field */
 27   
    protected Image iconColor16 = null;
 28   
    /** Description of the Field */
 29   
    protected Image iconMono16 = null;
 30   
    /** Description of the Field */
 31   
    protected Image iconColor32 = null;
 32   
    /** Description of the Field */
 33   
    protected Image iconMono32 = null;
 34   
    /** Description of the Field */
 35   
    private final static ResourceBundle res = ResourceBundle.getBundle("org.ejtools.graph.frame.GraphInternalFrameBeanInfo");
 36   
 
 37   
    /** Constructor for the GraphInternalFrameBeanInfo object */
 38  0
    public GraphInternalFrameBeanInfo()
 39   
    {
 40  0
       try
 41   
       {
 42  0
          BeanInfo info = Introspector.getBeanInfo(getBeanDescriptor().getBeanClass().getSuperclass());
 43  0
          String order = info.getBeanDescriptor().getValue("propertyorder") == null ? "" : (String) info.getBeanDescriptor().getValue("propertyorder");
 44  0
          PropertyDescriptor[] pd = getPropertyDescriptors();
 45  0
          for (int i = 0; i != pd.length; i++)
 46   
          {
 47  0
             if (order.indexOf(pd[i].getName()) == -1)
 48   
             {
 49  0
                order = order + (order.length() == 0 ? "" : ":") + pd[i].getName();
 50   
             }
 51   
          }
 52  0
          getBeanDescriptor().setValue("propertyorder", order);
 53   
       }
 54   
       catch (Exception e)
 55   
       {
 56   
          // Ignore it
 57   
       }
 58   
    }
 59   
 
 60   
    /**
 61   
     * Gets the additionalBeanInfo
 62   
     *
 63   
     * @return   The additionalBeanInfo value
 64   
     */
 65  0
    public BeanInfo[] getAdditionalBeanInfo()
 66   
    {
 67  0
       Vector bi = new Vector();
 68  0
       BeanInfo[] biarr = null;
 69  0
       try
 70   
       {
 71   
       }
 72   
       catch (Exception e)
 73   
       {
 74   
          // Ignore it
 75   
       }
 76  0
       return biarr;
 77   
    }
 78   
 
 79   
    /**
 80   
     * Gets the beanDescriptor
 81   
     *
 82   
     * @return   The beanDescriptor value
 83   
     */
 84  0
    public BeanDescriptor getBeanDescriptor()
 85   
    {
 86   
 
 87  0
       bd.setDisplayName(res.getString("bean.displayName"));
 88  0
       bd.setShortDescription(res.getString("bean.shortDescription"));
 89   
 
 90  0
       return bd;
 91   
    }
 92   
 
 93   
    /**
 94   
     * Gets the defaultPropertyIndex
 95   
     *
 96   
     * @return   The defaultPropertyIndex value
 97   
     */
 98  0
    public int getDefaultPropertyIndex()
 99   
    {
 100  0
       String defName = "";
 101  0
       if (defName.equals(""))
 102   
       {
 103  0
          return -1;
 104   
       }
 105  0
       PropertyDescriptor[] pd = getPropertyDescriptors();
 106  0
       for (int i = 0; i < pd.length; i++)
 107   
       {
 108  0
          if (pd[i].getName().equals(defName))
 109   
          {
 110  0
             return i;
 111   
          }
 112   
       }
 113  0
       return -1;
 114   
    }
 115   
 
 116   
    /**
 117   
     * Gets the icon
 118   
     *
 119   
     * @param type  Description of the Parameter
 120   
     * @return      The icon value
 121   
     */
 122  0
    public Image getIcon(int type)
 123   
    {
 124  0
       if (type == BeanInfo.ICON_COLOR_16x16)
 125   
       {
 126   
 
 127  0
          return iconColor16;
 128   
       }
 129  0
       if (type == BeanInfo.ICON_MONO_16x16)
 130   
       {
 131   
 
 132  0
          return iconMono16;
 133   
       }
 134  0
       if (type == BeanInfo.ICON_COLOR_32x32)
 135   
       {
 136   
 
 137  0
          return iconColor32;
 138   
       }
 139  0
       if (type == BeanInfo.ICON_MONO_32x32)
 140   
       {
 141   
 
 142  0
          return iconMono32;
 143   
       }
 144  0
       return null;
 145   
    }
 146   
 
 147   
    /**
 148   
     * Gets the Property Descriptors
 149   
     *
 150   
     * @return   The propertyDescriptors value
 151   
     */
 152  0
    public PropertyDescriptor[] getPropertyDescriptors()
 153   
    {
 154  0
       try
 155   
       {
 156  0
          Vector descriptors = new Vector();
 157  0
          PropertyDescriptor descriptor = null;
 158   
 
 159  0
          try
 160   
          {
 161  0
             descriptor = new PropertyDescriptor("name", org.ejtools.graph.frame.GraphInternalFrame.class);
 162   
          }
 163   
          catch (IntrospectionException e)
 164   
          {
 165  0
             descriptor = new PropertyDescriptor("name", org.ejtools.graph.frame.GraphInternalFrame.class, "getName", null);
 166   
          }
 167   
 
 168  0
          descriptor.setDisplayName(res.getString("property.name.displayName"));
 169  0
          descriptor.setShortDescription(res.getString("property.name.shortDescription"));
 170   
 
 171  0
          descriptors.add(descriptor);
 172   
 
 173  0
          try
 174   
          {
 175  0
             descriptor = new PropertyDescriptor("delay", org.ejtools.graph.frame.GraphInternalFrame.class);
 176   
          }
 177   
          catch (IntrospectionException e)
 178   
          {
 179  0
             descriptor = new PropertyDescriptor("delay", org.ejtools.graph.frame.GraphInternalFrame.class, "getDelay", null);
 180   
          }
 181   
 
 182  0
          descriptor.setDisplayName(res.getString("property.delay.displayName"));
 183  0
          descriptor.setShortDescription(res.getString("property.delay.shortDescription"));
 184   
 
 185  0
          descriptor.setPropertyEditorClass(Class.forName("org.ejtools.graph.editor.GraphDelayEditor"));
 186   
 
 187  0
          descriptors.add(descriptor);
 188   
 
 189  0
          try
 190   
          {
 191  0
             descriptor = new PropertyDescriptor("scale", org.ejtools.graph.frame.GraphInternalFrame.class);
 192   
          }
 193   
          catch (IntrospectionException e)
 194   
          {
 195  0
             descriptor = new PropertyDescriptor("scale", org.ejtools.graph.frame.GraphInternalFrame.class, "getScale", null);
 196   
          }
 197   
 
 198  0
          descriptor.setDisplayName(res.getString("property.scale.displayName"));
 199  0
          descriptor.setShortDescription(res.getString("property.scale.shortDescription"));
 200   
 
 201  0
          descriptor.setPropertyEditorClass(Class.forName("org.ejtools.graph.editor.GraphScaleEditor"));
 202   
 
 203  0
          descriptors.add(descriptor);
 204   
 
 205  0
          return (PropertyDescriptor[]) descriptors.toArray(new PropertyDescriptor[descriptors.size()]);
 206   
       }
 207   
       catch (Exception e)
 208   
       {
 209   
          // Ignore it
 210   
       }
 211  0
       return null;
 212   
    }
 213   
 
 214   
    /**
 215   
     * Gets the methodDescriptors attribute ...
 216   
     *
 217   
     * @return   The methodDescriptors value
 218   
     */
 219  0
    public MethodDescriptor[] getMethodDescriptors() {
 220  0
       Vector descriptors = new Vector();
 221  0
       MethodDescriptor descriptor = null;
 222  0
       Method[] m;
 223  0
       Method method;
 224   
 
 225  0
       try {
 226  0
          m = Class.forName("org.ejtools.graph.frame.GraphInternalFrame").getMethods();
 227   
       } catch (ClassNotFoundException e) {
 228  0
          return new MethodDescriptor[0];
 229   
       }
 230   
 
 231  0
       return (MethodDescriptor[]) descriptors.toArray(new MethodDescriptor[descriptors.size()]);
 232   
    }
 233   
 }
 234