/** * 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()); }
/** * Implementation of getPropertyDescriptors. This method should be called by all overriding * sub-class methods. Property names 'name', 'description', 'typeNames' * * @see java.beans.BeanInfo#getPropertyDescriptors() */ public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor[] pd = new PropertyDescriptor[2]; ResourceBundle resourceBundle = getResourceBundle(Validation.class); pd[0] = createPropertyDescriptor("name", Validation.class, resourceBundle); pd[0].setExpert(false); pd[1] = createPropertyDescriptor("description", Validation.class, resourceBundle); pd[1].setExpert(false); return pd; } catch (IntrospectionException e) { // TODO error, log here java.util.logging.Logger.getGlobal().log(java.util.logging.Level.INFO, "", e); return new PropertyDescriptor[0]; } } /** Based on getCLass().getName() return target Bean type */
createPropertyDescriptor( "attributeName", EqualityValidation.class, resourceBundle); pd[i].setExpert(false); pd[i + 1] = createPropertyDescriptor("expected", EqualityValidation.class, resourceBundle); pd[i + 1].setExpert(false); pd[i + 2] = createPropertyDescriptor("filter", EqualityValidation.class, resourceBundle); pd[i + 2].setExpert(false); } catch (IntrospectionException e) { pd = pd2;
pd[i].setExpert(false); } catch (IntrospectionException e) { pd = pd2;
pd[i].setExpert(false);
pd[i].setExpert(false); } catch (IntrospectionException e) { pd = pd2;
pd[i].setExpert(false); } catch (IntrospectionException e) { pd = pd2;
/** * Implementation of getPropertyDescriptors. This method should be called by all overriding * sub-class methods. Property names 'name', 'description', 'typeNames' * * @see java.beans.BeanInfo#getPropertyDescriptors() */ public PropertyDescriptor[] getPropertyDescriptors() { try { PropertyDescriptor[] tmp = super.getPropertyDescriptors(); PropertyDescriptor[] pd = new PropertyDescriptor[1 + tmp.length]; ResourceBundle resourceBundle = getResourceBundle(DefaultFeatureValidation.class); int i = 0; for (; i < tmp.length; i++) pd[i] = tmp[i]; pd[i] = createPropertyDescriptor( "typeRef", DefaultFeatureValidation.class, resourceBundle); pd[i].setExpert(false); return pd; } catch (IntrospectionException e) { // TODO error, log here java.util.logging.Logger.getGlobal().log(java.util.logging.Level.INFO, "", e); return new PropertyDescriptor[0]; } } }
createPropertyDescriptor( "degreesAllowable", LineNoPseudoNodeValidation.class, resourceBundle); pd[i].setExpert(false); } catch (IntrospectionException e) { pd = pd2;
createPropertyDescriptor( "lineTypeRef", LineAbstractValidation.class, resourceBundle); pd[i].setExpert(false); } catch (IntrospectionException e) { pd = pd2;
createPropertyDescriptor( "attributeName", UniquityValidation.class, resourceBundle); pd[i].setExpert(false); } catch (IntrospectionException e) { pd = pd2;
createPropertyDescriptor( "typeName", OrphanNodeValidation.class, resourceBundle); pd[i].setExpert(false); } catch (IntrospectionException e) { pd = pd2;