home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / JActionMenuItemBeanInfo.java < prev    next >
Text File  |  1998-09-24  |  2KB  |  74 lines

  1. package com.symantec.itools.swing.actions;
  2.  
  3. import java.beans.*;
  4. import java.util.ResourceBundle;
  5. import com.symantec.itools.swing.DesignTimeResourceBundle;
  6. import com.symantec.itools.vcafe.beans.ObjectReferenceAttributes;
  7.  
  8. public final class JActionMenuItemBeanInfo
  9.     extends com.symantec.itools.beans.HelperBeanInfo
  10. {
  11.     public JActionMenuItemBeanInfo()
  12.     {
  13.         ResourceBundle resources = ResourceBundle.getBundle("com.symantec.itools.swing.DesignTimeResourceBundle");
  14.         String folderName = resources.getString(DesignTimeResourceBundle.MENU_AND_MENU_ITEMS_FOLDER_KEY);
  15.         setComponentLibraryFolder(folderName);
  16.         
  17.         setInheritSuperBeanInfo(true);
  18.         setWinHelpKey(m_WinHelpID);
  19.     }
  20.     
  21.     public PropertyDescriptor[] getPropertyDescriptors()
  22.     {
  23.         try
  24.         {
  25.             //
  26.             // Added properties
  27.             //
  28.             
  29.             PropertyDescriptor actionPD = new PropertyDescriptor("action",m_JActionMenuItemClass);
  30.             actionPD.setValue(ObjectReferenceAttributes.OBJECTREFERENCE_DEFAULT_IS_NONE_ATTRIBUTE, Boolean.TRUE);
  31.             
  32.             //
  33.             // Hidden properties
  34.             //
  35.             
  36.             PropertyDescriptor textPD = new PropertyDescriptor("text",m_JActionMenuItemClass);
  37.             textPD.setHidden(true);
  38.             
  39.             PropertyDescriptor enabledPD = new PropertyDescriptor("enabled",m_JActionMenuItemClass);
  40.             enabledPD.setHidden(true);
  41.             
  42.             PropertyDescriptor iconPD = new PropertyDescriptor("icon",m_JActionMenuItemClass);
  43.             iconPD.setHidden(true);
  44.             
  45.             PropertyDescriptor disabledIconPD = new PropertyDescriptor("disabledIcon",m_JActionMenuItemClass);
  46.             disabledIconPD.setHidden(true);
  47.             
  48.             return new PropertyDescriptor[]
  49.                 {
  50.                     actionPD,
  51.                     textPD,
  52.                     enabledPD,
  53.                     iconPD,
  54.                     disabledIconPD,
  55.                 };
  56.         }
  57.         catch(IntrospectionException e)
  58.         {
  59.             e.printStackTrace();
  60.         }
  61.         
  62.         return null;
  63.     }
  64.     
  65.     protected Class getBeanClass()
  66.     {
  67.         return m_JActionMenuItemClass;
  68.     }
  69.     
  70.     protected final static String m_WinHelpID = "0x600FA";
  71.     
  72.     protected final static Class m_JActionMenuItemClass = JActionMenuItem.class;
  73. }
  74.