home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
CurrencyTextFieldBeanInfo.java
< prev
next >
Wrap
Text File
|
1999-01-14
|
5KB
|
108 lines
package com.symantec.itools.awt;
import java.beans.*;
import java.util.ResourceBundle;
import java.awt.Image;
import com.symantec.itools.beans.HelperBeanInfo;
import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
import com.symantec.itools.vcafe.beans.*;
// 08/19/98 LAB Moved to GroupAWTAdditions folder.
// 10/06/98 VJ Added code for grouping together currency properties
public class CurrencyTextFieldBeanInfo extends HelperBeanInfo {
protected final static String m_WinHelpID = "0x602C6";
public CurrencyTextFieldBeanInfo() {
setInheritSuperBeanInfo(true);
ResourceBundle group = ResourceBundle.getBundle("com.symantec.itools.awt.GroupBundle");
String s = group.getString("GroupAWTAdditions");
setComponentLibraryFolder(s);
setToolbarFolder(s);
setWinHelpKey(m_WinHelpID);
// set icons
set16x16ColorIconName("curr16.gif");
set32x32ColorIconName("curr32.gif");
set16x16MonoIconName("curr16bw.gif");
set32x32MonoIconName("curr32bw.gif");
}
protected Class getBeanClass()
{
return beanClass;
}
//VJ start
public PropertyDescriptor[] getPropertyDescriptors() {
try{
/*
We don't want to display dataText - puru (10/26/98)
PropertyDescriptor dataText = new PropertyDescriptor("dataText", beanClass,"getDataText",null);
dataText.setBound(false);
dataText.setConstrained(false);
dataText.setDisplayName("Data Text");
dataText.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
*/
PropertyDescriptor ATMmode = new PropertyDescriptor("ATMmode", getBeanClass());
ATMmode.setBound(false);
ATMmode.setConstrained(false);
ATMmode.setDisplayName("ATM Mode");
ATMmode.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
//to be uncommented later
//ATMmode.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_ATM_MODE_HELP_ID));
PropertyDescriptor decimalPoint = new PropertyDescriptor("decimalPoint", beanClass);
decimalPoint.setBound(false);
decimalPoint.setConstrained(false);
decimalPoint.setDisplayName("Decimal Point");
decimalPoint.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
decimalPoint.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_DECPOINT_HELP_ID));
PropertyDescriptor digitsAfterDecimal = new PropertyDescriptor("digitsAfterDecimal", beanClass);
digitsAfterDecimal.setBound(false);
digitsAfterDecimal.setConstrained(false);
digitsAfterDecimal.setDisplayName("Digits After Decimal");
digitsAfterDecimal.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
digitsAfterDecimal.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_DIGITS_AFTER_DEC_HELP_ID));
PropertyDescriptor currencyLeading = new PropertyDescriptor("currencyLeading", beanClass);
currencyLeading.setBound(false);
currencyLeading.setConstrained(false);
currencyLeading.setDisplayName("Leading Symbol");
currencyLeading.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
currencyLeading.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_LEAD_SYMBOL_HELP_ID));
PropertyDescriptor separator = new PropertyDescriptor("separator", beanClass);
separator.setBound(false);
separator.setConstrained(false);
separator.setDisplayName("Separator");
separator.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
separator.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_SEP_HELP_ID));
PropertyDescriptor separatorEnabled = new PropertyDescriptor("separatorEnabled", beanClass);
separatorEnabled.setBound(false);
separatorEnabled.setConstrained(false);
separatorEnabled.setDisplayName("Separator Enabled");
separatorEnabled.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
separatorEnabled.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_SEP_ENABLED_HELP_ID));
PropertyDescriptor currencySymbol = new PropertyDescriptor("currencySymbol", beanClass);
currencySymbol.setBound(false);
currencySymbol.setConstrained(false);
currencySymbol.setDisplayName("Symbol");
currencySymbol.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,"Currency");
currencySymbol.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.DBCURR_SYMBOL_HELP_ID));
PropertyDescriptor[] rv = {ATMmode,currencySymbol,currencyLeading,decimalPoint,digitsAfterDecimal,
separator,separatorEnabled};
return rv;
} catch (IntrospectionException e) { throw new Error(e.toString()); }
}
//VJ end
private final static Class beanClass = CurrencyTextField.class;
}