类java.beans.FeatureDescriptor源码实例Demo

下面列出了怎么用java.beans.FeatureDescriptor的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: tomcatsrc   文件: TestResourceBundleELResolver.java
/**
 * Tests that a valid FeatureDescriptors are returned.
 */
@Test
public void testGetFeatureDescriptors02() {
    ResourceBundleELResolver resolver = new ResourceBundleELResolver();
    ELContext context = new ELContextImpl();

    ResourceBundle resourceBundle = new TesterResourceBundle(
            new Object[][] { { "key", "value" } });
    @SuppressWarnings("unchecked")
    Iterator<FeatureDescriptor> result = resolver.getFeatureDescriptors(
            context, resourceBundle);

    while (result.hasNext()) {
        FeatureDescriptor featureDescriptor = result.next();
        Assert.assertEquals("key", featureDescriptor.getDisplayName());
        Assert.assertEquals("key", featureDescriptor.getName());
        Assert.assertEquals("", featureDescriptor.getShortDescription());
        Assert.assertFalse(featureDescriptor.isExpert());
        Assert.assertFalse(featureDescriptor.isHidden());
        Assert.assertTrue(featureDescriptor.isPreferred());
        Assert.assertEquals(String.class,
                featureDescriptor.getValue(ELResolver.TYPE));
        Assert.assertEquals(Boolean.TRUE, featureDescriptor
                .getValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME));
    }
}
 
源代码2 项目: Tomcat8-Source-Read   文件: BeanELResolver.java
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
    if (base == null) {
        return null;
    }

    try {
        BeanInfo info = Introspector.getBeanInfo(base.getClass());
        PropertyDescriptor[] pds = info.getPropertyDescriptors();
        for (int i = 0; i < pds.length; i++) {
            pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
            pds[i].setValue(TYPE, pds[i].getPropertyType());
        }
        return Arrays.asList((FeatureDescriptor[]) pds).iterator();
    } catch (IntrospectionException e) {
        //
    }

    return null;
}
 
源代码3 项目: Tomcat8-Source-Read   文件: TestMapELResolver.java
/**
 * Tests that a valid FeatureDescriptors are returned.
 */
@Test
public void testGetFeatureDescriptors02() {
    MapELResolver mapELResolver = new MapELResolver();
    ELContext context = new StandardELContext(
            ELManager.getExpressionFactory());

    Map<String, String> map = new HashMap<>();
    map.put("key", "value");
    Iterator<FeatureDescriptor> result = mapELResolver
            .getFeatureDescriptors(context, map);

    while (result.hasNext()) {
        FeatureDescriptor featureDescriptor = result.next();
        Assert.assertEquals("key", featureDescriptor.getDisplayName());
        Assert.assertEquals("key", featureDescriptor.getName());
        Assert.assertEquals("", featureDescriptor.getShortDescription());
        Assert.assertFalse(featureDescriptor.isExpert());
        Assert.assertFalse(featureDescriptor.isHidden());
        Assert.assertTrue(featureDescriptor.isPreferred());
        Assert.assertEquals("key".getClass(),
                featureDescriptor.getValue(ELResolver.TYPE));
        Assert.assertEquals(Boolean.TRUE, featureDescriptor
                .getValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME));
    }
}
 
/**
 * Tests that a valid FeatureDescriptors are returned.
 */
@Test
public void testGetFeatureDescriptors02() {
    ResourceBundleELResolver resolver = new ResourceBundleELResolver();
    ELContext context = new StandardELContext(
            ELManager.getExpressionFactory());

    ResourceBundle resourceBundle = new TesterResourceBundle(
            new Object[][] { { "key", "value" } });
    Iterator<FeatureDescriptor> result = resolver.getFeatureDescriptors(
            context, resourceBundle);

    while (result.hasNext()) {
        FeatureDescriptor featureDescriptor = result.next();
        Assert.assertEquals("key", featureDescriptor.getDisplayName());
        Assert.assertEquals("key", featureDescriptor.getName());
        Assert.assertEquals("", featureDescriptor.getShortDescription());
        Assert.assertFalse(featureDescriptor.isExpert());
        Assert.assertFalse(featureDescriptor.isHidden());
        Assert.assertTrue(featureDescriptor.isPreferred());
        Assert.assertEquals(String.class,
                featureDescriptor.getValue(ELResolver.TYPE));
        Assert.assertEquals(Boolean.TRUE, featureDescriptor
                .getValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME));
    }
}
 
/**
 * Tests that a valid FeatureDescriptors are returned.
 */
@Test
public void testGetFeatureDescriptors02() {
    ResourceBundleELResolver resolver = new ResourceBundleELResolver();
    ELContext context = new ELContextImpl();

    ResourceBundle resourceBundle = new TesterResourceBundle(
            new Object[][] { { "key", "value" } });
    @SuppressWarnings("unchecked")
    Iterator<FeatureDescriptor> result = resolver.getFeatureDescriptors(
            context, resourceBundle);

    while (result.hasNext()) {
        FeatureDescriptor featureDescriptor = result.next();
        Assert.assertEquals("key", featureDescriptor.getDisplayName());
        Assert.assertEquals("key", featureDescriptor.getName());
        Assert.assertEquals("", featureDescriptor.getShortDescription());
        Assert.assertFalse(featureDescriptor.isExpert());
        Assert.assertFalse(featureDescriptor.isHidden());
        Assert.assertTrue(featureDescriptor.isPreferred());
        Assert.assertEquals(String.class,
                featureDescriptor.getValue(ELResolver.TYPE));
        Assert.assertEquals(Boolean.TRUE, featureDescriptor
                .getValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME));
    }
}
 
源代码6 项目: Tomcat7.0.67   文件: BeanELResolver.java
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
    if (base == null) {
        return null;
    }

    try {
        BeanInfo info = Introspector.getBeanInfo(base.getClass());
        PropertyDescriptor[] pds = info.getPropertyDescriptors();
        for (int i = 0; i < pds.length; i++) {
            pds[i].setValue(RESOLVABLE_AT_DESIGN_TIME, Boolean.TRUE);
            pds[i].setValue(TYPE, pds[i].getPropertyType());
        }
        return Arrays.asList((FeatureDescriptor[]) pds).iterator();
    } catch (IntrospectionException e) {
        //
    }

    return null;
}
 
源代码7 项目: tomcatsrc   文件: TestBeanELResolver.java
/**
 * Tests that a valid FeatureDescriptors are returned.
 */
@Test
public void testGetFeatureDescriptors02() {
    BeanELResolver resolver = new BeanELResolver();
    ELContext context = new ELContextImpl();

    Iterator<FeatureDescriptor> result = resolver.getFeatureDescriptors(context, new Bean());

    while (result.hasNext()) {
        PropertyDescriptor featureDescriptor = (PropertyDescriptor) result.next();
        Assert.assertEquals(featureDescriptor.getPropertyType(),
                featureDescriptor.getValue(ELResolver.TYPE));
        Assert.assertEquals(Boolean.TRUE,
                featureDescriptor.getValue(ELResolver.RESOLVABLE_AT_DESIGN_TIME));
    }
}
 
源代码8 项目: netbeans   文件: SheetTable.java
@Override
public void actionPerformed(ActionEvent ae) {
    int i = getSelectedRow();

    if (i != -1) {
        FeatureDescriptor fd = getPropertySetModel().getFeatureDescriptor(i);

        if (fd instanceof Property) {
            java.beans.PropertyEditor ped = PropUtils.getPropertyEditor((Property) fd);
            System.err.println(ped.getClass().getName());
        } else {
            System.err.println("PropertySets - no editor"); //NOI18N
        }
    } else {
        System.err.println("No selection"); //NOI18N
    }
}
 
源代码9 项目: Tomcat8-Source-Read   文件: TestBeanELResolver.java
/**
 * Tests that a valid FeatureDescriptors are not returned if base is not
 * Map.
 */
@Test
public void testGetFeatureDescriptors01() {
    BeanELResolver resolver = new BeanELResolver();
    ELContext context = new StandardELContext(ELManager.getExpressionFactory());

    Iterator<FeatureDescriptor> result = resolver.getFeatureDescriptors(context, null);

    Assert.assertNull(result);
}
 
源代码10 项目: netbeans   文件: RuleEditorPanel.java
@Override
protected JPopupMenu createPopupMenu() {
    FeatureDescriptor fd = getSelection();
    if (fd != null) {
        if (fd instanceof RuleEditorNode.DeclarationProperty) {
            //property
            //
            //actions:
            //remove
            //hide
            //????
            //custom popop for the whole panel
            JPopupMenu pm = new JPopupMenu();

            if(!addPropertyMode) {
                pm.add(new GoToSourceAction(RuleEditorPanel.this, (RuleEditorNode.DeclarationProperty) fd));
                pm.addSeparator();
                pm.add(new RemovePropertyAction(RuleEditorPanel.this, (RuleEditorNode.DeclarationProperty) fd));
            }

            return pm;

        } else if (fd instanceof RuleEditorNode.PropertyCategoryPropertySet) {
            //property category
            //TODO possibly add "add property" action which would
            //preselect the css category in the "add property dialog".
        }
    }

    //no context popup - create the generic popup
    return genericPopupMenu;
}
 
源代码11 项目: Tomcat8-Source-Read   文件: TestMapELResolver.java
/**
 * Tests that a valid FeatureDescriptors are not returned if base is not
 * Map.
 */
@Test
public void testGetFeatureDescriptors01() {
    MapELResolver mapELResolver = new MapELResolver();
    ELContext context = new StandardELContext(
            ELManager.getExpressionFactory());

    Iterator<FeatureDescriptor> result = mapELResolver
            .getFeatureDescriptors(context, new Object());

    Assert.assertNull(result);
}
 
源代码12 项目: activiti6-boot2   文件: JsonNodeELResolver.java
/**
 * If the base object is not null, returns an Iterator containing the set of JavaBeans
 * properties available on the given object. Otherwise, returns null. The Iterator returned must
 * contain zero or more instances of java.beans.FeatureDescriptor. Each info object contains
 * information about a property in the bean, as obtained by calling the
 * BeanInfo.getPropertyDescriptors method. The FeatureDescriptor is initialized using the same
 * fields as are present in the PropertyDescriptor, with the additional required named
 * attributes "type" and "resolvableAtDesignTime" set as follows:
 * <ul>
 * <li>{@link ELResolver#TYPE} - The runtime type of the property, from
 * PropertyDescriptor.getPropertyType().</li>
 * <li>{@link ELResolver#RESOLVABLE_AT_DESIGN_TIME} - true.</li>
 * </ul>
 * 
 * @param context
 *            The context of this evaluation.
 * @param base
 *            The bean to analyze.
 * @return An Iterator containing zero or more FeatureDescriptor objects, each representing a
 *         property on this bean, or null if the base object is null.
 */
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
  if (isResolvable(base)) {
    JsonNode node = (JsonNode) base;
    final Iterator<String> keys = node.fieldNames();
    return new Iterator<FeatureDescriptor>() {
      public boolean hasNext() {
        return keys.hasNext();
      }
      public FeatureDescriptor next() {
        Object key = keys.next();
        FeatureDescriptor feature = new FeatureDescriptor();
        feature.setDisplayName(key == null ? "null" : key.toString());
        feature.setName(feature.getDisplayName());
        feature.setShortDescription("");
        feature.setExpert(true);
        feature.setHidden(false);
        feature.setPreferred(true);
        feature.setValue(TYPE, key == null ? "null" : key.getClass());
        feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true);
        return feature;
        
      }
      public void remove() {
        throw new UnsupportedOperationException("cannot remove");
      }
    };
  }
  return null;
}
 
源代码13 项目: activiti6-boot2   文件: MapELResolver.java
/**
 * If the base object is a map, returns an Iterator containing the set of keys available in the
 * Map. Otherwise, returns null. The Iterator returned must contain zero or more instances of
 * java.beans.FeatureDescriptor. Each info object contains information about a key in the Map,
 * and is initialized as follows:
 * <ul>
 * <li>displayName - The return value of calling the toString method on this key, or "null" if
 * the key is null</li>
 * <li>name - Same as displayName property</li>
 * <li>shortDescription - Empty string</li>
 * <li>expert - false</li>
 * <li>hidden - false</li>
 * <li>preferred - true</li>
 * </ul>
 * In addition, the following named attributes must be set in the returned FeatureDescriptors:
 * <ul>
 * <li>{@link ELResolver#TYPE} - The return value of calling the getClass() method on this key,
 * or null if the key is null.</li>
 * <li>{@link ELResolver#RESOLVABLE_AT_DESIGN_TIME} - true</li>
 * </ul>
 * 
 * @param context
 *            The context of this evaluation.
 * @param base
 *            The map to analyze. Only bases of type Map are handled by this resolver.
 * @return An Iterator containing zero or more (possibly infinitely more) FeatureDescriptor
 *         objects, each representing a key in this map, or null if the base object is not a
 *         map.
 */
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
	if (isResolvable(base)) {
		Map<?, ?> map = (Map<?, ?>) base;
		final Iterator<?> keys = map.keySet().iterator();
		return new Iterator<FeatureDescriptor>() {
			public boolean hasNext() {
				return keys.hasNext();
			}
			public FeatureDescriptor next() {
				Object key = keys.next();
				FeatureDescriptor feature = new FeatureDescriptor();
				feature.setDisplayName(key == null ? "null" : key.toString());
				feature.setName(feature.getDisplayName());
				feature.setShortDescription("");
				feature.setExpert(true);
				feature.setHidden(false);
				feature.setPreferred(true);
				feature.setValue(TYPE, key == null ? "null" : key.getClass());
				feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true);
				return feature;
				
			}
			public void remove() {
				throw new UnsupportedOperationException("cannot remove");
			}
		};
	}
	return null;
}
 
源代码14 项目: netbeans   文件: ModelProperty.java
/** Used by EditablePropertyDisplayer to provide access to the real
 * feature descriptor.  Some property editors will cast the result of
 * env.getFeatureDescriptor() as Property or PropertyDescriptor, so we
 * need to return the original */
FeatureDescriptor getFeatureDescriptor() {
    if (mdl instanceof ExPropertyModel) {
        return ((ExPropertyModel) mdl).getFeatureDescriptor();
    } else {
        return this;
    }
}
 
源代码15 项目: activiti6-boot2   文件: BeanELResolver.java
/**
 * If the base object is not null, returns an Iterator containing the set of JavaBeans
 * properties available on the given object. Otherwise, returns null. The Iterator returned must
 * contain zero or more instances of java.beans.FeatureDescriptor. Each info object contains
 * information about a property in the bean, as obtained by calling the
 * BeanInfo.getPropertyDescriptors method. The FeatureDescriptor is initialized using the same
 * fields as are present in the PropertyDescriptor, with the additional required named
 * attributes "type" and "resolvableAtDesignTime" set as follows:
 * <ul>
 * <li>{@link ELResolver#TYPE} - The runtime type of the property, from
 * PropertyDescriptor.getPropertyType().</li>
 * <li>{@link ELResolver#RESOLVABLE_AT_DESIGN_TIME} - true.</li>
 * </ul>
 * 
 * @param context
 *            The context of this evaluation.
 * @param base
 *            The bean to analyze.
 * @return An Iterator containing zero or more FeatureDescriptor objects, each representing a
 *         property on this bean, or null if the base object is null.
 */
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
	if (isResolvable(base)) {
		final PropertyDescriptor[] properties;
		try {
			properties = Introspector.getBeanInfo(base.getClass()).getPropertyDescriptors();
		} catch (IntrospectionException e) {
			return Collections.<FeatureDescriptor> emptyList().iterator();
		}
		return new Iterator<FeatureDescriptor>() {
			int next = 0;

			public boolean hasNext() {
				return properties != null && next < properties.length;
			}

			public FeatureDescriptor next() {
				PropertyDescriptor property = properties[next++];
				FeatureDescriptor feature = new FeatureDescriptor();
				feature.setDisplayName(property.getDisplayName());
				feature.setName(property.getName());
				feature.setShortDescription(property.getShortDescription());
				feature.setExpert(property.isExpert());
				feature.setHidden(property.isHidden());
				feature.setPreferred(property.isPreferred());
				feature.setValue(TYPE, property.getPropertyType());
				feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true);
				return feature;
			}

			public void remove() {
				throw new UnsupportedOperationException("cannot remove");
			}
		};
	}
	return null;
}
 
源代码16 项目: Tomcat7.0.67   文件: TestBeanELResolver.java
/**
 * Tests that a valid FeatureDescriptors are not returned if base is not
 * Map.
 */
@Test
public void testGetFeatureDescriptors01() {
    BeanELResolver resolver = new BeanELResolver();
    ELContext context = new ELContextImpl();

    Iterator<FeatureDescriptor> result = resolver.getFeatureDescriptors(context, null);

    Assert.assertNull(result);
}
 
/**
 * If the base object is a ResourceBundle, returns an Iterator containing the set of keys
 * available in the ResourceBundle. Otherwise, returns null. The Iterator returned must contain
 * zero or more instances of java.beans.FeatureDescriptor. Each info object contains information
 * about a key in the ResourceBundle, and is initialized as follows:
 * <ul>
 * <li>displayName - The String key name</li>
 * <li>name - Same as displayName property</li>
 * <li>shortDescription - Empty string</li>
 * <li>expert - false</li>
 * <li>hidden - false</li>
 * <li>preferred - true</li>
 * </ul>
 * In addition, the following named attributes must be set in the returned FeatureDescriptors:
 * <ul>
 * <li>{@link ELResolver#TYPE} - String.class.</li>
 * <li>{@link ELResolver#RESOLVABLE_AT_DESIGN_TIME} - true</li>
 * </ul>
 * 
 * @param context
 *            The context of this evaluation.
 * @param base
 *            The bundle to analyze. Only bases of type ResourceBundle are handled by this
 *            resolver.
 * @return An Iterator containing zero or more (possibly infinitely more) FeatureDescriptor
 *         objects, each representing a key in this bundle, or null if the base object is not a
 *         ResourceBundle.
 */
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
	if (isResolvable(base)) {
		final Enumeration<String> keys = ((ResourceBundle) base).getKeys();
		return new Iterator<FeatureDescriptor>() {
			public boolean hasNext() {
				return keys.hasMoreElements();
			}
			public FeatureDescriptor next() {
				FeatureDescriptor feature = new FeatureDescriptor();
				feature.setDisplayName(keys.nextElement());
				feature.setName(feature.getDisplayName());
				feature.setShortDescription("");
				feature.setExpert(true);
				feature.setHidden(false);
				feature.setPreferred(true);
				feature.setValue(TYPE, String.class);
				feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true);
				return feature;
			}
			public void remove() {
				throw new UnsupportedOperationException("Cannot remove");
				
			}
		};
	}
	return null;
}
 
源代码18 项目: zheshiyigeniubidexiangmu   文件: CommonUtils.java
public static String[] getNullPropertyNames(Object source) {
    final BeanWrapper wrappedSource = new BeanWrapperImpl(source);
    return Stream.of(wrappedSource.getPropertyDescriptors())
            .map(FeatureDescriptor::getName)
            .filter(propertyName -> wrappedSource.getPropertyValue(propertyName) == null)
            .toArray(String[]::new);
}
 
源代码19 项目: netbeans   文件: ValuePropertyEditor.java
@Override
public void attachEnv(PropertyEnv env) {
    //System.out.println("ValuePropertyEditor.attachEnv("+env+"), feature descriptor = "+env.getFeatureDescriptor());
    env.setState(PropertyEnv.STATE_NEEDS_VALIDATION);
    env.addVetoableChangeListener(validate);
    if (delegatePropertyEditor instanceof ExPropertyEditor) {
        //System.out.println("  attaches to "+delegatePropertyEditor);
        if (delegateValue instanceof String) {
            ShortenedStrings.StringInfo shortenedInfo = ShortenedStrings.getShortenedInfo((String) delegateValue);
            if (shortenedInfo != null) {
                // The value is too large, do not allow editing!
                FeatureDescriptor desc = env.getFeatureDescriptor();
                if (desc instanceof Node.Property){
                    Node.Property prop = (Node.Property)desc;
                    // Need to make it uneditable
                    try {
                        Method forceNotEditableMethod = prop.getClass().getDeclaredMethod("forceNotEditable");
                        forceNotEditableMethod.setAccessible(true);
                        forceNotEditableMethod.invoke(prop);
                    } catch (Exception ex){}
                    //editable = prop.canWrite();
                }
            }
        }
        ((ExPropertyEditor) delegatePropertyEditor).attachEnv(env);
        this.env = env;
    }
}
 
源代码20 项目: netbeans   文件: SheetTable.java
private TableCellEditor getCustomEditor( int row ) {
    FeatureDescriptor fd = getPropertySetModel().getFeatureDescriptor(row);

    if (fd instanceof PropertySet)
        return null;

    Object res = fd.getValue( "custom.cell.editor"); //NOI18N
    if( res instanceof TableCellEditor ) {
        prepareCustomEditor( res );
        return ( TableCellEditor ) res;
    }
    return null;
}
 
源代码21 项目: netbeans   文件: SheetTable.java
@Override
public void actionPerformed(ActionEvent ae) {
    FeatureDescriptor fd = _getSelection();

    if (fd instanceof PropertySet) {
        int row = SheetTable.this.getSelectedRow();
        boolean b = getPropertySetModel().isExpanded(fd);

        if (b) {
            toggleExpanded(row);
        }
    }
}
 
源代码22 项目: flowable-engine   文件: JsonNodeELResolver.java
/**
 * If the base object is not null, returns an Iterator containing the set of JavaBeans properties available on the given object. Otherwise, returns null. The Iterator returned must contain zero or
 * more instances of java.beans.FeatureDescriptor. Each info object contains information about a property in the bean, as obtained by calling the BeanInfo.getPropertyDescriptors method. The
 * FeatureDescriptor is initialized using the same fields as are present in the PropertyDescriptor, with the additional required named attributes "type" and "resolvableAtDesignTime" set as
 * follows:
 * <ul>
 * <li>{@link ELResolver#TYPE} - The runtime type of the property, from PropertyDescriptor.getPropertyType().</li>
 * <li>{@link ELResolver#RESOLVABLE_AT_DESIGN_TIME} - true.</li>
 * </ul>
 * 
 * @param context
 *            The context of this evaluation.
 * @param base
 *            The bean to analyze.
 * @return An Iterator containing zero or more FeatureDescriptor objects, each representing a property on this bean, or null if the base object is null.
 */
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
    if (isResolvable(base)) {
        JsonNode node = (JsonNode) base;
        final Iterator<String> keys = node.fieldNames();
        return new Iterator<FeatureDescriptor>() {
            @Override
            public boolean hasNext() {
                return keys.hasNext();
            }

            @Override
            public FeatureDescriptor next() {
                Object key = keys.next();
                FeatureDescriptor feature = new FeatureDescriptor();
                feature.setDisplayName(key == null ? "null" : key.toString());
                feature.setName(feature.getDisplayName());
                feature.setShortDescription("");
                feature.setExpert(true);
                feature.setHidden(false);
                feature.setPreferred(true);
                feature.setValue(TYPE, key == null ? "null" : key.getClass());
                feature.setValue(RESOLVABLE_AT_DESIGN_TIME, true);
                return feature;

            }

            @Override
            public void remove() {
                throw new UnsupportedOperationException("cannot remove");
            }
        };
    }
    return null;
}
 
源代码23 项目: netbeans   文件: EditablePropertyDisplayer.java
public void valueChanged(PropertyEditor editor) {
    failed = false;

    try {
        //                System.err.println("ValueChanged - new value " + editor.getValue());
        if (getInplaceEditor() != null) {
            setEnteredValue(getProperty().getValue());
        } else {
            //Handle case where our parent PropertyPanel is no longer showing, but
            //the custom editor we invoked still is.  Issue 38004
            PropertyModel mdl = (modelRef != null) ? modelRef.get() : null;

            if (mdl != null) {
                FeatureDescriptor fd = null;

                if (mdl instanceof ExPropertyModel) {
                    fd = ((ExPropertyModel) mdl).getFeatureDescriptor();
                }

                String title = null;

                if (fd != null) {
                    title = fd.getDisplayName();
                }

                failed = PropUtils.updateProp(mdl, editor, title); //XXX
            }
        }
    } catch (Exception e) {
        throw (IllegalStateException) new IllegalStateException("Problem setting entered value from custom editor").initCause(e);
    }
}
 
源代码24 项目: Tomcat8-Source-Read   文件: StreamELResolverImpl.java
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
        Object base) {
    return null;
}
 
源代码25 项目: Tomcat8-Source-Read   文件: TypeConverter.java
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context,
        Object base) {
    return null;
}
 
源代码26 项目: trimou   文件: Expressions.java
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
    return null;
}
 
源代码27 项目: Tomcat8-Source-Read   文件: ArrayELResolver.java
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
    return null;
}
 
@Override
public FeatureDescriptor getDescriptor() {
    return new FeatureDescriptor();
}
 
源代码29 项目: NBANDROID-V2   文件: IdsGrammarQueryManager.java
@Override
public FeatureDescriptor getDescriptor() {
    return new FeatureDescriptor();
}
 
源代码30 项目: Tomcat8-Source-Read   文件: ListELResolver.java
@Override
public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base) {
    return null;
}
 
 类所在包
 同包方法