support.setDisplayName(p.getDisplayName()); support.setShortDescription(p.getShortDescription()); support.setPropertyEditorClass(p.getPropertyEditorClass());
p.setHidden(true); } else { ((PropertySupport.Reflection<?>)p).setPropertyEditorClass(c);
support.setDisplayName (p.getDisplayName ()); support.setShortDescription (p.getShortDescription ()); support.setPropertyEditorClass (p.getPropertyEditorClass ());
support.setDisplayName (p.getDisplayName ()); support.setShortDescription (p.getShortDescription ()); support.setPropertyEditorClass (p.getPropertyEditorClass ());
property.setPropertyEditorClass(editorClass);
/** * Create a property, with a particular {@link PropertyEditor}. A particular * editor must be specified when the property type don't have a registered * editor class. * The parameter <code>propertyName</code> will be used as the canonical name of the <code>LayoutProperty</code>. * @param layout The layout instance * @param valueType The type of the property value, ex: <code>Double.class</code> * @param propertyName The display name of the property * @param propertyCategory A category string or <code>null</code> for using * default category * @param propertyDescription A description string for the property * @param getMethod The name of the get method for this property, must exist * to make Java reflexion working. * @param setMethod The name of the set method for this property, must exist * to make Java reflexion working. * @param editorClass A <code>PropertyEditor</code> class for the given type * @return the created property * @throws NoSuchMethodException if the getter or setter methods cannot be found */ public static LayoutProperty createProperty(Layout layout, Class valueType, String propertyName, String propertyCategory, String propertyDescription, String getMethod, String setMethod, Class<? extends PropertyEditor> editorClass) throws NoSuchMethodException { PropertySupport.Reflection property = new PropertySupport.Reflection( layout, valueType, getMethod, setMethod); property.setName(propertyName); property.setShortDescription(propertyDescription); property.setPropertyEditorClass(editorClass); return new LayoutProperty(property, propertyCategory, propertyName); }
/** * Sets the property editor class. The class must implement * {@link PropertyEditor}. * * @param clazz the property editor class */ public void setPropertyEditorClass(Class<? extends PropertyEditor> clazz) { property.setPropertyEditorClass(clazz); }