public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor rootDirStr = new PropertyDescriptor("rootDirStr", getBeanDescriptor().getBeanClass()); rootDirStr.setBound(true); rootDirStr.setPropertyEditorClass(JTextFieldEditor.class); rootDirStr.setDisplayName("<html><font color='green'>root dir:"); rootDirStr.setShortDescription("The directory root to search for change sets. "); PropertyDescriptor validateChangeSets = new PropertyDescriptor("validateChangeSets", getBeanDescriptor().getBeanClass()); validateChangeSets.setBound(true); validateChangeSets.setPropertyEditorClass(CheckboxEditor.class); validateChangeSets.setDisplayName("<html><font color='green'>validate:"); validateChangeSets.setShortDescription("Select if you want to validate change sets. "); PropertyDescriptor validators = new PropertyDescriptor("validators", getBeanDescriptor().getBeanClass()); validators.setBound(true); validators.setPropertyEditorClass(JTextFieldEditor.class); validators.setDisplayName("<html><font color='green'>validators:"); validators.setShortDescription("The validators used on the change sets. "); PropertyDescriptor rv[] = {rootDirStr, validateChangeSets, validators}; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor queueType = new PropertyDescriptor("queueType", ToQueue.class); queueType.setBound(true); queueType.setPropertyEditorClass(ConceptLabelEditor.class); queueType.setDisplayName("Queue type:"); queueType.setShortDescription("The type of queue to place this process into."); PropertyDescriptor rv[] = {queueType}; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor profilePropName = new PropertyDescriptor("profilePropName", getBeanDescriptor().getBeanClass()); profilePropName.setBound(true); profilePropName.setPropertyEditorClass(PropertyNameLabelEditor.class); profilePropName.setDisplayName("<html><font color='green'>profile prop:"); profilePropName.setShortDescription("The property that contains the working profile."); PropertyDescriptor rv[] = {profilePropName}; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor inputPropName = new PropertyDescriptor("inputPropName", getBeanDescriptor().getBeanClass()); inputPropName.setBound(true); inputPropName.setPropertyEditorClass(PropertyNameLabelEditor.class); inputPropName.setDisplayName("<html><font color='green'>input set property"); inputPropName.setShortDescription(""); PropertyDescriptor rv[] = {inputPropName}; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor radius = new PropertyDescriptor("radius", beanClass); radius.setBound(true); PropertyDescriptor original = new PropertyDescriptor("original", beanClass); PropertyDescriptor result = new PropertyDescriptor("result", beanClass); original.setBound(true); result.setBound(true); PropertyDescriptor[] propertyDescriptors = {radius, original, result}; return propertyDescriptors; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
/** * Reads the children of an XML element and matches them to properties of a bean. * * @param ob The bean to receive the values * @param element The element the corresponds to the bean * @throws IOException If there is an error reading the document */ public void readObject(Object ob, Element element) throws IOException { // If the object is null, skip the element if (ob == null) { return; } try { BeanInfo info = (BeanInfo) beanCache.get(ob.getClass()); if (info == null) { // Get the bean info for the object info = Introspector.getBeanInfo(ob.getClass(), Object.class); beanCache.put(ob.getClass(), info); } // Get the object's properties PropertyDescriptor[] props = info.getPropertyDescriptors(); // Get the attributes of the node NamedNodeMap attrs = element.getAttributes(); // Get the children of the XML element NodeList nodes = element.getChildNodes(); int numNodes = nodes.getLength(); for (int i = 0; i < props.length; i++) { // Treat indexed properties a little differently if (props[i] instanceof IndexedPropertyDescriptor) { readIndexedProperty(ob, (IndexedPropertyDescriptor) props[i], nodes, attrs); } else { readProperty(ob, props[i], nodes, attrs); } } } catch (IntrospectionException exc) { throw new IOException( "Error getting bean info for " + ob.getClass().getName() + ": " + exc.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor listName = new PropertyDescriptor("listName", TakeFirstItemInAttachmentList.class); listName.setBound(true); listName.setPropertyEditorClass(PropertyNameLabelEditor.class); listName.setDisplayName("<html><font color='green'>Name of temporary list:"); listName.setShortDescription("Name of the temporary list."); PropertyDescriptor conceptKey = new PropertyDescriptor("conceptKey", TakeFirstItemInAttachmentList.class); conceptKey.setBound(true); conceptKey.setPropertyEditorClass(PropertyNameLabelEditor.class); conceptKey.setDisplayName("<html><font color='green'>Concept key:"); conceptKey.setShortDescription("Concept key."); PropertyDescriptor rv[] = {listName, conceptKey}; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor profilePropName = new PropertyDescriptor("profilePropName", getBeanDescriptor().getBeanClass()); profilePropName.setBound(true); profilePropName.setPropertyEditorClass(PropertyNameLabelEditor.class); profilePropName.setDisplayName("<html><font color='green'>profile property:"); profilePropName.setShortDescription("The property containing the profile to change."); PropertyDescriptor editPathEntry = new PropertyDescriptor("editPathEntry", getBeanDescriptor().getBeanClass()); editPathEntry.setBound(true); editPathEntry.setPropertyEditorClass(ConceptLabelPropEditor.class); editPathEntry.setDisplayName("<html><font color='green'>editing path:"); editPathEntry.setShortDescription("The property that contains the editing path."); PropertyDescriptor rv[] = {profilePropName, editPathEntry}; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor name = new PropertyDescriptor("name", beanClass), background = new PropertyDescriptor("background", beanClass), foreground = new PropertyDescriptor("foreground", beanClass), font = new PropertyDescriptor("font", beanClass), enabled = new PropertyDescriptor("enabled", beanClass), visible = new PropertyDescriptor("visible", beanClass), focusable = new PropertyDescriptor("focusable", beanClass); enabled.setExpert(true); visible.setHidden(true); background.setBound(true); foreground.setBound(true); font.setBound(true); focusable.setBound(true); PropertyDescriptor[] rv = {name, background, foreground, font, enabled, visible, focusable}; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
// Static initializer. static { try { // Events. EventSetDescriptor event1 = new EventSetDescriptor( beanClass_, "propertyChange", PropertyChangeListener.class, "propertyChange"); event1.setDisplayName(rbl_.getText("EVT_NAME_PROPERTY_CHANGE")); event1.setShortDescription(rbl_.getText("EVT_DESC_PROPERTY_CHANGE")); EventSetDescriptor event2 = new EventSetDescriptor( beanClass_, "actionCompleted", ActionCompletedListener.class, "actionCompleted"); event2.setDisplayName(rbl_.getText("EVT_NAME_ACTION_COMPLETED")); event2.setShortDescription(rbl_.getText("EVT_DESC_ACTION_COMPLETED")); EventSetDescriptor event3 = new EventSetDescriptor( beanClass_, "propertyChange", VetoableChangeListener.class, "vetoableChange"); event3.setDisplayName(rbl_.getText("EVT_NAME_PROPERTY_VETO")); event3.setShortDescription(rbl_.getText("EVT_DESC_PROPERTY_VETO")); events_ = new EventSetDescriptor[] {event1, event2, event3}; // Properties. PropertyDescriptor classPath = new PropertyDescriptor("classPath", beanClass_, "getClassPath", "setClassPath"); classPath.setBound(true); classPath.setConstrained(true); classPath.setDisplayName(rbl_.getText("PROP_NAME_JAC_CLASSPATH")); classPath.setShortDescription(rbl_.getText("PROP_DESC_JAC_CLASSPATH")); PropertyDescriptor classPathSecurityChkLvl = new PropertyDescriptor( "securityCheckLevel", beanClass_, "getSecurityCheckLevel", "setSecurityCheckLevel"); classPathSecurityChkLvl.setBound(true); classPathSecurityChkLvl.setConstrained(true); classPathSecurityChkLvl.setDisplayName(rbl_.getText("PROP_NAME_JAC_SECCHKLVL")); classPathSecurityChkLvl.setShortDescription(rbl_.getText("PROP_DESC_JAC_SECCHKLVL")); PropertyDescriptor garbageCollectInitialSize = new PropertyDescriptor( "garbageCollectionInitialSize", beanClass_, "getGarbageCollectionInitialSize", "setGarbageCollectionInitialSize"); garbageCollectInitialSize.setBound(true); garbageCollectInitialSize.setConstrained(true); garbageCollectInitialSize.setDisplayName(rbl_.getText("PROP_NAME_JAC_GCINIT")); garbageCollectInitialSize.setShortDescription(rbl_.getText("PROP_DESC_JAC_GCINIT")); PropertyDescriptor garbageCollectMaximumSize = new PropertyDescriptor( "garbageCollectionMaximumSize", beanClass_, "getGarbageCollectionMaximumSize", "setGarbageCollectionMaximumSize"); garbageCollectMaximumSize.setBound(true); garbageCollectMaximumSize.setConstrained(true); garbageCollectMaximumSize.setDisplayName(rbl_.getText("PROP_NAME_JAC_GCMAX")); garbageCollectMaximumSize.setShortDescription(rbl_.getText("PROP_DESC_JAC_GCMAX")); PropertyDescriptor garbageCollectionFrequency = new PropertyDescriptor( "garbageCollectionFrequency", beanClass_, "getGarbageCollectionFrequency", "setGarbageCollectionFrequency"); garbageCollectionFrequency.setBound(true); garbageCollectionFrequency.setConstrained(true); garbageCollectionFrequency.setDisplayName(rbl_.getText("PROP_NAME_JAC_GCFREQ")); garbageCollectionFrequency.setShortDescription(rbl_.getText("PROP_DESC_JAC_GCFREQ")); PropertyDescriptor garbageCollectionPriority = new PropertyDescriptor( "garbageCollectionPriority", beanClass_, "getGarbageCollectionPriority", "setGarbageCollectionPriority"); garbageCollectionPriority.setBound(true); garbageCollectionPriority.setConstrained(true); garbageCollectionPriority.setDisplayName(rbl_.getText("PROP_NAME_JAC_GCPRIORITY")); garbageCollectionPriority.setShortDescription(rbl_.getText("PROP_DESC_JAC_GCPRIORITY")); PropertyDescriptor interpret = new PropertyDescriptor("interpret", beanClass_, "getInterpret", "setInterpret"); interpret.setBound(true); interpret.setConstrained(true); interpret.setDisplayName(rbl_.getText("PROP_NAME_JAC_INTERPRET")); interpret.setShortDescription(rbl_.getText("PROP_DESC_JAC_INTERPRET")); PropertyDescriptor javaApplication = new PropertyDescriptor( "javaApplication", beanClass_, "getJavaApplication", "setJavaApplication"); javaApplication.setBound(true); javaApplication.setConstrained(true); javaApplication.setDisplayName(rbl_.getText("PROP_NAME_JAC_JAVAAPP")); javaApplication.setShortDescription(rbl_.getText("PROP_DESC_JAC_JAVAAPP")); PropertyDescriptor optimization = new PropertyDescriptor("optimization", beanClass_, "getOptimization", "setOptimization"); optimization.setBound(true); optimization.setConstrained(true); optimization.setDisplayName(rbl_.getText("PROP_NAME_JAC_OPTIMIZE")); optimization.setShortDescription(rbl_.getText("PROP_DESC_JAC_OPTIMIZE")); PropertyDescriptor option = new PropertyDescriptor("option", beanClass_, "getOptions", "setOptions"); option.setBound(true); option.setConstrained(true); option.setDisplayName(rbl_.getText("PROP_NAME_JAC_OPTION")); option.setShortDescription(rbl_.getText("PROP_DESC_JAC_OPTION")); PropertyDescriptor parameters = new PropertyDescriptor("parameters", beanClass_, "getParameters", "setParameters"); parameters.setBound(true); parameters.setConstrained(true); parameters.setDisplayName(rbl_.getText("PROP_NAME_JAC_PARAMETERS")); parameters.setShortDescription(rbl_.getText("PROP_DESC_JAC_PARAMETERS")); PropertyDescriptor portSearch = new PropertyDescriptor("findPort", beanClass_, "isFindPort", "setFindPort"); portSearch.setBound(true); portSearch.setConstrained(true); portSearch.setDisplayName(rbl_.getText("PROP_NAME_JAC_PORTSEARCH")); portSearch.setShortDescription(rbl_.getText("PROP_DESC_JAC_PORTSEARCH")); properties_ = new PropertyDescriptor[] { classPath, classPathSecurityChkLvl, garbageCollectInitialSize, garbageCollectMaximumSize, garbageCollectionFrequency, garbageCollectionPriority, interpret, javaApplication, parameters, optimization, option, portSearch, }; } catch (IntrospectionException e) { throw new Error(e.toString()); } }