home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / ComboBoxBeanInfo.java < prev    next >
Text File  |  1998-08-21  |  23KB  |  601 lines

  1. package symantec.itools.awt;
  2.  
  3. import java.beans.*;
  4. import symantec.itools.beans.*;
  5. import java.util.ResourceBundle;
  6.  
  7.  
  8. //  08/09/97    LAB    Added ListDown property.  Added connections for ListDown.  Removed dropList
  9. //                connections.
  10. //  08/19/98    LAB    Moved to GroupAWTAdditions folder.
  11.  
  12. /**
  13.  * BeanInfo for ComboBox.
  14.  *
  15.  */
  16.  
  17. public class ComboBoxBeanInfo extends SimpleBeanInfo {
  18.  
  19.     /**
  20.      * Constructs a ComboBoxBeanInfo object.
  21.      */
  22.     public ComboBoxBeanInfo() {
  23.     }
  24.  
  25.     /**
  26.      * Gets a BeanInfo for the superclass of this bean.
  27.      * @return BeanInfo[] containing this bean's superclass BeanInfo
  28.      */
  29.     public BeanInfo[] getAdditionalBeanInfo() {
  30.         try {
  31.             BeanInfo[] bi = new BeanInfo[1];
  32.             bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
  33.             return bi;
  34.         }
  35.         catch (IntrospectionException e) { throw new Error(e.toString());}
  36.     }
  37.  
  38.     /**
  39.      * Gets the SymantecBeanDescriptor for this bean.
  40.      * @return an object of type SymantecBeanDescriptor
  41.      * @see symantec.itools.beans.SymantecBeanDescriptor
  42.      */
  43.     public BeanDescriptor getBeanDescriptor() {
  44.         ResourceBundle group = ResourceBundle.getBundle("symantec.itools.resources.GroupBundle");
  45.         String s=group.getString("GroupAWTAdditions"); 
  46.  
  47.         SymantecBeanDescriptor bd = new SymantecBeanDescriptor(beanClass);
  48.         bd.setCanAddChild(false);
  49.         bd.setWinHelp("0x1238E");
  50.         bd.setFolder(s);
  51.  
  52.         return (BeanDescriptor) bd;
  53.     }
  54.  
  55.     /**
  56.      * Gets an image that may be used to visually represent this bean
  57.      * (in the toolbar, on a form, etc).
  58.      * @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
  59.      * BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
  60.      * @return an image for this bean, always color even if requested monochrome
  61.      * @see BeanInfo#ICON_MONO_16x16
  62.      * @see BeanInfo#ICON_COLOR_16x16
  63.      * @see BeanInfo#ICON_MONO_32x32
  64.      * @see BeanInfo#ICON_COLOR_32x32
  65.      */
  66.     public java.awt.Image getIcon(int iconKind) {
  67.         if (iconKind == BeanInfo.ICON_MONO_16x16 ||
  68.             iconKind == BeanInfo.ICON_COLOR_16x16) {
  69.             java.awt.Image img = loadImage("ComboBoxC16.gif");
  70.             return img;
  71.         }
  72.  
  73.         if (iconKind == BeanInfo.ICON_MONO_32x32 ||
  74.             iconKind == BeanInfo.ICON_COLOR_32x32) {
  75.             java.awt.Image img = loadImage("ComboBoxC32.gif");
  76.             return img;
  77.         }
  78.  
  79.         return null;
  80.     }
  81.  
  82.     /**
  83.      * Gets an array of descriptions of the methods used for "connections" by
  84.      * Visual CafΘ's Interaction Wizard.
  85.      * Included in each method description is a CONNECTIONS ConnectionDescriptor.
  86.      * @return method descriptions for this bean
  87.      * @see symantec.itools.beans.ConnectionDescriptor#CONNECTIONS
  88.      */
  89.     public MethodDescriptor[] getMethodDescriptors() {
  90.         Class[] args;
  91.         ConnectionDescriptor connection;
  92.         java.util.Vector connections;
  93.         java.util.Vector md = new java.util.Vector();
  94.         ResourceBundle conn = ResourceBundle.getBundle("symantec.itools.resources.ConnBundle");
  95.         String s;
  96.  
  97.         try{
  98.             args = new Class[1];
  99.             args[0] = java.lang.Boolean.TYPE ;
  100.             MethodDescriptor setListDown = new MethodDescriptor(beanClass.getMethod("setListDown", args));
  101.  
  102.             connections = new java.util.Vector();
  103.             connection = new ConnectionDescriptor("input", "boolean", "",
  104.                                     "%name%.setListDown(%arg%);",
  105.                                     conn.getString("setListDown"));
  106.             connections.addElement(connection);
  107.  
  108.             setListDown.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  109.             md.addElement(setListDown);
  110.         } catch (Exception e) { throw new Error("setListDown:: " + e.toString()); }
  111.  
  112.         try{
  113.             args = null;
  114.             MethodDescriptor isListDown = new MethodDescriptor(beanClass.getMethod("isListDown", args));
  115.  
  116.             connections = new java.util.Vector();
  117.             connection = new ConnectionDescriptor("output", "boolean", "",
  118.                                     "%name%.isListDown()",
  119.                                     conn.getString("isListDown"));
  120.             connections.addElement(connection);
  121.  
  122.             isListDown.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  123.             md.addElement(isListDown);
  124.         } catch (Exception e) { throw new Error("isListDown:: " + e.toString()); }
  125.  
  126.         try{
  127.             args = null;
  128.             MethodDescriptor isEditable = new MethodDescriptor(beanClass.getMethod("isEditable", args));
  129.  
  130.             connections = new java.util.Vector();
  131.             connection = new ConnectionDescriptor("output", "boolean", "",
  132.                                     "%name%.isEditable()",
  133.                                     conn.getString("isEditable"));
  134.             connections.addElement(connection);
  135.  
  136.             connection = new ConnectionDescriptor("output", "boolean", "",
  137.                                     "!%name%.isEditable()",
  138.                                     conn.getString("isNonEditable"));
  139.             connections.addElement(connection);
  140.  
  141.             isEditable.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  142.             md.addElement(isEditable);
  143.         } catch (Exception e) { throw new Error("isEditable:: " + e.toString()); }
  144.  
  145.         try{
  146.             args = new Class[1];
  147.             args[0] = java.lang.String.class ;
  148.             MethodDescriptor addItem = new MethodDescriptor(beanClass.getMethod("addItem", args));
  149.  
  150.             connections = new java.util.Vector();
  151.             connection = new ConnectionDescriptor("input", "String", "",
  152.                                     "%name%.addItem(%arg%);",
  153.                                     conn.getString("addItem"));
  154.             connections.addElement(connection);
  155.  
  156.             addItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  157.             md.addElement(addItem);
  158.         } catch (Exception e) { throw new Error("addItem:: " + e.toString()); }
  159.  
  160.         try{
  161.             args = new Class[1];
  162.             args[0] = java.lang.Boolean.TYPE ;
  163.             MethodDescriptor setSearchable = new MethodDescriptor(beanClass.getMethod("setSearchable", args));
  164.  
  165.             connections = new java.util.Vector();
  166.             connection = new ConnectionDescriptor("input", "boolean", "",
  167.                                     "%name%.setSearchable(%arg%);",
  168.                                     conn.getString("setSearchableValue"));
  169.             connections.addElement(connection);
  170.  
  171.             connection = new ConnectionDescriptor("input", "void", "",
  172.                                     "%name%.setSearchable(true);",
  173.                                     conn.getString("setSearchableTrue"));
  174.             connections.addElement(connection);
  175.  
  176.             connection = new ConnectionDescriptor("input", "void", "",
  177.                                     "%name%.setSearchable(false);",
  178.                                     conn.getString("setSearchableFalse"));
  179.             connections.addElement(connection);
  180.  
  181.             setSearchable.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  182.             md.addElement(setSearchable);
  183.         } catch (Exception e) { throw new Error("setSearchable:: " + e.toString()); }
  184.  
  185.         try{
  186.             args = null;
  187.             MethodDescriptor isCaseSensitive = new MethodDescriptor(beanClass.getMethod("isCaseSensitive", args));
  188.  
  189.             connections = new java.util.Vector();
  190.             connection = new ConnectionDescriptor("output", "boolean", "",
  191.                                     "%name%.isCaseSensitive()",
  192.                                     conn.getString("isCaseSensitive"));
  193.             connections.addElement(connection);
  194.  
  195.             connection = new ConnectionDescriptor("output", "boolean", "",
  196.                                     "!%name%.isCaseSensitive()",
  197.                                     conn.getString("isNonCaseSensitive"));
  198.             connections.addElement(connection);
  199.  
  200.             isCaseSensitive.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  201.             md.addElement(isCaseSensitive);
  202.         } catch (Exception e) { throw new Error("isCaseSensitive:: " + e.toString()); }
  203.  
  204.         try{
  205.             args = new Class[1];
  206.             args[0] = java.lang.String.class ;
  207.             MethodDescriptor setText = new MethodDescriptor(beanClass.getMethod("setText", args));
  208.  
  209.             connections = new java.util.Vector();
  210.             connection = new ConnectionDescriptor("input", "String", "",
  211.                                     "%name%.setText(%arg%);",
  212.                                     conn.getString("setTextCB"));
  213.             connections.addElement(connection);
  214.  
  215.             setText.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  216.             md.addElement(setText);
  217.         } catch (Exception e) { throw new Error("setText:: " + e.toString()); }
  218.  
  219.         try{
  220.             args = new Class[1];
  221.             args[0] = java.lang.Boolean.TYPE ;
  222.             MethodDescriptor setCaseSensitive = new MethodDescriptor(beanClass.getMethod("setCaseSensitive", args));
  223.  
  224.             connections = new java.util.Vector();
  225.             connection = new ConnectionDescriptor("input", "boolean", "",
  226.                                     "%name%.setCaseSensitive(%arg%);",
  227.                                     conn.getString("setCaseSensitiveValue"));
  228.             connections.addElement(connection);
  229.  
  230.             connection = new ConnectionDescriptor("input", "void", "",
  231.                                     "%name%.setCaseSensitive(true);",
  232.                                     conn.getString("setCaseSensitiveTrue"));
  233.             connections.addElement(connection);
  234.  
  235.             connection = new ConnectionDescriptor("input", "void", "",
  236.                                     "%name%.setCaseSensitive(false);",
  237.                                     conn.getString("setCaseSensitiveFalse"));
  238.             connections.addElement(connection);
  239.  
  240.             setCaseSensitive.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  241.             md.addElement(setCaseSensitive);
  242.         } catch (Exception e) { throw new Error("setCaseSensitive:: " + e.toString()); }
  243.  
  244.         try{
  245.             args = null;
  246.             MethodDescriptor isShowVerticalScroll = new MethodDescriptor(beanClass.getMethod("isShowVerticalScroll", args));
  247.  
  248.             connections = new java.util.Vector();
  249.             connection = new ConnectionDescriptor("output", "boolean", "",
  250.                                     "%name%.isShowVerticalScroll()",
  251.                                     conn.getString("isShowVerticalScrollVisible"));
  252.             connections.addElement(connection);
  253.  
  254.             connection = new ConnectionDescriptor("output", "boolean", "",
  255.                                     "!%name%.isShowVerticalScroll()",
  256.                                     conn.getString("isShowVerticalScrollHidden"));
  257.             connections.addElement(connection);
  258.  
  259.             isShowVerticalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  260.             md.addElement(isShowVerticalScroll);
  261.         } catch (Exception e) { throw new Error("isShowVerticalScroll:: " + e.toString()); }
  262.  
  263.         try{
  264.             args = new Class[1];
  265.             args[0] = java.lang.Integer.TYPE ;
  266.             MethodDescriptor select = new MethodDescriptor(beanClass.getMethod("select", args));
  267.  
  268.             connections = new java.util.Vector();
  269.             connection = new ConnectionDescriptor("input", "int", "",
  270.                                     "%name%.select(%arg%);",
  271.                                     conn.getString("selectIndex"));
  272.             connections.addElement(connection);
  273.  
  274.             connection = new ConnectionDescriptor("input", "String", "",
  275.                                     "%name%.select(%arg%);",
  276.                                     conn.getString("selectString"));
  277.             connections.addElement(connection);
  278.  
  279.             select.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  280.             md.addElement(select);
  281.         } catch (Exception e) { throw new Error("select:: " + e.toString()); }
  282.  
  283.         try{
  284.             args = new Class[1];
  285.             args[0] = java.lang.Boolean.TYPE ;
  286.             MethodDescriptor setEditable = new MethodDescriptor(beanClass.getMethod("setEditable", args));
  287.  
  288.             connections = new java.util.Vector();
  289.             connection = new ConnectionDescriptor("input", "boolean", "",
  290.                                     "%name%.setEditable(%arg%);",
  291.                                     conn.getString("setEditableValue"));
  292.             connections.addElement(connection);
  293.  
  294.             connection = new ConnectionDescriptor("input", "void", "",
  295.                                     "%name%.setEditable(true);",
  296.                                     conn.getString("setEditableTrue"));
  297.             connections.addElement(connection);
  298.  
  299.             connection = new ConnectionDescriptor("input", "void", "",
  300.                                     "%name%.setEditable(false);",
  301.                                     conn.getString("setEditableFalse"));
  302.             connections.addElement(connection);
  303.  
  304.             setEditable.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  305.             md.addElement(setEditable);
  306.         } catch (Exception e) { throw new Error("setEditable:: " + e.toString()); }
  307.  
  308.         try{
  309.             args = null;
  310.             MethodDescriptor delSelectedItem = new MethodDescriptor(beanClass.getMethod("delSelectedItem", args));
  311.  
  312.             connections = new java.util.Vector();
  313.             connection = new ConnectionDescriptor("input", "void", "",
  314.                                     "%name%.delSelectedItem();",
  315.                                     conn.getString("delSelectedItem"));
  316.             connections.addElement(connection);
  317.  
  318.             delSelectedItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  319.             md.addElement(delSelectedItem);
  320.         } catch (Exception e) { throw new Error("delSelectedItem:: " + e.toString()); }
  321.  
  322.         try{
  323.             args = null;
  324.             MethodDescriptor isShowHorizontalScroll = new MethodDescriptor(beanClass.getMethod("isShowHorizontalScroll", args));
  325.  
  326.             connections = new java.util.Vector();
  327.             connection = new ConnectionDescriptor("output", "boolean", "",
  328.                                     "%name%.isShowHorizontalScroll()",
  329.                                     conn.getString("isShowHorizontalScrollVisible"));
  330.             connections.addElement(connection);
  331.  
  332.             connection = new ConnectionDescriptor("output", "boolean", "",
  333.                                     "!%name%.isShowHorizontalScroll()",
  334.                                     conn.getString("isShowHorizontalScrollHidden"));
  335.             connections.addElement(connection);
  336.  
  337.             isShowHorizontalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  338.             md.addElement(isShowHorizontalScroll);
  339.         } catch (Exception e) { throw new Error("isShowHorizontalScroll:: " + e.toString()); }
  340.  
  341.         try{
  342.             args = new Class[1];
  343.             args[0] = java.lang.Integer.TYPE ;
  344.             MethodDescriptor delItem = new MethodDescriptor(beanClass.getMethod("delItem", args));
  345.  
  346.             connections = new java.util.Vector();
  347.             connection = new ConnectionDescriptor("input", "int", "",
  348.                                     "%name%.delItem(%arg%);",
  349.                                     conn.getString("delItem"));
  350.             connections.addElement(connection);
  351.  
  352.             delItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  353.             md.addElement(delItem);
  354.         } catch (Exception e) { throw new Error("delItem:: " + e.toString()); }
  355.  
  356.         try{
  357.             args = new Class[1];
  358.             args[0] = java.lang.Boolean.TYPE ;
  359.             MethodDescriptor setShowVerticalScroll = new MethodDescriptor(beanClass.getMethod("setShowVerticalScroll", args));
  360.  
  361.             connections = new java.util.Vector();
  362.             connection = new ConnectionDescriptor("input", "boolean", "",
  363.                                     "%name%.setShowVerticalScroll(%arg%);",
  364.                                     conn.getString("setShowVerticalScrollValue"));
  365.             connections.addElement(connection);
  366.  
  367.             connection = new ConnectionDescriptor("input", "void", "",
  368.                                     "%name%.setShowVerticalScroll(true);",
  369.                                     conn.getString("setShowVerticalScrollTrue"));
  370.             connections.addElement(connection);
  371.  
  372.             connection = new ConnectionDescriptor("input", "void", "",
  373.                                     "%name%.setShowVerticalScroll(false);",
  374.                                     conn.getString("setShowVerticalScrollFalse"));
  375.             connections.addElement(connection);
  376.  
  377.             setShowVerticalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  378.             md.addElement(setShowVerticalScroll);
  379.         } catch (Exception e) { throw new Error("setShowVerticalScroll:: " + e.toString()); }
  380.  
  381.         try{
  382.             args = null;
  383.             MethodDescriptor isSearchable = new MethodDescriptor(beanClass.getMethod("isSearchable", args));
  384.  
  385.             connections = new java.util.Vector();
  386.             connection = new ConnectionDescriptor("output", "boolean", "",
  387.                                     "%name%.isSearchable()",
  388.                                     conn.getString("isSearchable"));
  389.             connections.addElement(connection);
  390.  
  391.             connection = new ConnectionDescriptor("output", "boolean", "",
  392.                                     "!%name%.isSearchable()",
  393.                                     conn.getString("isNonSearchable"));
  394.             connections.addElement(connection);
  395.  
  396.             isSearchable.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  397.             md.addElement(isSearchable);
  398.         } catch (Exception e) { throw new Error("isSearchable:: " + e.toString()); }
  399.  
  400.         try{
  401.             args = null;
  402.             MethodDescriptor getSelectedItem = new MethodDescriptor(beanClass.getMethod("getSelectedItem", args));
  403.  
  404.             connections = new java.util.Vector();
  405.             connection = new ConnectionDescriptor("output", "String", "",
  406.                                     "%name%.getSelectedItem()",
  407.                                     conn.getString("getSelectedItem"));
  408.             connections.addElement(connection);
  409.  
  410.             getSelectedItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  411.             md.addElement(getSelectedItem);
  412.         } catch (Exception e) { throw new Error("getSelectedItem:: " + e.toString()); }
  413.  
  414.         try{
  415.             args = null;
  416.             MethodDescriptor getText = new MethodDescriptor(beanClass.getMethod("getText", args));
  417.  
  418.             connections = new java.util.Vector();
  419.             connection = new ConnectionDescriptor("output", "String", "",
  420.                                     "%name%.getText()",
  421.                                     conn.getString("getTextCB"));
  422.             connections.addElement(connection);
  423.  
  424.             connection = new ConnectionDescriptor("output", "int", "",
  425.                                     "Integer.parseInt(%name%.getText())",
  426.                                     conn.getString("parseInt"));
  427.             connections.addElement(connection);
  428.  
  429.             getText.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  430.             md.addElement(getText);
  431.         } catch (Exception e) { throw new Error("getText:: " + e.toString()); }
  432.  
  433.         try{
  434.             args = null;
  435.             MethodDescriptor countItems = new MethodDescriptor(beanClass.getMethod("countItems", args));
  436.  
  437.             connections = new java.util.Vector();
  438.             connection = new ConnectionDescriptor("output", "int", "",
  439.                                     "%name%.countItems()",
  440.                                     conn.getString("countItems"));
  441.             connections.addElement(connection);
  442.  
  443.             countItems.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  444.             md.addElement(countItems);
  445.         } catch (Exception e) { throw new Error("countItems:: " + e.toString()); }
  446.  
  447.         try{
  448.             args = new Class[1];
  449.             args[0] = java.lang.Boolean.TYPE ;
  450.             MethodDescriptor setShowHorizontalScroll = new MethodDescriptor(beanClass.getMethod("setShowHorizontalScroll", args));
  451.  
  452.             connections = new java.util.Vector();
  453.             connection = new ConnectionDescriptor("input", "boolean", "",
  454.                                     "%name%.setShowHorizontalScroll(%arg%);",
  455.                                     conn.getString("setShowHorizontalScrollValue"));
  456.             connections.addElement(connection);
  457.  
  458.             connection = new ConnectionDescriptor("input", "void", "",
  459.                                     "%name%.setShowHorizontalScroll(true);",
  460.                                     conn.getString("setShowHorizontalScrollTrue"));
  461.             connections.addElement(connection);
  462.  
  463.             connection = new ConnectionDescriptor("input", "void", "",
  464.                                     "%name%.setShowHorizontalScroll(false);",
  465.                                     conn.getString("setShowHorizontalScrollFalse"));
  466.             connections.addElement(connection);
  467.  
  468.             setShowHorizontalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  469.             md.addElement(setShowHorizontalScroll);
  470.         } catch (Exception e) { throw new Error("setShowHorizontalScroll:: " + e.toString()); }
  471.  
  472.         try{
  473.             args = new Class[1];
  474.             args[0] = java.lang.Integer.TYPE ;
  475.             MethodDescriptor deselect = new MethodDescriptor(beanClass.getMethod("deselect", args));
  476.  
  477.             connections = new java.util.Vector();
  478.             connection = new ConnectionDescriptor("input", "int", "",
  479.                                     "%name%.deselect(%arg%);",
  480.                                     conn.getString("deselect"));
  481.             connections.addElement(connection);
  482.  
  483.             deselect.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  484.             md.addElement(deselect);
  485.         } catch (Exception e) { throw new Error("deselect:: " + e.toString()); }
  486.  
  487.         try{
  488.             args = new Class[2];
  489.             args[0] = java.lang.Integer.TYPE ;
  490.             args[1] = java.lang.Boolean.TYPE ;
  491.             MethodDescriptor setEnabled = new MethodDescriptor(beanClass.getMethod("setEnabled", args));
  492.  
  493.             connections = new java.util.Vector();
  494.             connection = new ConnectionDescriptor("input", "int", "",
  495.                                     "%name%.setEnabled(%arg%, true);",
  496.                                     conn.getString("setEnabledTrue"));
  497.             connections.addElement(connection);
  498.  
  499.             connection = new ConnectionDescriptor("input", "int", "",
  500.                                     "%name%.setEnabled(%arg%, false);",
  501.                                     conn.getString("setEnabledFalse"));
  502.             connections.addElement(connection);
  503.  
  504.             setEnabled.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  505.             md.addElement(setEnabled);
  506.         } catch (Exception e) { throw new Error("setEnabled:: " + e.toString()); }
  507.  
  508.         try{
  509.             args = null;
  510.             MethodDescriptor getSelectedIndex = new MethodDescriptor(beanClass.getMethod("getSelectedIndex", args));
  511.  
  512.             connections = new java.util.Vector();
  513.             connection = new ConnectionDescriptor("output", "int", "",
  514.                                     "%name%.getSelectedIndex()",
  515.                                     conn.getString("getSelectedIndex"));
  516.             connections.addElement(connection);
  517.  
  518.             getSelectedIndex.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  519.             md.addElement(getSelectedIndex);
  520.         } catch (Exception e) { throw new Error("getSelectedIndex:: " + e.toString()); }
  521.  
  522.         MethodDescriptor[] rv = new MethodDescriptor[md.size()];
  523.         md.copyInto(rv);
  524.  
  525.         return rv;
  526.     }
  527.  
  528.     /**
  529.      * Returns descriptions of this bean's properties.
  530.      */
  531.     public PropertyDescriptor[] getPropertyDescriptors() {
  532.         ResourceBundle prop = ResourceBundle.getBundle("symantec.itools.resources.PropBundle");
  533.  
  534.         try{
  535.         PropertyDescriptor defProperty = new PropertyDescriptor("text", beanClass);
  536.         defProperty.setBound(true);
  537.         defProperty.setConstrained(true);
  538.         defProperty.setDisplayName(prop.getString("text"));
  539.  
  540.         PropertyDescriptor listDown = new PropertyDescriptor("listDown", beanClass);
  541.         listDown.setBound(true);
  542.         listDown.setConstrained(true);
  543.         listDown.setDisplayName(prop.getString("listDown"));
  544.  
  545.         PropertyDescriptor caseSensitive = new PropertyDescriptor("caseSensitive", beanClass);
  546.         caseSensitive.setBound(true);
  547.         caseSensitive.setConstrained(true);
  548.         caseSensitive.setDisplayName(prop.getString("caseSensitive"));
  549.  
  550.         PropertyDescriptor editable = new PropertyDescriptor("editable", beanClass);
  551.         editable.setBound(true);
  552.         editable.setConstrained(true);
  553.         editable.setDisplayName(prop.getString("editable"));
  554.  
  555.         PropertyDescriptor listItems = new PropertyDescriptor("listItems", beanClass);
  556.         listItems.setBound(true);
  557.         listItems.setConstrained(true);
  558.         listItems.setDisplayName(prop.getString("listItems"));
  559.  
  560.         PropertyDescriptor searchable = new PropertyDescriptor("searchable", beanClass);
  561.         searchable.setBound(true);
  562.         searchable.setConstrained(true);
  563.         searchable.setDisplayName(prop.getString("searchable"));
  564.  
  565.         PropertyDescriptor showHorizontalScroll = new PropertyDescriptor("showHorizontalScroll", beanClass);
  566.         showHorizontalScroll.setBound(true);
  567.         showHorizontalScroll.setConstrained(true);
  568.         showHorizontalScroll.setDisplayName(prop.getString("showHorizontalScroll"));
  569.  
  570.         PropertyDescriptor showVerticalScroll = new PropertyDescriptor("showVerticalScroll", beanClass);
  571.         showVerticalScroll.setBound(true);
  572.         showVerticalScroll.setConstrained(true);
  573.         showVerticalScroll.setDisplayName(prop.getString("showVerticalScroll"));
  574.  
  575.         PropertyDescriptor layout = new PropertyDescriptor("layout", beanClass);
  576.         layout.setHidden(true);
  577.  
  578.         PropertyDescriptor[] rv = {
  579.             defProperty,
  580.             listDown,
  581.             caseSensitive,
  582.             editable,
  583.             listItems,
  584.             searchable,
  585.             showHorizontalScroll,
  586.             showVerticalScroll,
  587.             layout};
  588.         return rv;
  589.         } catch (IntrospectionException e) { throw new Error(e.toString()); }
  590.     }
  591.  
  592.     /**
  593.      * Returns the index of the property expected to be changed most often by the designer.
  594.      */
  595.     public int getDefaultPropertyIndex() {
  596.         return 0;    //  the index for our default property is always 0
  597.     }
  598.  
  599.     private final static Class beanClass = ComboBox.class;
  600.  
  601.     }    //  end of class ComboBoxBeanInfo