home *** CD-ROM | disk | FTP | other *** search
/ BUG 15 / BUGCD1998_06.ISO / aplic / jbuilder / jruntime.z / BeanInfo.snippet < prev    next >
Text File  |  1997-08-25  |  3KB  |  119 lines

  1. // This snippet creates a bean info shell for the specified class.
  2. // Example descriptors can be commented out to enable specific
  3. // bean info functionlity.
  4.  
  5. // Snippet Note: Use the parameter button to change the name of the bean class.
  6. //<Target text="Name for bean info class" pattern=%classnameBeanInfo% default="MyComponentBeanInfo">
  7. //<Prompt text="Bean class" pattern=%classname% default="MyComponent">
  8.  
  9. //<Package>
  10.  
  11. import java.beans.BeanInfo;
  12. import borland.jbcl.util.BasicBeanInfo;
  13.  
  14. public class %classnameBeanInfo% extends BasicBeanInfo {
  15.   public %classnameBeanInfo%() {
  16.     beanClass = %classname%.class;
  17.     
  18.     /*
  19.     customizerClass=null; //Optional customizer class
  20.     */
  21.  
  22.     /**
  23.      * The event information for your JavaBean.
  24.      * Format:  {{"EventSetName", "EventListenerClass", "AddMethod", "RemoveMethod"}, ...}
  25.      * Example: {{"ActionListener", "java.awt.event.ActionListener", "addActionListener", "removeActionListener"}, ...}
  26.      */
  27.     /*
  28.     eventSetDescriptors = new String[][] {
  29.       {"ActionListener", "java.awt.event.ActionListener", "addActionListener", "removeActionListener"},
  30.     };
  31.     */
  32.  
  33.     /**
  34.      * The names of each event set's listener methods.
  35.      * Format:  {{"listener1Method1", "listener1Method2", "listener1Method3", ...}, ...}
  36.      * Example: {{"actionPerformed"}, ...}
  37.      */
  38.     /*
  39.     eventListenerMethods = new String[][] {
  40.       {"actionPerformed"},
  41.     };
  42.     */
  43.  
  44.     /**
  45.      * The index of the default event for your JavaBean.
  46.      */
  47.     defaultEventIndex = -1;
  48.  
  49.     // Property Info
  50.  
  51.     /**
  52.      * The property information for your JavaBean.
  53.      * Format:  {{"PropertyName", ""PropertyDescription", "ReadMethod", "WriteMethod"}, ...}
  54.      * Example: {{"fontSize", "Get the font size (points)", "getFontSize", "setFontSize"}, ...}
  55.      */
  56.     /*
  57.     String[][] propertyDescriptors = new String[][] {
  58.       {"fontSize", "Get the font size (points)", "getFontSize", "setFontSize"},
  59.     };
  60.     */
  61.  
  62.     /**
  63.      * The index of the default property for your JavaBean.
  64.      */
  65.     defaultPropertyIndex = -1;
  66.  
  67.     // Method Info
  68.  
  69.     /**
  70.      * The method names (non-properties) for your JavaBean.
  71.      * Format:  {"method1", "method2", "method3", ...}
  72.      * Example: {"fillRect", "eraseRect", "close", "open"}
  73.      */
  74.     methodNames = new String[] {"fillRect", "eraseRect", "close", "open"};
  75.  
  76.     /**
  77.      * The method parameters for each of your JavaBean's methods.
  78.      * Format:  {{"method1Parameter1", "method1Parameter2", ...}, ...}
  79.      * Example: {{"java.awt.Graphics", "java.awt.Rectangle", ...}, ...}
  80.      */
  81.     /*
  82.     methodParameters = new String[][] {
  83.       {"java.awt.Graphics", "java.awt.Rectangle"},
  84.     };
  85.     */
  86.  
  87.     // Icon Info
  88.  
  89.     /**
  90.      * A 16x16 color icon for your JavaBean.
  91.      */
  92.     iconColor16x16 = null;
  93.  
  94.     /**
  95.      * A 32x32 color icon for your JavaBean.
  96.      */
  97.     iconColor32x32 = null;
  98.  
  99.     /**
  100.      * A 16x16 monochromatic icon for your JavaBean.
  101.      */
  102.     iconMono16x16 = null;
  103.  
  104.     /**
  105.      * A 32x32 monochromatic icon for your JavaBean.
  106.      */
  107.     iconMono32x32 = null;
  108.  
  109.     // Additional Info
  110.  
  111.     /**
  112.      * Any additional BeanInfo for this JavaBean.
  113.      */
  114.     /*
  115.     additionalBeanInfo = new BeanInfo[0];
  116.     */
  117.   }
  118. }
  119.