home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Languages Suite
/
ProgLangD.iso
/
VCAFE.3.0A
/
Main.bin
/
JListChooserBeanInfo.java
< prev
next >
Wrap
Text File
|
1998-11-02
|
8KB
|
163 lines
package com.symantec.itools.swing;
import java.beans.*;
import java.util.ResourceBundle;
import com.symantec.itools.swing.DesignTimeResourceBundle;
import com.symantec.itools.vcafe.beans.*;
public class JListChooserBeanInfo extends com.symantec.itools.beans.HelperBeanInfo
{
public JListChooserBeanInfo()
{
setInheritSuperBeanInfo(true);
ResourceBundle resources = ResourceBundle.getBundle("com.symantec.itools.swing.DesignTimeResourceBundle");
String folderName = resources.getString(DesignTimeResourceBundle.SWING_ADDITIONS_FOLDER_TOOLBAR_KEY);
setComponentLibraryFolder(folderName);
setToolbarFolder(folderName);
setIsContainer(false);
setWinHelpKey(m_WinHelpID);
}
protected Class getBeanClass()
{
return JListChooser.class;
}
/**
* Gets an image that may be used to visually represent this bean
* (in the toolbar, on a form, etc).
* @param iconKind the type of icon desired, one of: BeanInfo.ICON_MONO_16x16,
* BeanInfo.ICON_COLOR_16x16, BeanInfo.ICON_MONO_32x32, or BeanInfo.ICON_COLOR_32x32.
* @return an image for this bean
* @see BeanInfo#ICON_MONO_16x16
* @see BeanInfo#ICON_COLOR_16x16
* @see BeanInfo#ICON_MONO_32x32
* @see BeanInfo#ICON_COLOR_32x32
*/
public java.awt.Image getIcon(int iconKind) {
java.awt.Image img = null;
switch (iconKind) {
case BeanInfo.ICON_MONO_16x16:
case BeanInfo.ICON_COLOR_16x16:
img = loadImage("jlistchooser16.gif");
break;
case BeanInfo.ICON_MONO_32x32:
case BeanInfo.ICON_COLOR_32x32:
img = loadImage("jlistchooser32.gif");
}
return img;
}
public PropertyDescriptor[] getPropertyDescriptors() {
//ResourceBundle prop = ResourceBundle.getBundle("symantec.itools.db.resources.PropBundle");
final Class beanClass = getBeanClass();
try{
PropertyDescriptor pdAvailableList = new PropertyDescriptor("availableListModel", beanClass);
pdAvailableList.setBound(false);
pdAvailableList.setConstrained(false);
pdAvailableList.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdAvailableList.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Models");
pdAvailableList.setDisplayName("Available List Model");
pdAvailableList.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_AVAILABLE_LIST_MODEL_HELP_ID));
PropertyDescriptor pdSelectedList = new PropertyDescriptor("selectedListModel", beanClass);
pdSelectedList.setBound(false);
pdSelectedList.setConstrained(false);
pdSelectedList.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdSelectedList.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Models");
pdSelectedList.setDisplayName("Selected List Model");
pdSelectedList.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_SELECTED_LIST_MODEL_HELP_ID));
PropertyDescriptor pdBeanBorder = new PropertyDescriptor("border", beanClass);
pdBeanBorder.setBound(true);
pdBeanBorder.setConstrained(false);
pdBeanBorder.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdBeanBorder.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Borders");
pdBeanBorder.setDisplayName("Border");
pdBeanBorder.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_BORDER_HELP_ID));
PropertyDescriptor pdSelectedBorder = new PropertyDescriptor("selectedBorder", beanClass);
pdSelectedBorder.setBound(false);
pdSelectedBorder.setConstrained(false);
pdSelectedBorder.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdSelectedBorder.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Borders");
pdSelectedBorder.setDisplayName("Selected List Border");
pdSelectedBorder.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_SELECTED_LIST_BORDER_HELP_ID));
PropertyDescriptor pdAvailableBorder = new PropertyDescriptor("availableBorder", beanClass);
pdAvailableBorder.setBound(false);
pdAvailableBorder.setConstrained(false);
pdAvailableBorder.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdAvailableBorder.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Borders");
pdAvailableBorder.setDisplayName("Available List Border");
pdAvailableBorder.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_AVAILABLE_LIST_BORDER_HELP_ID));
PropertyDescriptor pdAddAllLabel = new PropertyDescriptor("addAllLabel", beanClass);
pdAddAllLabel.setBound(false);
pdAddAllLabel.setConstrained(false);
pdAddAllLabel.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdAddAllLabel.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Button Labels");
pdAddAllLabel.setDisplayName("AddAll Label");
pdAddAllLabel.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_ADDALL_LABEL_HELP_ID));
PropertyDescriptor pdClearLabel = new PropertyDescriptor("clearLabel", beanClass);
pdClearLabel.setBound(false);
pdClearLabel.setConstrained(false);
pdClearLabel.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdClearLabel.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Button Labels");
pdClearLabel.setDisplayName("Clear Label");
pdClearLabel.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_CLEAR_LABEL_HELP_ID));
PropertyDescriptor pdRemoveLabel = new PropertyDescriptor("removeLabel", beanClass);
pdRemoveLabel.setBound(false);
pdRemoveLabel.setConstrained(false);
pdRemoveLabel.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdRemoveLabel.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Button Labels");
pdRemoveLabel.setDisplayName("Remove Label");
pdRemoveLabel.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_REMOVE_LABEL_HELP_ID));
PropertyDescriptor pdAddLabel = new PropertyDescriptor("addLabel", beanClass);
pdAddLabel.setBound(false);
pdAddLabel.setConstrained(false);
pdAddLabel.setValue(com.symantec.itools.vcafe.beans.ObjectReferenceAttributes.OBJECTREFERENCE_SHOW_POSSIBLE_COMPONENT_REFERENCES_ATTRIBUTE, Boolean.TRUE);
pdAddLabel.setValue(PropertyDescriptorAttributes.GROUPING_ATTRIBUTE,
"Button Labels");
pdAddLabel.setDisplayName("Add Label");
pdAddLabel.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.JLISTCHOOSER_ADD_LABEL_HELP_ID));
PropertyDescriptor pdLayout= new PropertyDescriptor("layout", beanClass);
pdLayout.setBound(false);
pdLayout.setConstrained(false);
pdLayout.setDisplayName("Hidden");
pdLayout.setHidden(true);
PropertyDescriptor[] rv = {
pdAvailableList,
pdSelectedList,
pdBeanBorder,
pdSelectedBorder,
pdAvailableBorder,
pdAddAllLabel,
pdClearLabel,
pdRemoveLabel,
pdAddLabel,
pdLayout
};
return rv;
} catch (IntrospectionException e) { throw new Error(e.toString()); }
}
protected final static String m_WinHelpID = "0x60140";
}