home *** CD-ROM | disk | FTP | other *** search
/ CD Ware Multimedia 1999 February / CDW0299.iso / Demos / Cafe / Source.bin / BorderPanelBeanInfo.java < prev    next >
Encoding:
Java Source  |  1998-03-18  |  21.1 KB  |  571 lines

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