< prev index next >

src/java.desktop/share/classes/java/beans/PropertyDescriptor.java

Print this page




 166         setValue(PropertyInfo.Name.expert.name(), isExpert); // compatibility
 167         setExpert(isExpert);
 168 
 169         boolean isHidden = info.is(PropertyInfo.Name.hidden);
 170         setValue(PropertyInfo.Name.hidden.name(), isHidden); // compatibility
 171         setHidden(isHidden);
 172 
 173         setPreferred(info.is(PropertyInfo.Name.preferred));
 174 
 175         boolean isRequired = info.is(PropertyInfo.Name.required);
 176         setValue(PropertyInfo.Name.required.name(), isRequired);
 177 
 178         boolean visual = info.is(PropertyInfo.Name.visualUpdate);
 179         setValue(PropertyInfo.Name.visualUpdate.name(), visual);
 180 
 181         Object description = info.get(PropertyInfo.Name.description);
 182         if (description != null) {
 183             setShortDescription(description.toString());
 184         }
 185         Object values = info.get(PropertyInfo.Name.enumerationValues);
 186         if (values != null) {
 187             setValue(PropertyInfo.Name.enumerationValues.name(), values);
 188         }

 189         this.baseName = base;
 190     }
 191 
 192     /**
 193      * Returns the Java type info for the property.
 194      * Note that the {@code Class} object may describe
 195      * primitive Java types such as {@code int}.
 196      * This type is returned by the read method
 197      * or is used as the parameter type of the write method.
 198      * Returns {@code null} if the type is an indexed property
 199      * that does not support non-indexed access.
 200      *
 201      * @return the {@code Class} object that represents the Java type info,
 202      *         or {@code null} if the type cannot be determined
 203      */
 204     public synchronized Class<?> getPropertyType() {
 205         Class<?> type = getPropertyType0();
 206         if (type  == null) {
 207             try {
 208                 type = findPropertyType(getReadMethod(), getWriteMethod());




 166         setValue(PropertyInfo.Name.expert.name(), isExpert); // compatibility
 167         setExpert(isExpert);
 168 
 169         boolean isHidden = info.is(PropertyInfo.Name.hidden);
 170         setValue(PropertyInfo.Name.hidden.name(), isHidden); // compatibility
 171         setHidden(isHidden);
 172 
 173         setPreferred(info.is(PropertyInfo.Name.preferred));
 174 
 175         boolean isRequired = info.is(PropertyInfo.Name.required);
 176         setValue(PropertyInfo.Name.required.name(), isRequired);
 177 
 178         boolean visual = info.is(PropertyInfo.Name.visualUpdate);
 179         setValue(PropertyInfo.Name.visualUpdate.name(), visual);
 180 
 181         Object description = info.get(PropertyInfo.Name.description);
 182         if (description != null) {
 183             setShortDescription(description.toString());
 184         }
 185         Object values = info.get(PropertyInfo.Name.enumerationValues);
 186         if (values == null) {
 187             values = new Object[0];
 188         }
 189         setValue(PropertyInfo.Name.enumerationValues.name(), values);
 190         this.baseName = base;
 191     }
 192 
 193     /**
 194      * Returns the Java type info for the property.
 195      * Note that the {@code Class} object may describe
 196      * primitive Java types such as {@code int}.
 197      * This type is returned by the read method
 198      * or is used as the parameter type of the write method.
 199      * Returns {@code null} if the type is an indexed property
 200      * that does not support non-indexed access.
 201      *
 202      * @return the {@code Class} object that represents the Java type info,
 203      *         or {@code null} if the type cannot be determined
 204      */
 205     public synchronized Class<?> getPropertyType() {
 206         Class<?> type = getPropertyType0();
 207         if (type  == null) {
 208             try {
 209                 type = findPropertyType(getReadMethod(), getWriteMethod());


< prev index next >