home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgLangD.iso / VCAFE.3.0A / Main.bin / CurrencyTextFieldBeanInfo.java < prev    next >
Text File  |  1999-01-14  |  5KB  |  108 lines

  1. package com.symantec.itools.awt;
  2.  
  3. import java.beans.*;
  4. import java.util.ResourceBundle;
  5. import java.awt.Image;
  6. import com.symantec.itools.beans.HelperBeanInfo;
  7. import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
  8. import com.symantec.itools.vcafe.beans.*;
  9.  
  10. //  08/19/98    LAB    Moved to GroupAWTAdditions folder.
  11. //  10/06/98    VJ    Added code for grouping together currency properties
  12.  
  13. public class CurrencyTextFieldBeanInfo extends HelperBeanInfo {
  14.     protected final static String m_WinHelpID = "0x602C6";
  15.     
  16.     public CurrencyTextFieldBeanInfo() {
  17.         setInheritSuperBeanInfo(true);
  18.         
  19.         ResourceBundle group = ResourceBundle.getBundle("com.symantec.itools.awt.GroupBundle");
  20.         String s = group.getString("GroupAWTAdditions");
  21.  
  22.         setComponentLibraryFolder(s);
  23.         setToolbarFolder(s);        
  24.         setWinHelpKey(m_WinHelpID);                    
  25.         
  26.         // set icons
  27.         set16x16ColorIconName("curr16.gif");
  28.         set32x32ColorIconName("curr32.gif");
  29.         set16x16MonoIconName("curr16bw.gif");
  30.         set32x32MonoIconName("curr32bw.gif");        
  31.     }
  32.  
  33.     protected Class getBeanClass()
  34.     {
  35.         return beanClass;
  36.     }
  37.  
  38.     //VJ start
  39.     public PropertyDescriptor[] getPropertyDescriptors() {
  40.         try{
  41.             /*
  42.             We don't want to display dataText - puru (10/26/98)
  43.         PropertyDescriptor dataText = new PropertyDescriptor("dataText", beanClass,"getDataText",null);
  44.         dataText.setBound(false);
  45.         dataText.setConstrained(false);
  46.         dataText.setDisplayName("Data Text");
  47.         dataText.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  48.            */
  49.         PropertyDescriptor ATMmode = new PropertyDescriptor("ATMmode", getBeanClass());
  50.         ATMmode.setBound(false);
  51.         ATMmode.setConstrained(false);
  52.         ATMmode.setDisplayName("ATM Mode");
  53.         ATMmode.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  54.         //to be uncommented later
  55.         //ATMmode.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_ATM_MODE_HELP_ID));
  56.  
  57.         PropertyDescriptor decimalPoint = new PropertyDescriptor("decimalPoint", beanClass);
  58.         decimalPoint.setBound(false);
  59.         decimalPoint.setConstrained(false);
  60.         decimalPoint.setDisplayName("Decimal Point");
  61.         decimalPoint.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  62.         decimalPoint.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_DECPOINT_HELP_ID));
  63.  
  64.         PropertyDescriptor digitsAfterDecimal = new PropertyDescriptor("digitsAfterDecimal", beanClass);
  65.         digitsAfterDecimal.setBound(false);
  66.         digitsAfterDecimal.setConstrained(false);
  67.         digitsAfterDecimal.setDisplayName("Digits After Decimal");
  68.         digitsAfterDecimal.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  69.         digitsAfterDecimal.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_DIGITS_AFTER_DEC_HELP_ID));
  70.  
  71.         PropertyDescriptor currencyLeading = new PropertyDescriptor("currencyLeading", beanClass);
  72.         currencyLeading.setBound(false);
  73.         currencyLeading.setConstrained(false);
  74.         currencyLeading.setDisplayName("Leading Symbol");
  75.         currencyLeading.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  76.         currencyLeading.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_LEAD_SYMBOL_HELP_ID));
  77.  
  78.         PropertyDescriptor separator = new PropertyDescriptor("separator", beanClass);
  79.         separator.setBound(false);
  80.         separator.setConstrained(false);
  81.         separator.setDisplayName("Separator");
  82.         separator.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  83.         separator.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_SEP_HELP_ID));
  84.  
  85.         PropertyDescriptor separatorEnabled = new PropertyDescriptor("separatorEnabled", beanClass);
  86.         separatorEnabled.setBound(false);
  87.         separatorEnabled.setConstrained(false);
  88.         separatorEnabled.setDisplayName("Separator Enabled");
  89.         separatorEnabled.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  90.         separatorEnabled.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_SEP_ENABLED_HELP_ID));
  91.  
  92.         PropertyDescriptor currencySymbol = new PropertyDescriptor("currencySymbol", beanClass);
  93.         currencySymbol.setBound(false);
  94.         currencySymbol.setConstrained(false);
  95.         currencySymbol.setDisplayName("Symbol");
  96.         currencySymbol.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
  97.         currencySymbol.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_SYMBOL_HELP_ID));
  98.  
  99.          PropertyDescriptor[] rv = {ATMmode,currencySymbol,currencyLeading,decimalPoint,digitsAfterDecimal,
  100.                                      separator,separatorEnabled};
  101.  
  102.         return rv;
  103.         } catch (IntrospectionException e) { throw new Error(e.toString()); }
  104.     }
  105.     //VJ end
  106.     private final static Class beanClass = CurrencyTextField.class;
  107. }
  108.