/*
* This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License, version 2.1 as published by the Free Software
* Foundation.
*
* You should have received a copy of the GNU Lesser General Public License along with this
* program; if not, you can obtain a copy at http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
* or from the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* Copyright (c) 2001 - 2013 Object Refinery Ltd, Pentaho Corporation and Contributors.. All rights reserved.
*/
package org.pentaho.reporting.engine.classic.core.elementfactory;
import org.pentaho.reporting.engine.classic.core.Element;
import org.pentaho.reporting.engine.classic.core.filter.types.EllipseType;
/**
* The drawable field element factory can be used to create elements that display <code>Drawable</code> elements.
* <p/>
* A drawable field expects the named datasource to contain Drawable objects.
* <p/>
* Once the desired properties are set, the factory can be reused to create similiar elements.
*
* @author Thomas Morgner
*/
public class EllipseElementFactory extends AbstractContentElementFactory
{
/**
* DefaultConstructor.
*/
public EllipseElementFactory()
{
}
/**
* Creates a new drawable field element based on the defined properties.
*
* @return the generated elements
* @throws IllegalStateException if the field name is not set.
* @see ElementFactory#createElement()
*/
public Element createElement()
{
final Element element = new Element();
applyElementName(element);
applyStyle(element.getStyle());
element.setElementType(new EllipseType());
return element;
}
}