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

  1. package symantec.itools.awt;
  2.  
  3. import java.beans.*;
  4. import symantec.itools.beans.*;
  5. import java.util.ResourceBundle;
  6.  
  7. //  08/09/97    LAB    Removed ListBoxFont property and connections.  Removed DisabledTextColor
  8. //                    property and connections.  Removed DefaultEnabledTextColor property and
  9. //                    connections.
  10. //  09/04/97    LAB    Removed extranious semicolon in isEdited connection (Addresses Mac Bug #7806),
  11. //                    and fixed argument list to be null (it's a getter).
  12. //  09/07/97    LAB    Fixed misspelling of descriptions.
  13. //  09/08/97    LAB    Fixed method descriptor for isEdited connection.  Fixes introspection problem.
  14. //  08/19/98    LAB    Moved to GroupAWTAdditions folder.
  15.  
  16. /**
  17.  * BeanInfo for ImageListBox.
  18.  *
  19.  */
  20. public class ImageListBoxBeanInfo extends SimpleBeanInfo {
  21.  
  22.     /**
  23.      * Constructs a ImageListBoxBeanInfo object.
  24.      */
  25.     public ImageListBoxBeanInfo() {
  26.     }
  27.  
  28.     /**
  29.      * Gets a BeanInfo for the superclass of this bean.
  30.      * @return BeanInfo[] containing this bean's superclass BeanInfo
  31.      */
  32.     public BeanInfo[] getAdditionalBeanInfo() {
  33.         try {
  34.             BeanInfo[] bi = new BeanInfo[1];
  35.             bi[0] = Introspector.getBeanInfo(beanClass.getSuperclass());
  36.             return bi;
  37.         }
  38.         catch (IntrospectionException e) { throw new Error(e.toString());}
  39.     }
  40.  
  41.     /**
  42.      * Gets the SymantecBeanDescriptor for this bean.
  43.      * @return an object of type SymantecBeanDescriptor
  44.      * @see symantec.itools.beans.SymantecBeanDescriptor
  45.      */
  46.     public BeanDescriptor getBeanDescriptor() {
  47.         ResourceBundle group = ResourceBundle.getBundle("symantec.itools.resources.GroupBundle");
  48.         String s=group.getString("GroupAWTAdditions"); 
  49.  
  50.         SymantecBeanDescriptor bd = new SymantecBeanDescriptor(beanClass);
  51.         bd.setCanAddChild(false);
  52.         bd.setWinHelp("0x1238F");
  53.         bd.setFolder(s);
  54.  
  55.         ResourceBundle conn = ResourceBundle.getBundle("symantec.itools.resources.ConnBundle");
  56.         s=conn.getString("BORDER_REGULAR"); 
  57.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  58.                                                 "%name%.BORDER_REGULAR",s));
  59.  
  60.         s=conn.getString("BORDER_NONE"); 
  61.         bd.addConnectionDescriptor(new ConnectionDescriptor("output", "int", "",
  62.                                                 "%name%.BORDER_NONE",s));
  63.  
  64.  
  65.         return (BeanDescriptor) bd;
  66.     }
  67.  
  68.     /**
  69.      * Gets an image that may be used to visually represent this bean
  70.      * (in the toolbar, on a form, etc).
  71.      * @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
  72.      * BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
  73.      * @return an image for this bean, always color even if requested monochrome
  74.      * @see BeanInfo#ICON_MONO_16x16
  75.      * @see BeanInfo#ICON_COLOR_16x16
  76.      * @see BeanInfo#ICON_MONO_32x32
  77.      * @see BeanInfo#ICON_COLOR_32x32
  78.      */
  79.     public java.awt.Image getIcon(int iconKind) {
  80.         if (iconKind == BeanInfo.ICON_MONO_16x16 ||
  81.             iconKind == BeanInfo.ICON_COLOR_16x16) {
  82.             java.awt.Image img = loadImage("ImageListBoxC16.gif");
  83.             return img;
  84.         }
  85.  
  86.         if (iconKind == BeanInfo.ICON_MONO_32x32 ||
  87.             iconKind == BeanInfo.ICON_COLOR_32x32) {
  88.             java.awt.Image img = loadImage("ImageListBoxC32.gif");
  89.             return img;
  90.         }
  91.  
  92.         return null;
  93.     }
  94.  
  95.     /**
  96.      * Gets an array of descriptions of the methods used for "connections" by
  97.      * Visual CafΘ's Interaction Wizard.
  98.      * Included in each method description is a CONNECTIONS ConnectionDescriptor.
  99.      * @return method descriptions for this bean
  100.      * @see symantec.itools.beans.ConnectionDescriptor#CONNECTIONS
  101.      */
  102.     public MethodDescriptor[] getMethodDescriptors() {
  103.         Class[] args;
  104.         ConnectionDescriptor connection;
  105.         java.util.Vector connections;
  106.         java.util.Vector md = new java.util.Vector();
  107.         ResourceBundle conn = ResourceBundle.getBundle("symantec.itools.resources.ConnBundle");
  108.  
  109.         try{
  110.             args = null;
  111.             MethodDescriptor getBorderType = new MethodDescriptor(beanClass.getMethod("getBorderType", args));
  112.  
  113.             connections = new java.util.Vector();
  114.             connection = new ConnectionDescriptor("output", "int", "",
  115.                                     "%name%.getBorderType()",
  116.                                     conn.getString("getBorderType"));
  117.             connections.addElement(connection);
  118.  
  119.             getBorderType.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  120.             md.addElement(getBorderType);
  121.         } catch (Exception e) { throw new Error("getBorderType:: " + e.toString()); }
  122.  
  123.         try{
  124.             args = new Class[1];
  125.             args[0] = java.lang.String.class ;
  126.             MethodDescriptor addItem = new MethodDescriptor(beanClass.getMethod("addItem", args));
  127.  
  128.             connections = new java.util.Vector();
  129.             connection = new ConnectionDescriptor("input", "String", "",
  130.                                     "%name%.addItem(%arg%);",
  131.                                     conn.getString("addItem"));
  132.             connections.addElement(connection);
  133.  
  134.             addItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  135.             md.addElement(addItem);
  136.         } catch (Exception e) { throw new Error("addItem:: " + e.toString()); }
  137.  
  138.         try{
  139.             args = null;
  140.             MethodDescriptor selectAll = new MethodDescriptor(beanClass.getMethod("selectAll", args));
  141.  
  142.             connections = new java.util.Vector();
  143.             connection = new ConnectionDescriptor("input", "void", "",
  144.                                     "%name%.selectAll();",
  145.                                     conn.getString("selectAll"));
  146.             connections.addElement(connection);
  147.  
  148.             selectAll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  149.             md.addElement(selectAll);
  150.         } catch (Exception e) { throw new Error("selectAll:: " + e.toString()); }
  151.  
  152.         try{
  153.             args = null;
  154.             MethodDescriptor getVisibleIndex = new MethodDescriptor(beanClass.getMethod("getVisibleIndex", args));
  155.  
  156.             connections = new java.util.Vector();
  157.             connection = new ConnectionDescriptor("output", "int", "",
  158.                                     "%name%.getVisibleIndex()",
  159.                                     conn.getString("getVisibleIndex"));
  160.             connections.addElement(connection);
  161.  
  162.             getVisibleIndex.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  163.             md.addElement(getVisibleIndex);
  164.         } catch (Exception e) { throw new Error("getVisibleIndex:: " + e.toString()); }
  165.  
  166.         try{
  167.             args = new Class[1];
  168.             args[0] = java.lang.Integer.TYPE ;
  169.             MethodDescriptor setVisibleIndex = new MethodDescriptor(beanClass.getMethod("setVisibleIndex", args));
  170.  
  171.             connections = new java.util.Vector();
  172.             connection = new ConnectionDescriptor("input", "int", "",
  173.                                     "%name%.setVisibleIndex(%arg%);",
  174.                                     conn.getString("setVisibleIndex"));
  175.             connections.addElement(connection);
  176.  
  177.             setVisibleIndex.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  178.             md.addElement(setVisibleIndex);
  179.         } catch (Exception e) { throw new Error("setVisibleIndex:: " + e.toString()); }
  180.  
  181.         try{
  182.             args = new Class[1];
  183.             args[0] = java.lang.Boolean.TYPE ;
  184.             MethodDescriptor setComboMode = new MethodDescriptor(beanClass.getMethod("setComboMode", args));
  185.  
  186.             connections = new java.util.Vector();
  187.             connection = new ConnectionDescriptor("input", "boolean", "",
  188.                                     "%name%.setComboMode(%arg%);",
  189.                                     conn.getString("setComboMode"));
  190.             connections.addElement(connection);
  191.  
  192.             setComboMode.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  193.             md.addElement(setComboMode);
  194.         } catch (Exception e) { throw new Error("setComboMode:: " + e.toString()); }
  195.  
  196.         try{
  197.             args = null;
  198.             MethodDescriptor isMultipleSelections = new MethodDescriptor(beanClass.getMethod("isMultipleSelections", args));
  199.  
  200.             connections = new java.util.Vector();
  201.             connection = new ConnectionDescriptor("output", "boolean", "",
  202.                                     "%name%.isMultipleSelections()",
  203.                                     conn.getString("allowMultipleSelections"));
  204.             connections.addElement(connection);
  205.  
  206.             connection = new ConnectionDescriptor("output", "boolean", "",
  207.                                     "!%name%.isMultipleSelections()",
  208.                                     conn.getString("notMultipleSelections"));
  209.             connections.addElement(connection);
  210.  
  211.             isMultipleSelections.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  212.             md.addElement(isMultipleSelections);
  213.         } catch (Exception e) { throw new Error("isMultipleSelections:: " + e.toString()); }
  214.  
  215.         try{
  216.             args = new Class[2];
  217.             args[0] = java.lang.Integer.TYPE ;
  218.             args[1] = java.lang.Boolean.TYPE ;
  219.             MethodDescriptor setSelectedIndex = new MethodDescriptor(beanClass.getMethod("setSelectedIndex", args));
  220.  
  221.             connections = new java.util.Vector();
  222.             connection = new ConnectionDescriptor("input", "int", "",
  223.                                     "%name%.setSelectedIndex(%arg%, true);",
  224.                                     conn.getString("setSelectedIndex"));
  225.             connections.addElement(connection);
  226.  
  227.             connection = new ConnectionDescriptor("input", "int", "",
  228.                                     "%name%.setSelectedIndex(%arg%, false);",
  229.                                     conn.getString("resetSelectedIndex"));
  230.             connections.addElement(connection);
  231.  
  232.             setSelectedIndex.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  233.             md.addElement(setSelectedIndex);
  234.         } catch (Exception e) { throw new Error("setSelectedIndex:: " + e.toString()); }
  235.  
  236.         try{
  237.             args = null;
  238.             MethodDescriptor isShowVerticalScroll = new MethodDescriptor(beanClass.getMethod("isShowVerticalScroll", args));
  239.  
  240.             connections = new java.util.Vector();
  241.             connection = new ConnectionDescriptor("output", "boolean", "",
  242.                                     "%name%.isShowVerticalScroll()",
  243.                                     conn.getString("visibleShowVerticalScroll"));
  244.             connections.addElement(connection);
  245.  
  246.             connection = new ConnectionDescriptor("output", "boolean", "",
  247.                                     "!%name%.isShowVerticalScroll()",
  248.                                     conn.getString("hiddenShowVerticalScroll"));
  249.             connections.addElement(connection);
  250.  
  251.             isShowVerticalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  252.             md.addElement(isShowVerticalScroll);
  253.         } catch (Exception e) { throw new Error("isShowVerticalScroll:: " + e.toString()); }
  254.  
  255.         try{
  256.             args = new Class[1];
  257.             args[0] = java.lang.Boolean.TYPE ;
  258.             MethodDescriptor setCellBorders = new MethodDescriptor(beanClass.getMethod("setCellBorders", args));
  259.  
  260.             connections = new java.util.Vector();
  261.             connection = new ConnectionDescriptor("input", "boolean", "",
  262.                                     "%name%.setCellBorders(%arg%);",
  263.                                     conn.getString("setCellBordersValue"));
  264.             connections.addElement(connection);
  265.  
  266.             connection = new ConnectionDescriptor("input", "void", "",
  267.                                     "%name%.setCellBorders(true);",
  268.                                     conn.getString("setCellBordersTrue"));
  269.             connections.addElement(connection);
  270.  
  271.             connection = new ConnectionDescriptor("input", "void", "",
  272.                                     "%name%.setCellBorders(false);",
  273.                                     conn.getString("setCellBordersFalse"));
  274.             connections.addElement(connection);
  275.  
  276.             setCellBorders.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  277.             md.addElement(setCellBorders);
  278.         } catch (Exception e) { throw new Error("setCellBorders:: " + e.toString()); }
  279.  
  280.         try{
  281.             args = new Class[1];
  282.             args[0] = java.lang.Boolean.TYPE ;
  283.             MethodDescriptor setMultipleSelections = new MethodDescriptor(beanClass.getMethod("setMultipleSelections", args));
  284.  
  285.             connections = new java.util.Vector();
  286.             connection = new ConnectionDescriptor("input", "boolean", "",
  287.                                     "%name%.setMultipleSelections(%arg%);",
  288.                                     conn.getString("setMultipleSelectionsValue"));
  289.             connections.addElement(connection);
  290.  
  291.             setMultipleSelections.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  292.             md.addElement(setMultipleSelections);
  293.         } catch (Exception e) { throw new Error("setMultipleSelections:: " + e.toString()); }
  294.  
  295.         try{
  296.             args = new Class[2];
  297.             args[0] = java.lang.String.class ;
  298.             args[1] = java.lang.Boolean.TYPE ;
  299.             MethodDescriptor setSelectedItem = new MethodDescriptor(beanClass.getMethod("setSelectedItem", args));
  300.  
  301.             connections = new java.util.Vector();
  302.             connection = new ConnectionDescriptor("input", "String", "",
  303.                                     "%name%.setSelectedItem(%arg%, true);",
  304.                                     conn.getString("setSelectedItemString"));
  305.             connections.addElement(connection);
  306.  
  307.             connection = new ConnectionDescriptor("input", "String", "",
  308.                                     "%name%.setSelectedItem(%arg%, false);",
  309.                                     conn.getString("setSelectedItemFalse"));
  310.             connections.addElement(connection);
  311.  
  312.             setSelectedItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  313.             md.addElement(setSelectedItem);
  314.         } catch (Exception e) { throw new Error("setSelectedItem:: " + e.toString()); }
  315.  
  316.         try{
  317.             args = null;
  318.             MethodDescriptor isShowHorizontalScroll = new MethodDescriptor(beanClass.getMethod("isShowHorizontalScroll", args));
  319.  
  320.             connections = new java.util.Vector();
  321.             connection = new ConnectionDescriptor("output", "boolean", "",
  322.                                     "%name%.isShowHorizontalScroll()",
  323.                                     conn.getString("visibleShowHorizontalScroll"));
  324.             connections.addElement(connection);
  325.  
  326.             connection = new ConnectionDescriptor("output", "boolean", "",
  327.                                     "!%name%.isShowHorizontalScroll()",
  328.                                     conn.getString("hiddenShowHorizontalScroll"));
  329.             connections.addElement(connection);
  330.  
  331.             isShowHorizontalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  332.             md.addElement(isShowHorizontalScroll);
  333.         } catch (Exception e) { throw new Error("isShowHorizontalScroll:: " + e.toString()); }
  334.  
  335.         try{
  336.             args = new Class[1];
  337.             args[0] = java.lang.Integer.TYPE ;
  338.             MethodDescriptor delItem = new MethodDescriptor(beanClass.getMethod("delItem", args));
  339.  
  340.             connections = new java.util.Vector();
  341.             connection = new ConnectionDescriptor("input", "int", "",
  342.                                     "%name%.delItem(%arg%);",
  343.                                     conn.getString("delItem"));
  344.             connections.addElement(connection);
  345.  
  346.             delItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  347.             md.addElement(delItem);
  348.         } catch (Exception e) { throw new Error("delItem:: " + e.toString()); }
  349.  
  350.         try{
  351.             args = null;
  352.             MethodDescriptor deselectAll = new MethodDescriptor(beanClass.getMethod("deselectAll", args));
  353.  
  354.             connections = new java.util.Vector();
  355.             connection = new ConnectionDescriptor("input", "void", "",
  356.                                     "%name%.deselectAll();",
  357.                                     conn.getString("deselectAll"));
  358.             connections.addElement(connection);
  359.  
  360.             deselectAll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  361.             md.addElement(deselectAll);
  362.         } catch (Exception e) { throw new Error("deselectAll:: " + e.toString()); }
  363.  
  364.         try{
  365.             args = new Class[1];
  366.             args[0] = java.lang.Boolean.TYPE ;
  367.             MethodDescriptor setShowVerticalScroll = new MethodDescriptor(beanClass.getMethod("setShowVerticalScroll", args));
  368.  
  369.             connections = new java.util.Vector();
  370.             connection = new ConnectionDescriptor("input", "boolean", "",
  371.                                     "%name%.setShowVerticalScroll(%arg%);",
  372.                                     conn.getString("setShowVerticalScrollValue"));
  373.             connections.addElement(connection);
  374.  
  375.             connection = new ConnectionDescriptor("input", "void", "",
  376.                                     "%name%.setShowVerticalScroll(true);",
  377.                                     conn.getString("setShowVerticalScrollTrue"));
  378.             connections.addElement(connection);
  379.  
  380.             connection = new ConnectionDescriptor("input", "void", "",
  381.                                     "%name%.setShowVerticalScroll(false);",
  382.                                     conn.getString("setShowVerticalScrollFalse"));
  383.             connections.addElement(connection);
  384.  
  385.             setShowVerticalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  386.             md.addElement(setShowVerticalScroll);
  387.         } catch (Exception e) { throw new Error("setShowVerticalScroll:: " + e.toString()); }
  388.  
  389.         try{
  390.             args = new Class[1];
  391.             args[0] = java.lang.Integer.TYPE ;
  392.             MethodDescriptor setRowsToShow = new MethodDescriptor(beanClass.getMethod("setRowsToShow", args));
  393.  
  394.             connections = new java.util.Vector();
  395.             connection = new ConnectionDescriptor("input", "int", "",
  396.                                     "%name%.setRowsToShow(%arg%);",
  397.                                     conn.getString("setRowsToShow"));
  398.             connections.addElement(connection);
  399.  
  400.             setRowsToShow.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  401.             md.addElement(setRowsToShow);
  402.         } catch (Exception e) { throw new Error("setRowsToShow:: " + e.toString()); }
  403.  
  404.         try{
  405.             args = new Class[1];
  406.             args[0] = java.lang.Integer.TYPE ;
  407.             MethodDescriptor isEdited = new MethodDescriptor(beanClass.getMethod("isEdited", args));
  408.  
  409.             connections = new java.util.Vector();
  410.             connection = new ConnectionDescriptor("output", "boolean", "",
  411.                                     "%name%.isEdited(%name%.getSelectedIndex())",
  412.                                     conn.getString("isEdited"));
  413.             connections.addElement(connection);
  414.  
  415.             isEdited.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  416.             md.addElement(isEdited);
  417.         } catch (Exception e) { throw new Error("isEdited:: " + e.toString()); }
  418.  
  419.         try{
  420.             args = null;
  421.             MethodDescriptor getRows = new MethodDescriptor(beanClass.getMethod("getRows", args));
  422.  
  423.             connections = new java.util.Vector();
  424.             connection = new ConnectionDescriptor("output", "int", "",
  425.                                     "%name%.getRows()",
  426.                                     conn.getString("getRows"));
  427.             connections.addElement(connection);
  428.  
  429.             getRows.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  430.             md.addElement(getRows);
  431.         } catch (Exception e) { throw new Error("getRows:: " + e.toString()); }
  432.  
  433.  
  434.         try{
  435.             args = null;
  436.             MethodDescriptor isCellBorders = new MethodDescriptor(beanClass.getMethod("isCellBorders", args));
  437.  
  438.             connections = new java.util.Vector();
  439.             connection = new ConnectionDescriptor("output", "boolean", "",
  440.                                     "%name%.isCellBorders()",
  441.                                     conn.getString("isCellBordersOn"));
  442.             connections.addElement(connection);
  443.  
  444.             connection = new ConnectionDescriptor("output", "boolean", "",
  445.                                     "!%name%.isCellBorders()",
  446.                                     conn.getString("isCellBordersOff"));
  447.             connections.addElement(connection);
  448.  
  449.             isCellBorders.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  450.             md.addElement(isCellBorders);
  451.         } catch (Exception e) { throw new Error("isCellBorders:: " + e.toString()); }
  452.  
  453.         try{
  454.             args = new Class[1];
  455.             args[0] = java.lang.Integer.TYPE ;
  456.             MethodDescriptor setBorderType = new MethodDescriptor(beanClass.getMethod("setBorderType", args));
  457.  
  458.             connections = new java.util.Vector();
  459.             connection = new ConnectionDescriptor("input", "int", "",
  460.                                     "%name%.setBorderType(%arg%);",
  461.                                     conn.getString("setBorderType"));
  462.             connections.addElement(connection);
  463.  
  464.             setBorderType.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  465.             md.addElement(setBorderType);
  466.         } catch (Exception e) { throw new Error("setBorderType:: " + e.toString()); }
  467.  
  468.         try{
  469.             args = null;
  470.             MethodDescriptor getLabel = new MethodDescriptor(beanClass.getMethod("getLabel", args));
  471.  
  472.             connections = new java.util.Vector();
  473.             connection = new ConnectionDescriptor("output", "String", "",
  474.                                     "%name%.getLabel()",
  475.                                     conn.getString("getLabelILB"));
  476.             connections.addElement(connection);
  477.  
  478.             getLabel.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  479.             md.addElement(getLabel);
  480.         } catch (Exception e) { throw new Error("getLabel:: " + e.toString()); }
  481.  
  482.         try{
  483.             args = null;
  484.             MethodDescriptor getSelectedItem = new MethodDescriptor(beanClass.getMethod("getSelectedItem", args));
  485.  
  486.             connections = new java.util.Vector();
  487.             connection = new ConnectionDescriptor("output", "String", "",
  488.                                     "%name%.getSelectedItem()",
  489.                                     conn.getString("getSelectedItem"));
  490.             connections.addElement(connection);
  491.  
  492.             getSelectedItem.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  493.             md.addElement(getSelectedItem);
  494.         } catch (Exception e) { throw new Error("getSelectedItem:: " + e.toString()); }
  495.  
  496.         try{
  497.             args = null;
  498.             MethodDescriptor isAllSelected = new MethodDescriptor(beanClass.getMethod("isAllSelected", args));
  499.  
  500.             connections = new java.util.Vector();
  501.             connection = new ConnectionDescriptor("output", "boolean", "",
  502.                                     "%name%.isAllSelected()",
  503.                                     conn.getString("isAllSelected"));
  504.             connections.addElement(connection);
  505.  
  506.             isAllSelected.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  507.             md.addElement(isAllSelected);
  508.         } catch (Exception e) { throw new Error("isAllSelected:: " + e.toString()); }
  509.  
  510.         try{
  511.             args = null;
  512.             MethodDescriptor countItems = new MethodDescriptor(beanClass.getMethod("countItems", args));
  513.  
  514.             connections = new java.util.Vector();
  515.             connection = new ConnectionDescriptor("output", "int", "",
  516.                                     "%name%.countItems()",
  517.                                     conn.getString("countItems"));
  518.             connections.addElement(connection);
  519.  
  520.             countItems.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  521.             md.addElement(countItems);
  522.         } catch (Exception e) { throw new Error("countItems:: " + e.toString()); }
  523.  
  524.         try{
  525.             args = null;
  526.             MethodDescriptor isComboMode = new MethodDescriptor(beanClass.getMethod("isComboMode", args));
  527.  
  528.             connections = new java.util.Vector();
  529.             connection = new ConnectionDescriptor("output", "boolean", "",
  530.                                     "%name%.isComboMode()",
  531.                                     conn.getString("isComboMode"));
  532.             connections.addElement(connection);
  533.  
  534.             connection = new ConnectionDescriptor("output", "boolean", "",
  535.                                     "!%name%.isComboMode()",
  536.                                     conn.getString("isMultiColMode"));
  537.             connections.addElement(connection);
  538.  
  539.             isComboMode.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  540.             md.addElement(isComboMode);
  541.         } catch (Exception e) { throw new Error("isComboMode:: " + e.toString()); }
  542.  
  543.         try{
  544.             args = null;
  545.             MethodDescriptor clear = new MethodDescriptor(beanClass.getMethod("clear", args));
  546.  
  547.             connections = new java.util.Vector();
  548.             connection = new ConnectionDescriptor("input", "void", "",
  549.                                     "%name%.clear();",
  550.                                     conn.getString("clear"));
  551.             connections.addElement(connection);
  552.  
  553.             clear.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  554.             md.addElement(clear);
  555.         } catch (Exception e) { throw new Error("clear:: " + e.toString()); }
  556.  
  557.         try{
  558.             args = new Class[1];
  559.             args[0] = java.lang.Boolean.TYPE ;
  560.             MethodDescriptor setShowHorizontalScroll = new MethodDescriptor(beanClass.getMethod("setShowHorizontalScroll", args));
  561.  
  562.             connections = new java.util.Vector();
  563.             connection = new ConnectionDescriptor("input", "boolean", "",
  564.                                     "%name%.setShowHorizontalScroll(%arg%);",
  565.                                     conn.getString("setShowHorizontalScrollValue"));
  566.             connections.addElement(connection);
  567.  
  568.             connection = new ConnectionDescriptor("input", "void", "",
  569.                                     "%name%.setShowHorizontalScroll(true);",
  570.                                     conn.getString("setShowHorizontalScrollTrue"));
  571.             connections.addElement(connection);
  572.  
  573.             connection = new ConnectionDescriptor("input", "void", "",
  574.                                     "%name%.setShowHorizontalScroll(false);",
  575.                                     conn.getString("setShowHorizontalScrollFalse"));
  576.             connections.addElement(connection);
  577.  
  578.             setShowHorizontalScroll.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  579.             md.addElement(setShowHorizontalScroll);
  580.         } catch (Exception e) { throw new Error("setShowHorizontalScroll:: " + e.toString()); }
  581.  
  582.         try{
  583.             args = null;
  584.             MethodDescriptor delSelectedItems = new MethodDescriptor(beanClass.getMethod("delSelectedItems", args));
  585.  
  586.             connections = new java.util.Vector();
  587.             connection = new ConnectionDescriptor("input", "void", "",
  588.                                     "%name%.delSelectedItems();",
  589.                                     conn.getString("delSelectedItems"));
  590.             connections.addElement(connection);
  591.  
  592.             delSelectedItems.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  593.             md.addElement(delSelectedItems);
  594.         } catch (Exception e) { throw new Error("delSelectedItems:: " + e.toString()); }
  595.  
  596.         try{
  597.             args = new Class[1];
  598.             args[0] = java.lang.Boolean.TYPE ;
  599.             MethodDescriptor setMultiColumnMode = new MethodDescriptor(beanClass.getMethod("setMultiColumnMode", args));
  600.  
  601.             connections = new java.util.Vector();
  602.             connection = new ConnectionDescriptor("input", "void", "",
  603.                                     "%name%.setMultiColumnMode(true);",
  604.                                     conn.getString("setMultiColumnModeTrue"));
  605.             connections.addElement(connection);
  606.  
  607.             connection = new ConnectionDescriptor("input", "void", "",
  608.                                     "%name%.setMultiColumnMode(false);",
  609.                                     conn.getString("setMultiColumnModeFalse"));
  610.             connections.addElement(connection);
  611.  
  612.             setMultiColumnMode.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  613.             md.addElement(setMultiColumnMode);
  614.         } catch (Exception e) { throw new Error("setMultiColumnMode:: " + e.toString()); }
  615.  
  616.         try{
  617.             args = null;
  618.             MethodDescriptor getRowsToShow = new MethodDescriptor(beanClass.getMethod("getRowsToShow", args));
  619.  
  620.             connections = new java.util.Vector();
  621.             connection = new ConnectionDescriptor("output", "int", "",
  622.                                     "%name%.getRowsToShow()",
  623.                                     conn.getString("getRowsToShow"));
  624.             connections.addElement(connection);
  625.  
  626.             getRowsToShow.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  627.             md.addElement(getRowsToShow);
  628.         } catch (Exception e) { throw new Error("getRowsToShow:: " + e.toString()); }
  629.  
  630.         try{
  631.             args = new Class[1];
  632.             args[0] = java.lang.Integer.TYPE ;
  633.             MethodDescriptor setTopRow = new MethodDescriptor(beanClass.getMethod("setTopRow", args));
  634.  
  635.             connections = new java.util.Vector();
  636.             connection = new ConnectionDescriptor("input", "int", "",
  637.                                     "%name%.setTopRow(%arg%);",
  638.                                     conn.getString("setTopRow"));
  639.             connections.addElement(connection);
  640.  
  641.             setTopRow.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  642.             md.addElement(setTopRow);
  643.         } catch (Exception e) { throw new Error("setTopRow:: " + e.toString()); }
  644.  
  645.         try{
  646.             args = new Class[2];
  647.             args[0] = java.lang.Integer.TYPE ;
  648.             args[1] = java.lang.Boolean.TYPE ;
  649.             MethodDescriptor setEnabled = new MethodDescriptor(beanClass.getMethod("setEnabled", args));
  650.  
  651.             connections = new java.util.Vector();
  652.             connection = new ConnectionDescriptor("input", "int", "",
  653.                                     "%name%.setEnabled(%arg%, true);",
  654.                                     conn.getString("setEnabledTrue"));
  655.             connections.addElement(connection);
  656.  
  657.             connection = new ConnectionDescriptor("input", "int", "",
  658.                                     "%name%.setEnabled(%arg%, false);",
  659.                                     conn.getString("setEnabledFalse"));
  660.             connections.addElement(connection);
  661.  
  662.             setEnabled.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  663.             md.addElement(setEnabled);
  664.         } catch (Exception e) { throw new Error("setEnabled:: " + e.toString()); }
  665.  
  666.         try{
  667.             args = null;
  668.             MethodDescriptor getSelectedIndex = new MethodDescriptor(beanClass.getMethod("getSelectedIndex", args));
  669.  
  670.             connections = new java.util.Vector();
  671.             connection = new ConnectionDescriptor("output", "int", "",
  672.                                     "%name%.getSelectedIndex()",
  673.                                     conn.getString("getSelectedIndex"));
  674.             connections.addElement(connection);
  675.  
  676.             getSelectedIndex.setValue(ConnectionDescriptor.CONNECTIONS, connections);
  677.             md.addElement(getSelectedIndex);
  678.         } catch (Exception e) { throw new Error("getSelectedIndex:: " + e.toString()); }
  679.  
  680.         MethodDescriptor[] rv = new MethodDescriptor[md.size()];
  681.         md.copyInto(rv);
  682.  
  683.         return rv;
  684.     }
  685.  
  686.     /**
  687.      * Returns descriptions of this bean's properties.
  688.      */
  689.     public PropertyDescriptor[] getPropertyDescriptors() {
  690.         ResourceBundle prop = ResourceBundle.getBundle("symantec.itools.resources.PropBundle");
  691.  
  692.         try{
  693.         PropertyDescriptor borderType = new PropertyDescriptor("borderType", beanClass);
  694.         borderType.setBound(true);
  695.         borderType.setConstrained(true);
  696.         borderType.setDisplayName(prop.getString("borderType"));
  697.         borderType.setValue("ENUMERATION","BORDER_REGULAR=0, BORDER_NONE=1");
  698.  
  699.         PropertyDescriptor cellBorders = new PropertyDescriptor("cellBorders", beanClass);
  700.         cellBorders.setBound(true);
  701.         cellBorders.setConstrained(true);
  702.         cellBorders.setDisplayName(prop.getString("cellBorders"));
  703.  
  704.         PropertyDescriptor columns = new PropertyDescriptor("columns", beanClass);
  705.         columns.setBound(true);
  706.         columns.setConstrained(true);
  707.         columns.setDisplayName(prop.getString("columns"));
  708.  
  709.         PropertyDescriptor comboMode = new PropertyDescriptor("comboMode", beanClass);
  710.         comboMode.setBound(true);
  711.         comboMode.setConstrained(true);
  712.         comboMode.setDisplayName(prop.getString("comboMode"));
  713.  
  714.         PropertyDescriptor listItems = new PropertyDescriptor("listItems", beanClass);
  715.         listItems.setBound(true);
  716.         listItems.setConstrained(true);
  717.         listItems.setDisplayName(prop.getString("listItems"));
  718.  
  719.         PropertyDescriptor multiColumnMode = new PropertyDescriptor("multiColumnMode", beanClass, null, "setMultiColumnMode");
  720.         multiColumnMode.setBound(true);
  721.         multiColumnMode.setConstrained(true);
  722.         multiColumnMode.setDisplayName(prop.getString("multiColumnMode"));
  723.  
  724.         PropertyDescriptor multipleSelections = new PropertyDescriptor("multipleSelections", beanClass);
  725.         multipleSelections.setBound(true);
  726.         multipleSelections.setConstrained(true);
  727.         multipleSelections.setDisplayName(prop.getString("multipleSelections"));
  728.  
  729.         PropertyDescriptor rowsToShow = new PropertyDescriptor("rowsToShow", beanClass);
  730.         rowsToShow.setBound(true);
  731.         rowsToShow.setConstrained(true);
  732.         rowsToShow.setDisplayName(prop.getString("rowsToShow"));
  733.  
  734.         PropertyDescriptor showHorizontalScroll = new PropertyDescriptor("showHorizontalScroll", beanClass);
  735.         showHorizontalScroll.setBound(true);
  736.         showHorizontalScroll.setConstrained(true);
  737.         showHorizontalScroll.setDisplayName(prop.getString("showHorizontalScroll"));
  738.  
  739.         PropertyDescriptor showVerticalScroll = new PropertyDescriptor("showVerticalScroll", beanClass);
  740.         showVerticalScroll.setBound(true);
  741.         showVerticalScroll.setConstrained(true);
  742.         showVerticalScroll.setDisplayName(prop.getString("showVerticalScroll"));
  743.  
  744.         PropertyDescriptor layout = new PropertyDescriptor("layout", beanClass);
  745.         layout.setHidden(true);
  746.  
  747.         PropertyDescriptor[] rv = {
  748.             borderType,
  749.             cellBorders,
  750.             columns,
  751.             comboMode,
  752.             listItems,
  753.             multiColumnMode,
  754.             multipleSelections,
  755.             rowsToShow,
  756.             showHorizontalScroll,
  757.             showVerticalScroll,
  758.             layout};
  759.         return rv;
  760.         } catch (IntrospectionException e) { throw new Error(e.toString()); }
  761.     }
  762.  
  763.     private final static Class beanClass = ImageListBox.class;
  764.  
  765.     }    //  end of class ImageListBoxBeanInfo