Example usage for java.beans PropertyDescriptor setHidden

List of usage examples for java.beans PropertyDescriptor setHidden

Introduction

In this page you can find the example usage for java.beans PropertyDescriptor setHidden.

Prototype

public void setHidden(boolean hidden) 

Source Link

Document

The "hidden" flag is used to identify features that are intended only for tool use, and which should not be exposed to humans.

Usage

From source file:org.archive.crawler.restlet.JobRelatedResource.java

protected void defaultUpdateDescriptor(PropertyDescriptor pd) {
    // make non-editable
    try {/*from w ww  .  j a va2  s .co  m*/
        pd.setWriteMethod(null);
    } catch (IntrospectionException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
    }
    if (HIDDEN_PROPS.contains(pd.getName())) {
        pd.setHidden(true);
    }
}

From source file:com.twinsoft.convertigo.beans.core.MySimpleBeanInfo.java

protected PropertyDescriptor getPropertyDescriptor(String name) throws IntrospectionException {
    checkAdditionalProperties();/*w w w  .  j  a  v a 2  s.c  o  m*/
    for (int i = 0; i < properties.length; i++) {
        PropertyDescriptor property = properties[i];
        if (name.equals(property.getName())) {
            PropertyDescriptor clone = new PropertyDescriptor(name, property.getReadMethod(),
                    property.getWriteMethod());
            clone.setDisplayName(property.getDisplayName());
            clone.setShortDescription(property.getShortDescription());
            clone.setPropertyEditorClass(property.getPropertyEditorClass());
            clone.setBound(property.isBound());
            clone.setConstrained(property.isConstrained());
            clone.setExpert(property.isExpert());
            clone.setHidden(property.isHidden());
            clone.setPreferred(property.isPreferred());
            for (String attributeName : Collections.list(property.attributeNames())) {
                clone.setValue(attributeName, property.getValue(attributeName));
            }
            return properties[i] = clone;
        }
    }
    return null;
}