@Override public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor pd = new PropertyDescriptor("value", ValueBean.class); pd.setPropertyEditorClass(MyNumberEditor.class); return new PropertyDescriptor[] {pd}; } catch (IntrospectionException ex) { throw new FatalBeanException("Couldn't create PropertyDescriptor", ex); } } }
/** * See {@link java.beans.FeatureDescriptor}. */ public static void copyNonMethodProperties(PropertyDescriptor source, PropertyDescriptor target) { target.setExpert(source.isExpert()); target.setHidden(source.isHidden()); target.setPreferred(source.isPreferred()); target.setName(source.getName()); target.setShortDescription(source.getShortDescription()); target.setDisplayName(source.getDisplayName()); // Copy all attributes (emulating behavior of private FeatureDescriptor#addTable) Enumeration<String> keys = source.attributeNames(); while (keys.hasMoreElements()) { String key = keys.nextElement(); target.setValue(key, source.getValue(key)); } // See java.beans.PropertyDescriptor#PropertyDescriptor(PropertyDescriptor) target.setPropertyEditorClass(source.getPropertyEditorClass()); target.setBound(source.isBound()); target.setConstrained(source.isConstrained()); }
/** * See {@link java.beans.FeatureDescriptor}. */ public static void copyNonMethodProperties(PropertyDescriptor source, PropertyDescriptor target) { target.setExpert(source.isExpert()); target.setHidden(source.isHidden()); target.setPreferred(source.isPreferred()); target.setName(source.getName()); target.setShortDescription(source.getShortDescription()); target.setDisplayName(source.getDisplayName()); // Copy all attributes (emulating behavior of private FeatureDescriptor#addTable) Enumeration<String> keys = source.attributeNames(); while (keys.hasMoreElements()) { String key = keys.nextElement(); target.setValue(key, source.getValue(key)); } // See java.beans.PropertyDescriptor#PropertyDescriptor(PropertyDescriptor) target.setPropertyEditorClass(source.getPropertyEditorClass()); target.setBound(source.isBound()); target.setConstrained(source.isConstrained()); }
public void setPropertyEditorClass(Class<?> propertyEditorClass) { this.propertyEditorClass = propertyEditorClass; if( propertyDescriptor==null )return; propertyDescriptor.setPropertyEditorClass(propertyEditorClass); }
public PropertyDescriptor[] getPropertyDescriptors() { if (propertyDescriptors != null) return propertyDescriptors; try { PropertyDescriptor itemsDesc = new PropertyDescriptor( "items", DefaultSelectItemsArray.class, "getItems", "setItems"); itemsDesc.setPropertyEditorClass(StringArrayPropertyEditor.class); propertyDescriptors = new PropertyDescriptor[] { itemsDesc }; } catch(IntrospectionException e) { propertyDescriptors = new PropertyDescriptor[0]; } return propertyDescriptors; }
protected void setPropertyEditor(Class<?> editorClass, String... propertyNames) { for (String propertyName : propertyNames) { PropertyDescriptor pd = properties.get(propertyName); if (pd != null) { pd.setPropertyEditorClass(editorClass); } else { LOG.log(Level.WARNING, "Failed to set property editor for property '" + propertyName + "'. No such property was found"); } } }
protected void setPropertyEditor(Class<?> editorClass, String... propertyNames) { for (String propertyName : propertyNames) { PropertyDescriptor pd = properties.get(propertyName); if (pd != null) { pd.setPropertyEditorClass(editorClass); } else { LOG.log(Level.WARNING, "Failed to set property editor for property '" + propertyName + "'. No such property was found"); } } }
protected void setPropertyEditor(Class<?> editorClass, String... propertyNames) { for (String propertyName : propertyNames) { PropertyDescriptor pd = properties.get(propertyName); if (pd != null) { pd.setPropertyEditorClass(editorClass); } else { LOG.log(Level.WARNING, "Failed to set property editor for property '" + propertyName + "'. No such property was found"); } } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor listName = new PropertyDescriptor("listName", AttachmentListEmpty.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 rv[] = { listName }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try{ PropertyDescriptor activeConceptPropName = new PropertyDescriptor("activeConceptPropName", PutArenaConceptInProperty.class); activeConceptPropName.setBound(true); activeConceptPropName.setPropertyEditorClass(PropertyNameLabelEditor.class); activeConceptPropName.setDisplayName("<html><font color='green'>Concept property:"); activeConceptPropName.setShortDescription("Name of the property containing the concept to add the rel to. "); PropertyDescriptor rv[] = {activeConceptPropName}; return rv; }catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor address = new PropertyDescriptor("address", AddElectronicAddress.class); address.setBound(true); address.setPropertyEditorClass(JTextFieldEditor.class); address.setDisplayName("<html><font color='green'>Electronic address:"); address.setShortDescription("Enter the electronic address to be added."); PropertyDescriptor rv[] = { address }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor propName = new PropertyDescriptor("propName", SetPropertyToHierarchySelection.class); propName.setBound(true); propName.setPropertyEditorClass(PropertyNameLabelEditor.class); propName.setDisplayName("<html><font color='green'>Concept property:"); propName.setShortDescription("Name of the property containing the concept. "); PropertyDescriptor rv[] = { propName }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor visible = new PropertyDescriptor("visible", ShowPreferences.class); visible.setBound(true); visible.setPropertyEditorClass(CheckboxEditor.class); visible.setDisplayName("<html><font color='green'>Show preferences view"); visible.setShortDescription("Choose whether to show preferences view."); PropertyDescriptor rv[] = { visible }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor refsetName = new PropertyDescriptor("refsetNamePropertyKey", CreateRefset.class); refsetName.setBound(true); refsetName.setPropertyEditorClass(PropertyNameLabelEditor.class); refsetName.setDisplayName("<html><font color='green'>Refset name:"); refsetName.setShortDescription("Refset name"); PropertyDescriptor rv[] = { refsetName }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor repoUrl = new PropertyDescriptor("repoUrl", getBeanDescriptor().getBeanClass()); repoUrl.setBound(true); repoUrl.setPropertyEditorClass(JTextFieldEditor.class); repoUrl.setDisplayName("<html><font color='green'>repoUrl:"); repoUrl.setShortDescription("The URL of the repository to be set."); PropertyDescriptor rv[] = { repoUrl }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor propName = new PropertyDescriptor("propName", getBeanDescriptor().getBeanClass()); propName.setBound(true); propName.setPropertyEditorClass(PropertyNameLabelEditor.class); propName.setDisplayName("<html><font color='green'>Uuid property:"); propName.setShortDescription("Name of the property containing the concept uuid. "); PropertyDescriptor rv[] = { propName }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor svnEntryString = new PropertyDescriptor("svnEntryString", getBeanDescriptor().getBeanClass()); svnEntryString.setBound(true); svnEntryString.setPropertyEditorClass(JTextFieldEditorOneLine.class); svnEntryString.setDisplayName("<html><font color='green'>Svn entry:"); svnEntryString.setShortDescription("The svn entry to process."); return new PropertyDescriptor[] { svnEntryString }; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor svnEntryString = new PropertyDescriptor("svnEntryString", getBeanDescriptor().getBeanClass()); svnEntryString.setBound(true); svnEntryString.setPropertyEditorClass(JTextFieldEditorOneLine.class); svnEntryString.setDisplayName("<html><font color='green'>Svn entry:"); svnEntryString.setShortDescription("The svn entry to process."); return new PropertyDescriptor[] { svnEntryString }; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor instruction = new PropertyDescriptor("instruction", getBeanDescriptor().getBeanClass()); instruction.setBound(true); instruction.setPropertyEditorClass(JTextFieldEditor.class); instruction.setDisplayName("<html><font color='green'>Instruction:"); instruction.setShortDescription("Instructions to present to the user in the workflow panel. "); PropertyDescriptor rv[] = { instruction }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }
public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor show = new PropertyDescriptor("show", getBeanDescriptor().getBeanClass()); show.setBound(true); show.setPropertyEditorClass(CheckboxEditor.class); show.setDisplayName("<html><font color='green'>Show signpost panel"); show.setShortDescription("Choose whether to show the signpost panel."); PropertyDescriptor rv[] = { show }; return rv; } catch (IntrospectionException e) { throw new Error(e.toString()); } }