/** * Sets the parameters of this description object to match the supplied object. * * @param o * the object (should be an instance of <code>Color</code>). * @throws ObjectFactoryException * if there is a problem while reading the properties of the given object. */ public void setParameterFromObject( final Object o ) throws ObjectFactoryException { if ( !( o instanceof Color ) ) { throw new ObjectFactoryException( "Is no instance of java.awt.Color" ); } final Color c = (Color) o; try { setParameter( "value", valueConverter.toAttributeValue( c ) ); } catch ( BeanException e ) { throw new ObjectFactoryException( "Failed to convert color to string", e ); } } }